acdr-ui/dist/dev/mp-weixin/components/Tabbar.js

31 lines
990 B
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";
const common_vendor = require("../common/vendor.js");
const store_routers = require("../store/routers.js");
const _sfc_main = {
__name: "Tabbar",
setup(__props) {
const routersStore = store_routers.useRoutersStore();
function switchTab(item) {
routersStore.setCurrentTab(item.pagePath);
common_vendor.index.switchTab({
url: item.pagePath
});
}
return (_ctx, _cache) => {
return {
a: common_vendor.f(common_vendor.unref(routersStore).tabList, (item, index, i0) => {
return {
a: common_vendor.unref(routersStore).selected === index ? item.selectedIconPath : item.iconPath,
b: common_vendor.t(item.text),
c: index,
d: common_vendor.unref(routersStore).selected === index ? 1 : "",
e: common_vendor.o(($event) => switchTab(item), index)
};
})
};
};
}
};
wx.createComponent(_sfc_main);
//# sourceMappingURL=Tabbar.js.map