mali-applet-ui 0.0.61 → 0.0.64

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 || '', (status || showStatus) && selectStatus ? `status-${selectStatus}` : '', {'is-underline': underline}]">{{ selectLabel }}</text>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -12,14 +12,21 @@ export default {
12
12
  value: [Number, String],
13
13
  options: Array,
14
14
  status: String,
15
+ showStatus: Boolean,
15
16
  underline: Boolean,
16
17
  optionProps: Object,
17
18
  className: String
18
19
  },
19
20
  computed: {
20
- selectLabel () {
21
+ selectItem () {
21
22
  const item = this.options ? this.options.find(item => item[this.optValueField] === this.value) : null
22
- return item ? item[this.optLabelField] : this.value
23
+ return item
24
+ },
25
+ selectLabel () {
26
+ return this.selectItem ? this.selectItem[this.optLabelField] : this.value
27
+ },
28
+ selectStatus () {
29
+ return this.status || this.selectItem[this.optStatusField]
23
30
  },
24
31
  optOptions () {
25
32
  return Object.assign({}, this.optionProps)
@@ -29,6 +36,9 @@ export default {
29
36
  },
30
37
  optValueField () {
31
38
  return this.optOptions.value || 'value'
39
+ },
40
+ optStatusField () {
41
+ return this.optOptions.status || 'status'
32
42
  }
33
43
  }
34
44
  }
@@ -11,9 +11,6 @@ import * as echarts from './echarts';
11
11
 
12
12
  export default {
13
13
  name: 'MlEcharts',
14
- options: {
15
- virtualHost: true
16
- },
17
14
  props: {
18
15
  options: Object,
19
16
  height:String,
@@ -24,9 +24,6 @@
24
24
  <script>
25
25
  export default {
26
26
  name: 'MlForm',
27
- options: {
28
- virtualHost: true
29
- },
30
27
  props: {
31
28
  value: Object,
32
29
  data: Object,
@@ -17,9 +17,6 @@
17
17
  <script>
18
18
  export default {
19
19
  name: 'MlListMenuGroup',
20
- options: {
21
- virtualHost: true
22
- },
23
20
  props: {
24
21
  title: String,
25
22
  prefixIcon: String,
@@ -82,7 +82,7 @@ export default {
82
82
  value = item[this.optValueField]
83
83
  }
84
84
  this.$emit('input', value)
85
- this.$emit('change', { value })
85
+ this.$emit('change', { value, option: item })
86
86
  }
87
87
  }
88
88
  }
@@ -70,9 +70,6 @@ import XEUtils from 'xe-utils'
70
70
  */
71
71
  export default {
72
72
  name: 'MlTable',
73
- options: {
74
- virtualHost: true
75
- },
76
73
  props: {
77
74
  loading: Boolean,
78
75
  className: String,
@@ -20,9 +20,6 @@
20
20
  <script>
21
21
  export default {
22
22
  name: 'MlTabs',
23
- options: {
24
- virtualHost: true
25
- },
26
23
  props: {
27
24
  value: [String, Number],
28
25
  options: Array,
@@ -31,9 +31,6 @@ import globalStore from '../../config/store'
31
31
 
32
32
  export default {
33
33
  name: 'MlUpload',
34
- options: {
35
- virtualHost: true
36
- },
37
34
  props: {
38
35
  value: {
39
36
  type: Array,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.61",
3
+ "version": "0.0.64",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",