69 lines
2.3 KiB
JavaScript
69 lines
2.3 KiB
JavaScript
"use strict";
|
|
var common_vendor = require("../common/vendor.js");
|
|
require("../stores/index.js");
|
|
var stores_modules_tabIndex = require("../stores/modules/tabIndex.js");
|
|
require("../stores/modules/user.js");
|
|
require("../stores/modules/AIResponse.js");
|
|
require("../stores/modules/rateLimit.js");
|
|
if (!Array) {
|
|
const _easycom_wd_tabbar_item2 = common_vendor.resolveComponent("wd-tabbar-item");
|
|
const _easycom_wd_tabbar2 = common_vendor.resolveComponent("wd-tabbar");
|
|
(_easycom_wd_tabbar_item2 + _easycom_wd_tabbar2)();
|
|
}
|
|
const _easycom_wd_tabbar_item = () => "../uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.js";
|
|
const _easycom_wd_tabbar = () => "../uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar.js";
|
|
if (!Math) {
|
|
(_easycom_wd_tabbar_item + _easycom_wd_tabbar)();
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "TabBar",
|
|
setup(__props) {
|
|
const {
|
|
tabIndex
|
|
} = common_vendor.storeToRefs(stores_modules_tabIndex.useTabStore());
|
|
const tabBarList = [
|
|
{
|
|
icon: "home",
|
|
title: "\u5B66\u6613"
|
|
},
|
|
{
|
|
icon: "spool",
|
|
title: "\u95EE\u6613"
|
|
},
|
|
{
|
|
icon: "user",
|
|
title: "\u5F52\u5904"
|
|
}
|
|
];
|
|
const onChange = ({ value }) => {
|
|
tabIndex.value = parseInt(value);
|
|
console.log(tabIndex.value);
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.f(tabBarList, (item, index, i0) => {
|
|
return {
|
|
a: index,
|
|
b: "42921124-1-" + i0 + ",42921124-0",
|
|
c: common_vendor.p({
|
|
title: item.title,
|
|
icon: item.icon
|
|
})
|
|
};
|
|
}),
|
|
b: common_vendor.o(onChange),
|
|
c: common_vendor.o(($event) => common_vendor.isRef(tabIndex) ? tabIndex.value = $event : null),
|
|
d: common_vendor.p({
|
|
fixed: true,
|
|
zIndex: 9,
|
|
safeAreaInsetBottom: true,
|
|
placeholder: true,
|
|
modelValue: common_vendor.unref(tabIndex)
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-42921124"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/components/TabBar.vue"]]);
|
|
wx.createComponent(Component);
|