修改商品信息输入框类型

This commit is contained in:
luofei 2023-05-31 17:43:08 +08:00
parent 8dc86cfa53
commit 837185da45
2 changed files with 10 additions and 7 deletions

View File

@ -39,21 +39,21 @@
{ {
id: 1, id: 1,
label: '售价', label: '售价',
type: 'number', type: 'digit',
model: 'price', model: 'price',
holder: '请填写售价' holder: '请填写售价'
}, },
{ {
id: 2, id: 2,
label: '成本价', label: '成本价',
type: 'number', type: 'digit',
holder: '请填写成本价', holder: '请填写成本价',
model: 'cost' model: 'cost'
}, },
{ {
id: 3, id: 3,
label: '原价', label: '原价',
type: 'number', type: 'digit',
holder: '请填写原价', holder: '请填写原价',
model: 'ot_price' model: 'ot_price'
}, },
@ -76,28 +76,28 @@
{ {
id: 6, id: 6,
label: '重量', label: '重量',
type: 'number', type: 'digit',
holder: '请输入重量', holder: '请输入重量',
model: 'weight' model: 'weight'
}, },
{ {
id: 7, id: 7,
label: '体积', label: '体积',
type: 'number', type: 'digit',
holder: '请输入体积', holder: '请输入体积',
model: 'volume' model: 'volume'
}, },
{ {
id: 8, id: 8,
label: '佣金(一级)', label: '佣金(一级)',
type: 'number', type: 'digit',
holder: '请输入一级佣金', holder: '请输入一级佣金',
model: 'extension_one' model: 'extension_one'
}, },
{ {
id: 8, id: 8,
label: '佣金(二级)', label: '佣金(二级)',
type: 'number', type: 'digit',
holder: '请输入二级佣金', holder: '请输入二级佣金',
model: 'extension_two' model: 'extension_two'
} }

View File

@ -16,6 +16,9 @@
<view class="container_input_item_value" v-if="item.type == 'number'"> <view class="container_input_item_value" v-if="item.type == 'number'">
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" /> <input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view> </view>
<view class="container_input_item_value" v-if="item.type == 'digit'">
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'input'"> <view class="container_input_item_value" v-if="item.type == 'input'">
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" /> <input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view> </view>