63 lines
2.1 KiB
JavaScript
63 lines
2.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "index",
|
|
props: {
|
|
isShow: {
|
|
type: Boolean,
|
|
required: true
|
|
}
|
|
},
|
|
emits: ["nav"],
|
|
setup(__props, { emit: __emit }) {
|
|
const emit = __emit;
|
|
const props = __props;
|
|
const transition = common_vendor.ref(true);
|
|
const ballTarget = common_vendor.ref(-1);
|
|
const bottomList = common_vendor.ref([
|
|
{ url: "/static/index/topright/scan/00.png", targetUrl: "/static/index/topright/scan/01.png", name: "雷达扫描" },
|
|
{ url: "/static/index/topright/scan/10.png", targetUrl: "/static/index/topright/scan/11.png", name: "扫码添加" },
|
|
{ url: "/static/index/topright/scan/20.png", targetUrl: "/static/index/topright/scan/21.png", name: "手动录入" }
|
|
]);
|
|
const clickBall = (index) => {
|
|
ballTarget.value = index;
|
|
emit("nav", index);
|
|
};
|
|
common_vendor.watch(
|
|
() => props.isShow,
|
|
(newVal, oldVal) => {
|
|
if (!oldVal && newVal) {
|
|
transition.value = false;
|
|
setTimeout(() => {
|
|
transition.value = true;
|
|
}, 50);
|
|
}
|
|
}
|
|
);
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_assets._imports_0$7,
|
|
b: common_vendor.f(bottomList.value, (item, index, i0) => {
|
|
return {
|
|
a: ballTarget.value == index ? item.targetUrl : item.url,
|
|
b: common_vendor.n(ballTarget.value == index ? `ball-bgc-target` : `ball-bgc`),
|
|
c: common_vendor.t(item.name),
|
|
d: index,
|
|
e: common_vendor.o(($event) => clickBall(index), index)
|
|
};
|
|
}),
|
|
c: __props.isShow,
|
|
d: common_vendor.s(transition.value ? {
|
|
opacity: `1`
|
|
} : {
|
|
opacity: `0`
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-764689cb"]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/component/Initialization/index.js.map
|