Compare commits

...

2 Commits

Author SHA1 Message Date
ibuler
ce614bba7c fix(assets): 修复创建网关没有密码的问题 2021-07-20 19:30:56 +08:00
ibuler
29d3647579 perf: 优化工单详情 2021-07-20 19:30:17 +08:00
2 changed files with 15 additions and 6 deletions

View File

@@ -104,7 +104,7 @@ export default {
return route
},
cleanFormValue(values) {
if (!values.update_password) {
if (this.$route.params.id && !values.update_password) {
delete values['password']
}
return values

View File

@@ -1,4 +1,7 @@
<script type="text/jsx">
<template>
<p class="item-value">{{ iValue }}</p>
</template>
<script>
export default {
name: 'ItemValue',
props: {
@@ -15,15 +18,21 @@ export default {
default: null
}
},
render(h) {
if (typeof this.formatter === 'function') {
return this.formatter(this.item, this.value)
computed: {
iValue() {
let value = this.value
if (typeof this.formatter === 'function') {
value = this.formatter(this.item, this.value)
}
return value
}
return <span>{this.value}</span>
}
}
</script>
<style scoped>
.item-value {
word-break: break-word;
}
</style>