Skip to content

Commit

Permalink
bug修复
Browse files Browse the repository at this point in the history
Eratosici authored and Eratosici committed Jan 11, 2022
1 parent b03b532 commit df71802
Showing 3 changed files with 28 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mall4v/src/views/modules/order/order.vue
Original file line number Diff line number Diff line change
@@ -154,6 +154,8 @@
</div>
</div>
</div>
<!---->
<div class="empty-tips">暂无数据</div>
<el-pagination @size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="page.pageIndex"
@@ -486,5 +488,12 @@ export default {
white-space: nowrap;
text-overflow: ellipsis;
}
.empty-tips {
display: block;
width: 100%;
text-align: center;
margin: 50px 0;
color: #999;
}
}
</style>
13 changes: 13 additions & 0 deletions mall4v/src/views/modules/prod/spec-add-or-update.vue
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@
<template slot-scope="scope">
<el-input placeholder="请输入内容"
v-model="scope.row.propName"
maxlength="10"
show-word-limit
clearable></el-input>
</template>
</el-table-column>
@@ -26,6 +28,8 @@
<el-input placeholder="请输入内容"
v-model="item.propValue"
@clear="clearProdPropValues"
maxlength="20"
show-word-limit
clearable></el-input>
</el-col>
<el-col :span="4">
@@ -87,6 +91,11 @@ export default {
}
this.dataList[0].prodPropValues = temp
}
if (!this.dataList[0].propName.trim()) {
this.dataList[0].propName = ''
this.$message.error('属性名不能为空')
return
}
if (this.dataList[0].prodPropValues.length < 1) {
this.dataList[0].prodPropValues = [{ valueId: 0 }]
this.$message.error('规格项不能为空')
@@ -96,6 +105,10 @@ export default {
this.$message.error('属性名称长度不能大于10')
return
}
if (this.dataList[0].prodPropValues.find(el => !el.propValue.trim())) {
this.$message.error('属性值不能为空')
return
}
if (this.dataList[0].prodPropValues.find(el => el.propValue.length > 20)) {
this.$message.error('属性值长度不能大于20')
return
7 changes: 6 additions & 1 deletion mall4v/src/views/modules/sys/area-add-or-update.vue
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
label-width="100px">
<el-form-item label="地区名称"
prop="areaName">
<el-input v-model="dataForm.areaName"></el-input>
<el-input v-model="dataForm.areaName" placeholder="请输入地区名称" maxlength="50" show-word-limit></el-input>
</el-form-item>
<el-form-item label="上级地区"
prop="parentId">
@@ -98,6 +98,11 @@ export default {
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
if (!this.dataForm.areaName.trim()) {
this.dataForm.areaName = ''
this.$message.error('地区名称不能为空')
return
}
this.$http({
url: this.$http.adornUrl('/admin/area'),
method: this.dataForm.areaId ? 'put' : 'post',

0 comments on commit df71802

Please sign in to comment.