imeik-bizui 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,10 @@
1
1
  <!-- 我们把ele组件常用属性放在这里,如果会用到更多其他属性可以进行扩展 -->
2
2
  <template>
3
3
  <span>
4
- <span v-if="attrs.isView">{{ myValue || '-' }}</span>
4
+ <div v-if="attrs.isView">
5
+ <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="myValue" :no-absolute="true" :new-value="diffValue" />
6
+ <span v-else>{{ myValue || '-' }}</span>
7
+ </div>
5
8
  <el-input
6
9
  v-else
7
10
  v-model="myValue"
@@ -83,6 +86,14 @@ export default {
83
86
  myValue: undefined
84
87
  }
85
88
  },
89
+ computed: {
90
+ showDiff() {
91
+ return this.attrs.showDiff || false
92
+ },
93
+ diffValue() {
94
+ return this.attrs.diffValue || ''
95
+ }
96
+ },
86
97
  watch: {
87
98
  value: {
88
99
  immediate: true,
@@ -1,7 +1,10 @@
1
1
  <!-- 我们把ele组件常用属性放在这里,如果会用到更多其他属性可以进行扩展 -->
2
2
  <template>
3
3
  <span>
4
- <span v-if="attrs.isView">{{ myValue || '-' }}</span>
4
+ <div v-if="attrs.isView">
5
+ <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="myValue" :no-absolute="true" :new-value="diffValue" />
6
+ <span v-else>{{ myValue || '-' }}</span>
7
+ </div>
5
8
  <el-input
6
9
  v-else
7
10
  v-model="myValue"
@@ -60,6 +63,14 @@ export default {
60
63
  myValue: undefined
61
64
  }
62
65
  },
66
+ computed: {
67
+ showDiff() {
68
+ return this.attrs.showDiff || false
69
+ },
70
+ diffValue() {
71
+ return this.attrs.diffValue || ''
72
+ }
73
+ },
63
74
  watch: {
64
75
  value: {
65
76
  immediate: true,