99 lines
1.9 KiB
Vue
99 lines
1.9 KiB
Vue
<template>
|
|
<view class='content'>
|
|
|
|
<u--form :model="model1" :rules="rules" ref="uForm" labelPosition="top"
|
|
:labelStyle="{fontSize:'32rpx',color:'#444444'}" labelWidth='100'>
|
|
<view class="good-baseInfo">
|
|
<u-form-item label="商品标题" prop="userInfo.name" ref="item1">
|
|
|
|
<u--input placeholder="建议描述产品品牌、名称" v-model="text"></u--input>
|
|
</u-form-item>
|
|
<u-form-item class='formItem' label="商品主图" prop="userInfo.name" ref="item1">
|
|
<uploadImgVideo />
|
|
</u-form-item>
|
|
<u-form-item label="商品细节图" prop="userInfo.name" ref="item1">
|
|
<uploadImgVideo />
|
|
</u-form-item>
|
|
</view>
|
|
|
|
</u--form>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uploadImgVideo from "../addGood/components/uploadImgVideo.vue"
|
|
export default {
|
|
components: {
|
|
uploadImgVideo,
|
|
},
|
|
data() {
|
|
return {
|
|
showSex: false,
|
|
model1: {
|
|
userInfo: {
|
|
name: '',
|
|
sex: '',
|
|
},
|
|
},
|
|
range: [{
|
|
value: 0,
|
|
text: "篮球"
|
|
},
|
|
{
|
|
value: 1,
|
|
text: "足球"
|
|
},
|
|
{
|
|
value: 2,
|
|
text: "游泳"
|
|
},
|
|
],
|
|
text: "",
|
|
|
|
rules: {
|
|
// 'userInfo.name': {
|
|
// type: 'string',
|
|
// required: true,
|
|
// message: '请填写姓名',
|
|
// trigger: ['blur', 'change']
|
|
// },
|
|
// 'userInfo.sex': {
|
|
// type: 'string',
|
|
// max: 1,
|
|
// required: true,
|
|
// message: '请选择男或女',
|
|
// trigger: ['blur', 'change']
|
|
// },
|
|
},
|
|
radio: '',
|
|
switchVal: false
|
|
};
|
|
},
|
|
methods: {
|
|
sexSelect(e) {
|
|
this.model1.userInfo.sex = e.name
|
|
this.$refs.uForm.validateField('userInfo.sex')
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
</script>
|
|
|
|
<style lang='scss'>
|
|
.content {
|
|
width: 100vw;
|
|
min-height: 100vh;
|
|
background-color: #F1F1F1;
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
.good-baseInfo {
|
|
background-color: white;
|
|
padding: 30rpx;
|
|
}
|
|
|
|
|
|
}
|
|
</style> |