7 changed files with 40 additions and 13 deletions
@ -1,10 +0,0 @@ |
|||||
import { renderIcon } from '@/utils/webutils.js' |
|
||||
|
|
||||
export default { |
|
||||
methods: { |
|
||||
renderIcon, |
|
||||
closeMe() { |
|
||||
this.$emit('close') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,31 @@ |
|||||
|
import { defineComponent } from 'vue' |
||||
|
import { renderIcon } from '@/utils/webutils.js' |
||||
|
|
||||
|
export type IWidgetData = { |
||||
|
/** |
||||
|
* 是否激活 |
||||
|
*/ |
||||
|
isActivated: boolean |
||||
|
} |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
activated() { |
||||
|
this.isActivated = true |
||||
|
console.log('activated', this.$.type.name) |
||||
|
}, |
||||
|
deactivated() { |
||||
|
this.isActivated = false |
||||
|
}, |
||||
|
emits: ['close'], |
||||
|
data() { |
||||
|
return { |
||||
|
isActivated: false |
||||
|
} as IWidgetData |
||||
|
}, |
||||
|
methods: { |
||||
|
renderIcon, |
||||
|
closeMe() { |
||||
|
this.$emit('close') |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
Loading…
Reference in new issue