feat(fittingRoom): 优化上传功能并调整 UI
- 在 fittingRoom.js 中添加 disableTabs 数组,用于控制不允许上传的分类- 修改 canUpload getter,使用 disableTabs 判断是否允许上传 - 更新 s-grid-clothes.vue 和 s-select-mote.vue 组件,增加上传功能 - 调整上传按钮样式和布局
This commit is contained in:
@@ -7,8 +7,20 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<image class="shangchuan" mode="heightFix" src="/static/shangchuan.png"></image>
|
||||
<uni-file-picker
|
||||
:auto-upload="false"
|
||||
:del-icon="false"
|
||||
:disable-preview="true"
|
||||
:image-styles="imageStyle"
|
||||
:sizeType="sizeType"
|
||||
class="upload"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
@select="selectPic"
|
||||
>选择
|
||||
</uni-file-picker>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="switchModels">
|
||||
<view class="item-text"></view>
|
||||
<image class="item-image" mode="widthFix" src="/static/mote.png"></image>
|
||||
</view>
|
||||
@@ -16,9 +28,24 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import sheep from '../../../sheep';
|
||||
const sizeType = ['original'];
|
||||
const imageStyle = {
|
||||
width: 200,
|
||||
height: 200,
|
||||
};
|
||||
|
||||
const fittingRoom = sheep.$store('fittingRoom');
|
||||
|
||||
function selectPic(...data) {
|
||||
console.log(fittingRoom.tab);
|
||||
console.log('🚀 ~ selectPic 🐶47 ~ data: ', data);
|
||||
}
|
||||
|
||||
|
||||
function switchModels() {
|
||||
console.log("🚀 ~ ~ fittingRoom: ", 12);
|
||||
}
|
||||
|
||||
console.log('🚀 ~ 🐶9 ~ fittingRoom: ', fittingRoom);
|
||||
|
||||
function expansion(e) {
|
||||
@@ -72,6 +99,14 @@
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
.upload {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.item-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user