feat(fittingRoom): 优化上传功能并调整 UI

- 在 fittingRoom.js 中添加 disableTabs 数组,用于控制不允许上传的分类- 修改 canUpload getter,使用 disableTabs 判断是否允许上传
- 更新 s-grid-clothes.vue 和 s-select-mote.vue 组件,增加上传功能
- 调整上传按钮样式和布局
This commit is contained in:
guigongli
2025-09-19 22:43:03 +08:00
parent 4ea873c1bd
commit 657631f5bf
3 changed files with 49 additions and 7 deletions
+3 -1
View File
@@ -8,13 +8,15 @@ const fittingRoom = defineStore({
type: true, // true: 我的衣橱, false: 衣服库
tab: 0, // 对应下面tabs的序号
tabs: ['全部', '上衣', '下装', '连衣裙', '外套', '发型'],
disableTabs: [5], // 不允许上传图的tab索引
currentClothes: [], // 当前选的衣服
}),
getters: {
// 能上传图片的场景
canUpload(state) {
console.log(this.type, this.tab, state.type, '123');
return this.type && this.tab > 0;
// 除了发型其他都能上传
return this.type && !this.disableTabs.includes(this.tab);
},
},
actions: {