mali-applet-ui 0.0.62 → 0.0.63

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,5 +1,5 @@
1
1
  <template>
2
- <text class="ml-dict-type" :class="[className || '', status ? `status-${status}` : '', {'is-underline': underline}]">{{ selectLabel }}</text>
2
+ <text class="ml-dict-type" :class="[className || '', selectStatus ? `status-${selectStatus}` : '', {'is-underline': underline}]">{{ selectLabel }}</text>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -17,9 +17,15 @@ export default {
17
17
  className: String
18
18
  },
19
19
  computed: {
20
- selectLabel () {
20
+ selectItem () {
21
21
  const item = this.options ? this.options.find(item => item[this.optValueField] === this.value) : null
22
- return item ? item[this.optLabelField] : this.value
22
+ return item
23
+ },
24
+ selectLabel () {
25
+ return this.selectItem ? this.selectItem[this.optLabelField] : this.value
26
+ },
27
+ selectStatus () {
28
+ return this.status || this.selectItem[this.optStatusField]
23
29
  },
24
30
  optOptions () {
25
31
  return Object.assign({}, this.optionProps)
@@ -29,6 +35,9 @@ export default {
29
35
  },
30
36
  optValueField () {
31
37
  return this.optOptions.value || 'value'
38
+ },
39
+ optStatusField () {
40
+ return this.optOptions.status || 'status'
32
41
  }
33
42
  }
34
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",