消息
This commit is contained in:
34
unpackage/dist/dev/mp-weixin/TUIKit/components/common/Slider/index.js
vendored
Normal file
34
unpackage/dist/dev/mp-weixin/TUIKit/components/common/Slider/index.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ["change"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const isSliderOpen = common_vendor.ref(false);
|
||||
const emits = __emit;
|
||||
common_vendor.watchEffect(() => {
|
||||
isSliderOpen.value = props.open;
|
||||
});
|
||||
const toggleSlider = () => {
|
||||
isSliderOpen.value = !isSliderOpen.value;
|
||||
emits("change", isSliderOpen.value);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.n(common_vendor.unref(isSliderOpen) && "slider-open"),
|
||||
b: common_vendor.o$1(toggleSlider)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a7f8ad37"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/common/Slider/index.js.map
|
||||
Reference in New Issue
Block a user