feat: 添加组件配置文件并优化页面结构

- 新增 components.d.json 文件,包含所有组件的属性配置
- 添加 card-item-plugin 组件及其相关文件(json、ts、wxml、wxss)
- 在 app.json 中添加新的生产流程管理页面路径
- 添加多个SVG图标文件用于菜单项
- 重构 popup-plugin 组件样式和关闭逻辑
- 更新 tab-bar-plugin 的激活状态逻辑
- 优化 search-popup 使用全局样式类
- 在首页添加菜单配置和页面跳转功能
- 调整组件样式细节和间距
This commit is contained in:
zhengw
2026-01-14 16:54:47 +08:00
parent 0d58fc80f4
commit b1ecd88641
58 changed files with 971 additions and 386 deletions

View File

@@ -1,5 +1,9 @@
{
"usingComponents": {
"t-button": "tdesign-miniprogram/button/button"
"t-button": "tdesign-miniprogram/button/button",
"search-popup": "/pages/components/search-popup/search-popup",
"card-plugin": "/pages/components/card-plugin/card-plugin",
"t-input": "tdesign-miniprogram/input/input",
"tab-bar-plugin": "/pages/components/tab-bar-plugin/tab-bar-plugin"
}
}
}

View File

@@ -2,12 +2,37 @@ import { Subscribe } from "@/utils/subscribe";
import { setStorage } from "@/utils/util";
Page({
data: {},
data: {
columns: [
{ title: "我的收藏", width: "100px", dataIndex: "name" },
{ title: "我的点赞", width: "200px", dataIndex: "count" },
{ title: "我的评论", width: "300px", dataIndex: "desc" },
],
data: [
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
// { name: "张三", count: 1, desc: "11111" },
],
},
change() {
setStorage("isLogin", 1);
Subscribe.set("isLogin", "zzzuz");
// wx.navigateTo({ url: "/pages/my/my" });
},
searchChange(e: any) {
console.log(e);
},
ok() {
console.log("ok");
},
/**
* 生命周期函数--监听页面加载
*/
@@ -21,7 +46,9 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
onShow() {
wx.hideHomeButton();
},
/**
* 生命周期函数--监听页面隐藏

View File

@@ -2,4 +2,19 @@
<text>pages/my/my.wxml</text>
<t-button bind:tap="change">change</t-button>
</page-plugin>
<view style="padding: 12px;">
<search-popup bind:ok="ok" bind:change="searchChange">
<view slot="content">11111</view>
</search-popup>
<card-plugin>
<view slot="header">11111</view>
<view slot="content">
<view style="height: 70px">11111</view>
</view>
</card-plugin>
</view>
</page-plugin>
<tab-bar-plugin active="my" />

View File

@@ -1 +1,3 @@
/* pages/my/my.wxss */
.container {
height: calc(100vh - var(--td-tab-bar-height, 80rpx) - env(safe-area-inset-bottom));
}