wx-mini-weview
Version:
weixin UI
59 lines (52 loc) • 989 B
JavaScript
const { WvInheritable } = require('../../behaviors/WvInheritable');
const { WvComponentEvent } = require('../../behaviors/WvComponentEvent');
Component({
options: {
styleIsolation: 'apply-shared',
multipleSlots: true
},
behaviors: [
WvComponentEvent
],
properties: {
actived: {
type: Boolean,
value: false
},
lineClamp: {
type: Number,
value: 1
},
heightClamp: {
type: String,
value: null
},
iconGap: {
type: String,
value: 'var(--wv-margin-mini)'
},
iconPosition: {
type: String,
value: 'right' // left|right|top|bottom
},
verticalFade: {
type: Boolean,
value: false
}
},
data: {
needsClamp: false
},
lifetimes: {
ready() {
}
},
methods: {
toggleActive() {
this.setData({
actived: !this.data.actived
});
this.triggerEvent('change', { actived: this.data.actived });
},
}
})