feat(fittingRoom): 优化上传功能并调整 UI
- 在 fittingRoom.js 中添加 disableTabs 数组,用于控制不允许上传的分类- 修改 canUpload getter,使用 disableTabs 判断是否允许上传 - 更新 s-grid-clothes.vue 和 s-select-mote.vue 组件,增加上传功能 - 调整上传按钮样式和布局
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user