Commit 8d9b8156 by zhangquan

细节优化

1 parent 47566ef2
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
inputFn(e){ inputFn(e){
e = e ? String(e) : '' e = e ? String(e) : ''
this.intDigit = this.intDigit || 6 this.intDigit = this.intDigit || 6
this.precise = this.precise || 2 this.precise = this.precise || this.precise==0 || this.precise=='0' ? this.precise : 2
let value = e let value = e
if(this.maxVal){ if(this.maxVal){
if(+this.maxVal<= +e) value = this.maxVal //加等号是因为 '500' == '500.' 导致多了点 if(+this.maxVal<= +e) value = this.maxVal //加等号是因为 '500' == '500.' 导致多了点
...@@ -39,6 +39,7 @@ export default { ...@@ -39,6 +39,7 @@ export default {
blurFn(e){ blurFn(e){
let value = e.target.value let value = e.target.value
if(this.minVal && +this.minVal>=value) value = this.minVal if(this.minVal && +this.minVal>=value) value = this.minVal
if(value && value.charAt(value.length-1)=='.') value = value.substr(0 ,value.length-1)
this.$emit('input', value) this.$emit('input', value)
} }
} }
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
<el-input v-model="channelForm.channelChildName" maxlength="12" show-word-limit></el-input> <el-input v-model="channelForm.channelChildName" maxlength="12" show-word-limit></el-input>
</el-form-item> </el-form-item>
<el-form-item label="频道顺序:" prop="sort"> <el-form-item label="频道顺序:" prop="sort">
<el-input v-model="channelForm.sort" maxlength="12" show-word-limit></el-input> <!-- <el-input v-model="channelForm.sort" show-word-limit></el-input> -->
<format-input :intDigit="4" :precise="0" show-word-limit v-model="channelForm.sort"></format-input>
</el-form-item> </el-form-item>
<span v-if="channelForm.channelType == 1"> <span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle"> <el-form-item label="频道主题:" prop="channelStyle">
...@@ -184,6 +185,8 @@ export default { ...@@ -184,6 +185,8 @@ export default {
message: res.code == '0' ? '编辑成功' : res.message, message: res.code == '0' ? '编辑成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
}).finally(end=>{
this.loading = false
}) })
} }
}) })
......
...@@ -170,7 +170,12 @@ export default { ...@@ -170,7 +170,12 @@ export default {
channelIds: this.editForm.channelIds, channelIds: this.editForm.channelIds,
vehicleSeriesRequests: this.editForm?.channelIds?.includes(5) ? this.editForm.vehicleSeriesRequests : [] vehicleSeriesRequests: this.editForm?.channelIds?.includes(5) ? this.editForm.vehicleSeriesRequests : []
} }
this.loading = true const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.store.configMerchant(params).then(res => { this.$apis.store.configMerchant(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.loading = false this.loading = false
...@@ -181,6 +186,8 @@ export default { ...@@ -181,6 +186,8 @@ export default {
message: res.code == '0' ? '编辑成功' : res.message, message: res.code == '0' ? '编辑成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
}).finally(end =>{
loading.close()
}) })
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!