52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
|
"use strict";
|
||
|
const common_vendor = require("../../common/vendor.js");
|
||
|
const _sfc_main = {
|
||
|
__name: "downmenu",
|
||
|
props: {
|
||
|
itemTarget: {
|
||
|
type: Number,
|
||
|
required: true
|
||
|
// 如果必须传
|
||
|
// default: 0 // 如果你想给默认值
|
||
|
}
|
||
|
},
|
||
|
setup(__props) {
|
||
|
const props = __props;
|
||
|
const itemArray = ["NU", "动态", "我的"];
|
||
|
const jumpto = (index) => {
|
||
|
if (index != props.itemTarget) {
|
||
|
switch (index) {
|
||
|
case 0:
|
||
|
common_vendor.index.redirectTo({
|
||
|
url: `/pages/index/index`
|
||
|
});
|
||
|
break;
|
||
|
case 1:
|
||
|
break;
|
||
|
case 2:
|
||
|
common_vendor.index.redirectTo({
|
||
|
url: `/pages/index/mine`
|
||
|
});
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
return (_ctx, _cache) => {
|
||
|
return {
|
||
|
a: common_vendor.f(itemArray, (item, index, i0) => {
|
||
|
return {
|
||
|
a: `https://www.focusnu.com/media/directive/index/itemsbutton/${index}${__props.itemTarget === index ? 1 : 0}.png`,
|
||
|
b: common_vendor.t(item),
|
||
|
c: common_vendor.n(__props.itemTarget === index ? `bottom-button-target` : `bottom-button`),
|
||
|
d: common_vendor.o(($event) => jumpto(index), index),
|
||
|
e: index
|
||
|
};
|
||
|
})
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-459e7b51"]]);
|
||
|
wx.createComponent(Component);
|
||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/compontent/public/downmenu.js.map
|