mali-applet-ui 0.0.35 → 0.0.38

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.
Files changed (31) hide show
  1. package/components/ml-approval-type/ml-approval-type.vue +50 -0
  2. package/components/ml-button/ml-button.vue +60 -23
  3. package/components/ml-checkbox/ml-checkbox.vue +6 -4
  4. package/components/ml-checkbox-group/ml-checkbox-group.vue +1 -1
  5. package/components/ml-chunk-group/ml-chunk-group.vue +3 -3
  6. package/components/ml-chunk-item/ml-chunk-item.vue +10 -2
  7. package/components/ml-col/ml-col.vue +16 -1
  8. package/components/ml-fixed-bottom/ml-fixed-bottom.vue +33 -0
  9. package/components/ml-form/ml-form.vue +1 -1
  10. package/components/ml-icon/ml-icon.vue +20 -1
  11. package/components/ml-input/ml-input.vue +9 -3
  12. package/components/ml-list-group/ml-list-group.vue +32 -0
  13. package/components/ml-list-item/ml-list-item.vue +88 -0
  14. package/components/ml-list-menu-group/ml-list-menu-group.vue +3 -3
  15. package/components/ml-list-menu-item/ml-list-menu-item.vue +26 -5
  16. package/components/ml-month-picker/ml-month-picker.vue +1 -1
  17. package/components/ml-number-input/ml-number-input.vue +1 -1
  18. package/components/ml-radio/ml-radio.vue +6 -4
  19. package/components/ml-radio-button/ml-radio-button.vue +1 -1
  20. package/components/ml-radio-group/ml-radio-group.vue +1 -1
  21. package/components/ml-row/ml-row.vue +2 -1
  22. package/components/ml-section/ml-section.vue +1 -1
  23. package/components/ml-select-picker/ml-select-picker.vue +22 -19
  24. package/components/ml-status-tag/ml-status-tag.vue +52 -0
  25. package/components/ml-switch/ml-switch.vue +27 -0
  26. package/components/ml-tab-pane/ml-tab-pane.vue +35 -0
  27. package/components/ml-tabs/ml-tabs.vue +35 -11
  28. package/components/ml-textarea/ml-textarea.vue +1 -1
  29. package/components/ml-year-picker/ml-year-picker.vue +1 -1
  30. package/iconfont.css +681 -673
  31. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <view class="ml-approval-type" :class="className" :style="styles">{{ currLabel }}</view>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'MlApprovalType',
8
+ options: {
9
+ virtualHost: true
10
+ },
11
+ props: {
12
+ value: [String, Number],
13
+ className: String
14
+ },
15
+ data () {
16
+ return {
17
+ statusList: [
18
+ { value: 0, label: '起草中', color: '' },
19
+ { value: 1, label: '审批中', color: '#09B2FE' },
20
+ { value: 2, label: '已通过', color: '#42E38D' },
21
+ { value: 3, label: '已驳回', color: '#FF4A4A' },
22
+ { value: 4, label: '会签中', color: '#F4788E' },
23
+ { value: 5, label: '处理中', color: '#FFA500' },
24
+ { value: 6, label: '已完成', color: '#2497FF' }
25
+ ]
26
+ }
27
+ },
28
+ computed: {
29
+ selectItem () {
30
+ return this.statusList.find(item => String(item.value) === String(this.value))
31
+ },
32
+ currLabel () {
33
+ return this.selectItem ? this.selectItem.label : ''
34
+ },
35
+ styles () {
36
+ return this.selectItem && this.selectItem.color? `background:${this.selectItem.color};` : ''
37
+ }
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <style lang="scss">
43
+ .ml-approval-type {
44
+ display: inline-block;
45
+ color: #ffffff;
46
+ padding: 6rpx 18rpx;
47
+ border-radius: 10rpx;
48
+ font-size: 24rpx;
49
+ }
50
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <button class="ml-button" :class="[className, `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
2
+ <button class="ml-button" :class="[className || '', `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
3
3
  <slot>{{ content }}</slot>
4
4
  </button>
5
5
  </template>
@@ -18,10 +18,23 @@ export default {
18
18
  type: String,
19
19
  default: 'button'
20
20
  },
21
+ redirect: Boolean,
22
+ url: String,
21
23
  className: String
22
24
  },
23
25
  methods: {
24
26
  tapEvent () {
27
+ if (this.url) {
28
+ if (this.redirect) {
29
+ uni.redirectTo({
30
+ url: this.url
31
+ })
32
+ } else {
33
+ uni.navigateTo({
34
+ url: this.url
35
+ })
36
+ }
37
+ }
25
38
  this.$emit('tap', {})
26
39
  },
27
40
  clickEvent () {
@@ -33,35 +46,59 @@ export default {
33
46
 
34
47
  <style lang="scss">
35
48
  .ml-button {
36
- width: 100%;
37
- margin: 0 10rpx;
49
+ &.type-text {
50
+ display: inline;
51
+ border: 0;
52
+ padding: 0 10rpx;
53
+ line-height: 1.5;
54
+ vertical-align: middle;
55
+ background: transparent;
56
+ &.status-primary {
57
+ color: $uni-color-primary;
58
+ }
59
+ &.status-success {
60
+ color: $uni-color-success;
61
+ }
62
+ &.status-info {
63
+ color: #909399;
64
+ }
65
+ &.status-warning {
66
+ color: $uni-color-warning;
67
+ }
68
+ &.status-danger {
69
+ color: $uni-color-error;
70
+ }
71
+ }
38
72
  &.type-button {
73
+ width: 100%;
74
+ margin: 0 10rpx;
75
+ padding: 0 20rpx;
39
76
  line-height: 80rpx;
40
77
  border: 1px solid #e5e5e5;
41
78
  border-radius: 10rpx;
79
+ &.status-primary {
80
+ color: #ffffff;
81
+ background: $uni-color-primary;
82
+ }
83
+ &.status-success {
84
+ color: #ffffff;
85
+ background: $uni-color-success;
86
+ }
87
+ &.status-info {
88
+ color: #ffffff;
89
+ background: #909399;
90
+ }
91
+ &.status-warning {
92
+ color: #ffffff;
93
+ background: $uni-color-warning;
94
+ }
95
+ &.status-danger {
96
+ color: #ffffff;
97
+ background: $uni-color-error;
98
+ }
42
99
  }
43
100
  &.is-round {
44
101
  border-radius: 40rpx;
45
102
  }
46
- &.status-primary {
47
- color: #ffffff;
48
- background: $uni-color-primary;
49
- }
50
- &.status-success {
51
- color: #ffffff;
52
- background: $uni-color-success;
53
- }
54
- &.status-info {
55
- color: #ffffff;
56
- background: #909399;
57
- }
58
- &.status-warning {
59
- color: #ffffff;
60
- background: $uni-color-warning;
61
- }
62
- &.status-danger {
63
- color: #ffffff;
64
- background: $uni-color-error;
65
- }
66
103
  }
67
104
  </style>
@@ -1,7 +1,9 @@
1
1
  <template>
2
- <view class="ml-checkbox" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
3
- <ml-icon class="checkbox-icon" :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
4
- <text class="checkbox-content">
2
+ <view class="ml-checkbox" :class="[className || '', {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
3
+ <text class="ml-checkbox-icon">
4
+ <ml-icon :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
5
+ </text>
6
+ <text class="ml-checkbox-content">
5
7
  <slot>
6
8
  <text>{{ content }}</text>
7
9
  </slot>
@@ -56,7 +58,7 @@ export default {
56
58
  &.is-checked {
57
59
  color: $uni-color-primary;
58
60
  }
59
- .checkbox-icon {
61
+ .ml-checkbox-icon {
60
62
  display: inline-block;
61
63
  width: 40rpx;
62
64
  margin-right: 5rpx;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-radio-group" :class="[className, {'is-disabled': disabled, 'is-vertical': vertical}]">
2
+ <view class="ml-radio-group" :class="[className || '', {'is-disabled': disabled, 'is-vertical': vertical}]">
3
3
  <view class="ml-radio-group-item" v-for="(item, index) in options" :key="index">
4
4
  <ml-checkbox :value="value.includes(item.value) ? item.value : null" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-checkbox>
5
5
  </view>
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <view class="ml-chunk-group" :class="[className, status ? `status-${status}` : '', align ? `align-${align}` : '', {'is-vertical': vertical, 'is-header': title || $slots.title}]">
2
+ <view class="ml-chunk-group" :class="[className || '', status ? `status-${status}` : '', align ? `align-${align}` : '', {'is-vertical': vertical, 'is-header': title || $slots.title}]">
3
3
  <view v-if="title || $slots.title" class="ml-chunk-group-title">
4
4
  <slot name="title">
5
5
  <view v-if="prefixIcon" class="ml-chunk-group-left-icon">
6
- <ml-icon :className="prefixIcon"></ml-icon>
6
+ <ml-icon :className="prefixIcon" :status="status"></ml-icon>
7
7
  </view>
8
8
  <text class="ml-chunk-group-title-content">{{ title }}</text>
9
9
  </slot>
@@ -47,7 +47,7 @@ export default {
47
47
  display: flex;
48
48
  flex-direction: row;
49
49
  align-items: center;
50
- height: 70rpx;
50
+ height: 80rpx;
51
51
  padding: 0 20rpx ;
52
52
  }
53
53
  .ml-chunk-group-left-icon {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-chunk-item" :class="[className, span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': width, 'is-vertical': isVertical}]" :style="styles">
2
+ <view class="ml-chunk-item" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': width, 'is-vertical': isVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
@@ -29,6 +29,14 @@ export default {
29
29
  styles () {
30
30
  return this.width ? `width: ${this.width};` : ''
31
31
  }
32
+ },
33
+ methods: {
34
+ clickEvent () {
35
+ this.$emit('click', {})
36
+ },
37
+ tapEvent () {
38
+ this.$emit('tap', {})
39
+ }
32
40
  }
33
41
  }
34
42
  </script>
@@ -37,7 +45,7 @@ export default {
37
45
  .ml-chunk-item {
38
46
  display: flex;
39
47
  flex-direction: column;
40
- padding: 10rpx;
48
+ padding: 20rpx 10rpx;
41
49
  line-height: 50rpx;
42
50
  $spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
43
51
  37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-col" :class="[className, span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
2
+ <view class="ml-col" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-flex': flex,'is-fixed': width || shrink}]" :style="styles">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
@@ -12,6 +12,8 @@ export default {
12
12
  },
13
13
  props: {
14
14
  span: [String, Number],
15
+ flex: Boolean,
16
+ shrink: Boolean,
15
17
  align: String,
16
18
  width: String,
17
19
  className: String
@@ -29,6 +31,19 @@ export default {
29
31
  $spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
30
32
  37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
31
33
  70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
34
+ &.is-flex {
35
+ display: flex;
36
+ flex-direction: row;
37
+ &.align-left {
38
+ justify-content: left;
39
+ }
40
+ &.align-center {
41
+ justify-content: center;
42
+ }
43
+ &.align-right {
44
+ justify-content: right;
45
+ }
46
+ }
32
47
  &.align-left {
33
48
  text-align: left;
34
49
  }
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <view class="ml-fixed-bottom" :class="[className || '']" :style="styles">
3
+ <slot></slot>
4
+ </view>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'MlFixedBottom',
10
+ options: {
11
+ virtualHost: true
12
+ },
13
+ props: {
14
+ bottom: String,
15
+ className: String
16
+ },
17
+ computed: {
18
+ styles () {
19
+ return this.bottom ? `bottom:${this.bottom};` : ''
20
+ }
21
+ }
22
+ }
23
+ </script>
24
+
25
+ <style lang="scss">
26
+ .ml-fixed-bottom {
27
+ display: flex;
28
+ flex-direction: row;
29
+ position: fixed;
30
+ width: 100%;
31
+ bottom: 40rpx;
32
+ }
33
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-form" :class="[className, {'is-vertical': vertical}]">
2
+ <view class="ml-form" :class="[className || '', {'is-vertical': vertical}]">
3
3
  <uni-forms ref="uniForm" :modelValue="data" :rules="formRules" :label-position="vertical ? 'top' : 'left'">
4
4
  <slot></slot>
5
5
  </uni-forms>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <text class="ml-icon" :class="[className, name ? `${prefix}${name}` : '']" @click="clickEvent"></text>
2
+ <text class="ml-icon" :class="[className || '', status ? `status-${status}` : '', name ? `${prefix}${name}` : '']" @click="clickEvent"></text>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -10,6 +10,7 @@ export default {
10
10
  },
11
11
  props: {
12
12
  name: String,
13
+ status: String,
13
14
  className: String
14
15
  },
15
16
  data () {
@@ -27,4 +28,22 @@ export default {
27
28
 
28
29
  <style lang="scss">
29
30
  @import '../../iconfont.css';
31
+
32
+ .ml-icon {
33
+ &.status-primary {
34
+ color: $uni-color-primary;
35
+ }
36
+ &.status-success {
37
+ color: $uni-color-success;
38
+ }
39
+ &.status-info {
40
+ color: #909399;
41
+ }
42
+ &.status-warning {
43
+ color: $uni-color-warning;
44
+ }
45
+ &.status-danger {
46
+ color: $uni-color-error;
47
+ }
48
+ }
30
49
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-input" :class="[className, {'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}]">
2
+ <view class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}]">
3
3
  <view v-if="prefixIcon || type === 'search'" class="ml-input-prefix-icon">
4
4
  <ml-icon v-if="prefixIcon" :class="prefixIcon"></ml-icon>
5
5
  <ml-icon v-else name="search"></ml-icon>
@@ -10,7 +10,8 @@
10
10
  class="ml-input-inp"
11
11
  autocomplete="off"
12
12
  :placeholder="placeholder"
13
- @input="inputEvent" />
13
+ @input="inputEvent"
14
+ @confirm="confirmEvent"/>
14
15
  <view v-if="suffixIcon" class="ml-input-suffix-icon">
15
16
  <ml-icon :class="suffixIcon"></ml-icon>
16
17
  </view>
@@ -55,6 +56,10 @@ export default {
55
56
  const value = this.inpVal
56
57
  this.$emit('input', value)
57
58
  this.$emit('change', { value })
59
+ },
60
+ confirmEvent () {
61
+ const value = this.inpVal
62
+ this.$emit('confirm', { value })
58
63
  }
59
64
  }
60
65
  }
@@ -64,11 +69,11 @@ export default {
64
69
  .ml-input {
65
70
  display: flex;
66
71
  flex-direction: row;
67
- font-size: $uni-font-size-base;
68
72
  .ml-input-inp {
69
73
  padding: 0 20rpx;
70
74
  height: 70rpx;
71
75
  width: 100%;
76
+ font-size: $uni-font-size-base;
72
77
  }
73
78
  .ml-input-prefix-icon,
74
79
  .ml-input-suffix-icon {
@@ -76,6 +81,7 @@ export default {
76
81
  flex-shrink: 0;
77
82
  align-items: center;
78
83
  border: 1px solid #e5e5e5;
84
+ font-size: 30rpx;
79
85
  }
80
86
  .ml-input-prefix-icon {
81
87
  padding-left: 20rpx;
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <view class="ml-list-group" :class="className">
3
+ <view class="ml-list-group-content">
4
+ <scroll-view scroll-y>
5
+ <slot></slot>
6
+ </scroll-view>
7
+ </view>
8
+ </view>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'MlListGroup',
14
+ options: {
15
+ virtualHost: true
16
+ },
17
+ props: {
18
+ title: String,
19
+ className: String
20
+ }
21
+ }
22
+ </script>
23
+
24
+ <style lang="scss">
25
+ .ml-list-group {
26
+ padding: 0 10rpx;
27
+ .ml-list-group-content {
28
+ display: flex;
29
+ flex-direction: column;
30
+ }
31
+ }
32
+ </style>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <view class="ml-list-item" :class="className" @click="clickEvent" @tap="tapEvent">
3
+ <view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-item-left-icon">
4
+ <ml-icon :className="prefixIcon"></ml-icon>
5
+ </view>
6
+ <view class="ml-list-item-content">
7
+ <slot>
8
+ <text>{{ name }}</text>
9
+ </slot>
10
+ </view>
11
+ <view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-list-item-right-icon">
12
+ <ml-icon :className="suffixIcon"></ml-icon>
13
+ </view>
14
+ </view>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: 'MlListItem',
20
+ options: {
21
+ virtualHost: true
22
+ },
23
+ props: {
24
+ name: String,
25
+ prefixIcon: String,
26
+ suffixIcon: {
27
+ type: String,
28
+ default: 'mlicon-arrow-right'
29
+ },
30
+ url: String,
31
+ redirect: Boolean,
32
+ className: String
33
+ },
34
+ methods: {
35
+ clickEvent () {
36
+ this.$emit('click', {})
37
+ },
38
+ tapEvent () {
39
+ if (this.url) {
40
+ if (this.redirect) {
41
+ uni.redirectTo({
42
+ url: this.url
43
+ })
44
+ } else {
45
+ uni.navigateTo({
46
+ url: this.url
47
+ })
48
+ }
49
+ }
50
+ this.$emit('tap', {})
51
+ }
52
+ }
53
+ }
54
+ </script>
55
+
56
+
57
+ <style lang="scss">
58
+ .ml-list-item {
59
+ display: flex;
60
+ flex-direction: row;
61
+ padding: 20rpx;
62
+ margin: 10rpx 0;
63
+ border-radius: 10rpx;
64
+ background: #ffffff;
65
+ .ml-list-item-content {
66
+ display: flex;
67
+ flex-direction: row;
68
+ flex-grow: 1;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ }
73
+ .ml-list-item-left-icon,
74
+ .ml-list-item-right-icon {
75
+ display: flex;
76
+ flex-direction: row;
77
+ align-items: center;
78
+ flex-shrink: 0;
79
+ padding: 0 10rpx;
80
+ }
81
+ .ml-list-item-left-icon {
82
+ font-size: 38rpx;
83
+ }
84
+ .ml-list-item-right-icon {
85
+ font-size: 30rpx;
86
+ }
87
+ }
88
+ </style>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <view class="ml-list-menu-group" :class="className">
3
3
  <view v-if="title || $slots.title" class="ml-list-menu-group-title">
4
+ <view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-menu-group-left-icon">
5
+ <ml-icon :className="prefixIcon"></ml-icon>
6
+ </view>
4
7
  <slot name="title">
5
- <view v-if="prefixIcon" class="ml-list-menu-group-left-icon">
6
- <ml-icon :className="prefixIcon"></ml-icon>
7
- </view>
8
8
  <text class="ml-list-menu-group-title-content">{{ title }}</text>
9
9
  </slot>
10
10
  </view>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view class="ml-list-menu-item" :class="className" @click="clickEvent" @tap="tapEvent">
3
- <view v-if="prefixIcon" class="ml-list-menu-item-left-icon">
3
+ <view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-menu-item-left-icon">
4
4
  <ml-icon :className="prefixIcon"></ml-icon>
5
5
  </view>
6
6
  <view class="ml-list-menu-item-content">
@@ -9,10 +9,10 @@
9
9
  </slot>
10
10
  </view>
11
11
  <view v-if="showDot" class="ml-list-menu-item-dot">
12
- <text class="ml-list-menu-item-dot-num">{{ getDotNum(dotNum) }}</text>
12
+ <text class="ml-list-menu-item-dot-num" :class="[dotStatus ? `status-${dotStatus}` : '']">{{ getDotNum(dotNum) }}</text>
13
13
  </view>
14
- <view class="ml-list-menu-item-right-icon">
15
- <ml-icon class="right-icon" name="arrow-right"></ml-icon>
14
+ <view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-list-menu-item-right-icon">
15
+ <ml-icon :className="suffixIcon"></ml-icon>
16
16
  </view>
17
17
  </view>
18
18
  </template>
@@ -26,11 +26,15 @@ export default {
26
26
  props: {
27
27
  name: String,
28
28
  prefixIcon: String,
29
- suffixIcon: String,
29
+ suffixIcon: {
30
+ type: String,
31
+ default: 'mlicon-arrow-right'
32
+ },
30
33
  url: String,
31
34
  redirect: Boolean,
32
35
  className: String,
33
36
  showDot: Boolean,
37
+ dotStatus: String,
34
38
  dotNum: [String, Number]
35
39
  },
36
40
  methods: {
@@ -71,6 +75,8 @@ export default {
71
75
  border-top: 1px solid #e5e5e5;
72
76
  }
73
77
  .ml-list-menu-item-content {
78
+ display: flex;
79
+ flex-direction: row;
74
80
  flex-grow: 1;
75
81
  overflow: hidden;
76
82
  text-overflow: ellipsis;
@@ -90,6 +96,21 @@ export default {
90
96
  text-align: center;
91
97
  font-size: 22rpx;
92
98
  line-height: 40rpx;
99
+ &.status-primary {
100
+ background-color: $uni-color-primary;
101
+ }
102
+ &.status-success {
103
+ background-color: $uni-color-success;
104
+ }
105
+ &.status-info {
106
+ background-color: #909399;
107
+ }
108
+ &.status-warning {
109
+ background-color: $uni-color-warning;
110
+ }
111
+ &.status-danger {
112
+ background-color: $uni-color-error;
113
+ }
93
114
  }
94
115
  }
95
116
  .ml-list-menu-item-left-icon,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <picker :value="value" class="ml-month-picker" :class="[className, {'is-border': border}]" mode="date" fields="month" @change="changeEvent">
2
+ <picker :value="value" class="ml-month-picker" :class="[className || '', {'is-border': border}]" mode="date" fields="month" @change="changeEvent">
3
3
  <view class="picker-warpper">
4
4
  <view class="picker-text">{{ value || '请选择' }}</view>
5
5
  <ml-icon class="picker-icon" name="arrow-down"></ml-icon>
@@ -3,7 +3,7 @@
3
3
  class="ml-number-input"
4
4
  v-model="inpVal"
5
5
  type="text"
6
- :class="[className, {'is-right': align === 'right', 'is-border': border}]"
6
+ :class="[className || '', {'is-right': align === 'right', 'is-border': border}]"
7
7
  autocomplete="off"
8
8
  :placeholder="placeholder"
9
9
  :maxlength="maxLength"
@@ -1,7 +1,9 @@
1
1
  <template>
2
- <view class="ml-radio" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
3
- <ml-icon class="radio-icon" :name="checked ? 'radio-checked' : 'radio-unchecked'"></ml-icon>
4
- <text class="radio-content">
2
+ <view class="ml-radio" :class="[className || '', {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
3
+ <text class="ml-radio-icon">
4
+ <ml-icon :name="checked ? 'radio-checked' : 'radio-unchecked'"></ml-icon>
5
+ </text>
6
+ <text class="ml-radio-content">
5
7
  <slot>
6
8
  <text>{{ content }}</text>
7
9
  </slot>
@@ -47,7 +49,7 @@ export default {
47
49
  &.is-checked {
48
50
  color: $uni-color-primary;
49
51
  }
50
- .radio-icon {
52
+ .ml-radio-icon {
51
53
  font-size: 1.1em;
52
54
  margin-right: 10rpx;
53
55
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-radio-button" :class="[className, {'is-disabled': disabled}]">
2
+ <view class="ml-radio-button" :class="[className || '', {'is-disabled': disabled}]">
3
3
  <view class="ml-radio-button-item" v-for="(item, index) in options" :class="{'is-active': value === item.value}" :key="index" @tap="changeEvent(item)">{{ item.label }}</view>
4
4
  </view>
5
5
  </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-radio-group" :class="[className, {'is-disabled': disabled, 'is-vertical': vertical}]">
2
+ <view class="ml-radio-group" :class="[className || '', {'is-disabled': disabled, 'is-vertical': vertical}]">
3
3
  <view class="ml-radio-group-item" v-for="(item, index) in options" :key="index">
4
4
  <ml-radio :value="value" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-radio>
5
5
  </view>