init
This commit is contained in:
47
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.js
vendored
Normal file
47
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.js
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
var common_vendor = require("../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
props: {
|
||||
tabBars: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
staticNum: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
emits: "",
|
||||
setup(__props, { expose, emit }) {
|
||||
const scrollinto = common_vendor.ref("tab0");
|
||||
let tabIndex = common_vendor.ref(0);
|
||||
const changeTab = (index) => {
|
||||
if (tabIndex.value == index) {
|
||||
return;
|
||||
}
|
||||
tabIndex.value = index;
|
||||
emit("getTabIndex", index);
|
||||
scrollinto.value = "tab" + index;
|
||||
};
|
||||
expose({
|
||||
changeTab
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(__props.tabBars, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: common_vendor.t(__props.staticNum[index]),
|
||||
c: common_vendor.n(common_vendor.unref(tabIndex) == index ? "scroll-row-item-act" : "scroll-row-item-normal"),
|
||||
d: index,
|
||||
e: "tab" + index,
|
||||
f: common_vendor.o(($event) => changeTab(index), index)
|
||||
};
|
||||
}),
|
||||
b: scrollinto.value
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/project/project-wl-yonghuduan-uniapp-vue3/components/uni-tab/index.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
4
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.json
vendored
Normal file
4
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.wxml
vendored
Normal file
1
project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/mp-weixin/components/uni-tab/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<scroll-view scroll-x="true" class="tabScroll" scroll-into-view="{{b}}" scroll-with-animation="{{true}}"><view class="scroll-row"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" id="{{item.e}}" class="scroll-row-item" bindtap="{{item.f}}"><view class="{{item.c}}"><text class="line"></text> {{item.a}} <view class="num">{{item.b}}</view></view></view></view></scroll-view>
|
||||
Reference in New Issue
Block a user