Yao b42d1e8e8f
[bugfix] 修复 gulp 插件引起的组件编译后代码异常的问题 (#209)
* add eslint

* eslint 校验

* reset gulp build config
2018-04-30 23:08:58 +08:00

56 lines
862 B
JavaScript

Component({
externalClasses: ['custom-class'],
relations: {
'../btn-group/index': {
type: 'parent',
linked() {
this.setData({ inGroup: true });
},
unlinked() {
this.setData({ inGroup: false });
}
}
},
properties: {
type: {
type: String,
value: '',
},
size: {
type: String,
value: '',
},
plain: {
type: Boolean,
value: false,
},
disabled: {
type: Boolean,
value: false,
},
loading: {
type: Boolean,
value: false,
},
openType: {
type: String,
value: ''
}
},
data: {
inGroup: false,
isLast: false
},
methods: {
handleTap() {
this.triggerEvent('btnclick');
},
switchLastButtonStatus(isLast = false) {
this.setData({ isLast });
}
}
});