This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
</view>
|
||||
<view class="modal-body">
|
||||
<view class="form-item">
|
||||
<text class="label">分类</text>
|
||||
<text class="label"><text class="required">*</text>分类</text>
|
||||
<picker :range="categories" range-key="name" @change="onCategoryChange">
|
||||
<view class="picker">
|
||||
{{ form.categoryId ? getCategoryName(form.categoryId) : '请选择分类' }}
|
||||
@@ -218,6 +218,10 @@ export default {
|
||||
return cat ? cat.name : ''
|
||||
},
|
||||
async saveProduct() {
|
||||
if (!this.form.categoryId) {
|
||||
uni.showToast({ title: '请选择分类', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (!this.form.name) {
|
||||
uni.showToast({ title: '请输入商品名称', icon: 'none' })
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user