flat: init

This commit is contained in:
史典卓
2024-11-08 11:55:23 +08:00
commit 0e64009a8a
80 changed files with 10529 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const _sfc_main = {
name: "tab",
data() {
return {};
},
props: {
current: {
type: Number,
default: 0
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o(($event) => false),
b: common_vendor.o(($event) => false),
c: common_vendor.o(($event) => false),
d: common_vendor.o(($event) => false),
e: common_vendor.o(($event) => false),
f: common_vendor.o(($event) => false),
g: common_vendor.o(($event) => false),
h: common_vendor.o(($event) => false),
i: $props.current
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="tab-container"><view class="uni-margin-wrap"><swiper class="swiper" current="{{i}}" circular="{{false}}" indicator-dots="{{false}}" autoplay="{{false}}" duration="{{500}}"><swiper-item catchtouchmove="{{a}}"><slot name="tab0"></slot></swiper-item><swiper-item catchtouchmove="{{b}}"><slot name="tab1"></slot></swiper-item><swiper-item catchtouchmove="{{c}}"><slot name="tab2"></slot></swiper-item><swiper-item catchtouchmove="{{d}}"><slot name="tab3"></slot></swiper-item><swiper-item catchtouchmove="{{e}}"><slot name="tab4"></slot></swiper-item><swiper-item catchtouchmove="{{f}}"><slot name="tab5"></slot></swiper-item><swiper-item catchtouchmove="{{g}}"><slot name="tab6"></slot></swiper-item><swiper-item catchtouchmove="{{h}}"><slot name="tab7"></slot></swiper-item></swiper></view></view>

View File

@@ -0,0 +1,21 @@
.tab-container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
}
.uni-margin-wrap {
width: 100%;
height: 100%;
}
.swiper {
width: 100%;
height: 100%;
}
.swiper-item {
display: block;
width: 100%;
height: 100%;
}