mali-applet-ui 0.1.20 → 0.1.22
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.
- package/components/ml-form-item/ml-form-item.vue +14 -0
- package/components/ml-list-item/ml-list-item.vue +2 -1
- package/components/ml-list-menu-group/ml-list-menu-group.vue +2 -1
- package/components/ml-list-menu-item/ml-list-menu-item.vue +2 -1
- package/components/ml-tab-pane/ml-tab-pane.vue +19 -1
- package/package.json +1 -1
|
@@ -60,6 +60,12 @@ export default {
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
watch: {
|
|
63
|
+
title () {
|
|
64
|
+
this.updateProp('title')
|
|
65
|
+
},
|
|
66
|
+
field () {
|
|
67
|
+
this.updateProp('field')
|
|
68
|
+
},
|
|
63
69
|
itemValue () {
|
|
64
70
|
if (this.form) {
|
|
65
71
|
this.form.validateField(this.field)
|
|
@@ -146,6 +152,14 @@ export default {
|
|
|
146
152
|
}
|
|
147
153
|
},
|
|
148
154
|
methods: {
|
|
155
|
+
updateProp (prop) {
|
|
156
|
+
if (this.form) {
|
|
157
|
+
const item = this.form.itemList.find(item => item.mId === this.mId)
|
|
158
|
+
if (item) {
|
|
159
|
+
item[prop] = this[prop]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
149
163
|
matchComponent (name) {
|
|
150
164
|
return this.renderOpts.name === name
|
|
151
165
|
},
|
|
@@ -90,11 +90,12 @@ export default {
|
|
|
90
90
|
}
|
|
91
91
|
.ml-list-item-left-icon,
|
|
92
92
|
.ml-list-item-right-icon {
|
|
93
|
+
width: 60rpx;
|
|
94
|
+
text-align: center;
|
|
93
95
|
display: flex;
|
|
94
96
|
flex-direction: row;
|
|
95
97
|
align-items: center;
|
|
96
98
|
flex-shrink: 0;
|
|
97
|
-
padding: 0 10rpx;
|
|
98
99
|
}
|
|
99
100
|
.ml-list-item-left-icon {
|
|
100
101
|
font-size: 38rpx;
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
+
import XEUtils from 'xe-utils'
|
|
9
|
+
|
|
8
10
|
export default {
|
|
9
11
|
name: 'MlTabPane',
|
|
10
12
|
options: {
|
|
@@ -26,6 +28,14 @@ export default {
|
|
|
26
28
|
mId: XEUtils.uniqueId('mlTabPane')
|
|
27
29
|
}
|
|
28
30
|
},
|
|
31
|
+
watch: {
|
|
32
|
+
name () {
|
|
33
|
+
this.updateProp('name')
|
|
34
|
+
},
|
|
35
|
+
title () {
|
|
36
|
+
this.updateProp('title')
|
|
37
|
+
}
|
|
38
|
+
},
|
|
29
39
|
mounted () {
|
|
30
40
|
this.$nextTick(() => {
|
|
31
41
|
if (this.tabs) {
|
|
@@ -39,10 +49,18 @@ export default {
|
|
|
39
49
|
},
|
|
40
50
|
beforeDestroy () {
|
|
41
51
|
if (this.tabs) {
|
|
42
|
-
XEUtils.remove(this.tabs.
|
|
52
|
+
XEUtils.remove(this.tabs.tabList, item => item.mId === this.mId)
|
|
43
53
|
}
|
|
44
54
|
},
|
|
45
55
|
computed: {
|
|
56
|
+
updateProp (prop) {
|
|
57
|
+
if (this.tabs) {
|
|
58
|
+
const item = this.tabs.tabList.find(item => item.mId === this.mId)
|
|
59
|
+
if (item) {
|
|
60
|
+
item[prop] = this[prop]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
46
64
|
selectTab () {
|
|
47
65
|
return this.tabs ? this.tabs.value : null
|
|
48
66
|
}
|