zoujiandong 43abd1f3d6 222
2025-07-30 13:58:39 +08:00

50 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-steps",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$8],
data() {
return {};
},
watch: {
children() {
this.updateChildData();
},
parentData() {
this.updateChildData();
}
},
computed: {
// 监听参数的变化通过watch中手动去更新子组件的数据否则子组件不会自动变化
parentData() {
return [this.current, this.direction, this.activeColor, this.inactiveColor, this.activeIcon, this.inactiveIcon, this.dot];
}
},
methods: {
// 更新子组件的数据
updateChildData() {
this.children.map((child) => {
common_vendor.test.func((child || {}).updateFromParent()) && child.updateFromParent();
});
},
// 接受子组件的通知,去修改其他子组件的数据
updateFromChild() {
this.updateChildData();
}
},
created() {
this.children = [];
},
options: {
virtualHost: false
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.n(`u-steps--${_ctx.direction}`)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-30d91cab"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.js.map