feat(components): 新增分页、选择器和标签栏组件并优化插件页面

- 添加 pagination-plugin 组件,包含完整的分页功能和页面跳转选择
- 添加 select-plugin 组件,支持单选和多选模式的选择弹窗
- 添加 tab-bar-plugin 组件,提供底部导航栏功能
- 在 page-plugin 中集成 t-loading 组件替换原有的加载逻辑
- 移除页面中的登录状态监听逻辑和相关订阅功能
- 修改页面样式传递方式,将 style 属性改为 customStyle
- 更新组件依赖配置文件,添加新的组件引用
This commit is contained in:
zhengw
2026-01-12 16:29:53 +08:00
parent f0c68126dc
commit 0d58fc80f4
15 changed files with 365 additions and 25 deletions

View File

@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
"t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item"
}
}

View File

@@ -0,0 +1,43 @@
Component({
options: { multipleSlots: true },
/**
* 组件的属性列表
*/
properties: {
active: {
type: String,
value: "home",
},
},
/**
* 组件的初始数据
*/
data: {
list: [
{ value: "home", label: "首页", icon: "home" },
{ value: "scan", label: "扫码", icon: "scan" },
{ value: "my", label: "我的", icon: "user" },
],
pages: {
index: "/pages/index/index",
scan: "/pages/processEntry/processEntry",
my: "/pages/my/my",
} as Record<string, string>,
},
/**
* 组件的方法列表
*/
methods: {
onChange(e: any) {
if (e.detail.value == this.data.active) {
return;
}
wx.reLaunch({
url: this.data.pages[e.detail.value],
});
},
},
});

View File

@@ -0,0 +1,13 @@
<t-tab-bar
t-class="t-tab-bar"
value="{{active}}"
bindchange="onChange"
theme="normal"
fixed="{{true}}"
split="{{false}}"
>
<t-tab-bar-item wx:for="{{list}}" wx:key="value" value="{{item.value}}" icon="{{item.icon}}">
{{item.label}}
</t-tab-bar-item>
</t-tab-bar>