Commit cbf8e834 authored by 肖重湘's avatar 肖重湘

解决鸿蒙设备 type=digit二次渲染输入无效bug

parent cbce2ba9
...@@ -54,7 +54,9 @@ ...@@ -54,7 +54,9 @@
<view class="item-view"> <view class="item-view">
<view class="label-view">单价</view> <view class="label-view">单价</view>
<view class="value-view"> <view class="value-view">
<!-- v-if="show" 解决鸿蒙设备 type="digit"二次渲染输入无效bug-->
<u-input <u-input
v-if="show"
type="digit" type="digit"
:clearable="false" :clearable="false"
:custom-style="customStyle" :custom-style="customStyle"
...@@ -159,7 +161,7 @@ export default { ...@@ -159,7 +161,7 @@ export default {
}, },
disabled() { disabled() {
let flag = false; let flag = false;
this.rules.map(item => { this.rules.map((item) => {
if (!this.form[item.value]) { if (!this.form[item.value]) {
flag = true; flag = true;
} }
...@@ -168,7 +170,7 @@ export default { ...@@ -168,7 +170,7 @@ export default {
} }
}, },
created() { created() {
uni.$on('charge-selected', res => { uni.$on('charge-selected', (res) => {
var form = JSON.parse(res || {}); var form = JSON.parse(res || {});
this.form.unit = form.unit; this.form.unit = form.unit;
this.form.name = form.serviceName; this.form.name = form.serviceName;
...@@ -180,17 +182,13 @@ export default { ...@@ -180,17 +182,13 @@ export default {
methods: { methods: {
open(detail) { open(detail) {
if (detail && detail.uid) { if (detail && detail.uid) {
this.form = { this.form = JSON.parse(JSON.stringify(detail));
...detail } else {
}; this.form = JSON.parse(JSON.stringify(this.defaultInfo));
}else{
this.form = {
...this.defaultInfo
};
} }
// this.$nextTick(() => { this.$nextTick(() => {
this.show = true; this.show = true;
// }); });
}, },
close() { close() {
this.show = false; this.show = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment