mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
37 lines
657 B
TypeScript
37 lines
657 B
TypeScript
import { VantComponent } from '../common/component';
|
|
|
|
VantComponent({
|
|
relation: {
|
|
type: 'descendant',
|
|
name: 'goods-action-button',
|
|
current: 'goods-action',
|
|
linked() {
|
|
this.updateStyle();
|
|
},
|
|
unlinked() {
|
|
this.updateStyle();
|
|
},
|
|
linkChanged() {
|
|
this.updateStyle();
|
|
},
|
|
},
|
|
props: {
|
|
safeAreaInsetBottom: {
|
|
type: Boolean,
|
|
value: true,
|
|
},
|
|
},
|
|
|
|
methods: {
|
|
updateStyle() {
|
|
wx.nextTick(() => {
|
|
this.children.forEach(
|
|
(child: WechatMiniprogram.Component.TrivialInstance) => {
|
|
child.updateStyle();
|
|
}
|
|
);
|
|
});
|
|
},
|
|
},
|
|
});
|