mali-applet-ui 0.0.23 → 0.0.26

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 (28) hide show
  1. package/components/ml-amount-input/ml-amount-input.vue +1 -1
  2. package/components/ml-button/ml-button.vue +1 -1
  3. package/components/ml-checkbox/ml-checkbox.vue +1 -1
  4. package/components/ml-checkbox-group/ml-checkbox-group.vue +1 -1
  5. package/components/ml-date-picker/ml-date-picker.vue +1 -1
  6. package/components/ml-date-range-picker/ml-date-range-picker.vue +1 -1
  7. package/components/ml-datetime-picker/ml-datetime-picker.vue +1 -1
  8. package/components/ml-datetime-range-picker/ml-datetime-range-picker.vue +1 -1
  9. package/components/ml-echarts/ml-echarts.vue +1 -1
  10. package/components/ml-form/ml-form.vue +1 -1
  11. package/components/ml-form-item/ml-form-item.vue +1 -1
  12. package/components/ml-full-watermark/ml-full-watermark.vue +1 -1
  13. package/components/ml-icon/ml-icon.vue +1 -1
  14. package/components/ml-input/ml-input.vue +1 -1
  15. package/components/ml-month-picker/ml-month-picker.vue +1 -1
  16. package/components/ml-number-input/ml-number-input.vue +1 -1
  17. package/components/ml-progress-bar/ml-progress-bar.vue +1 -1
  18. package/components/ml-province-city-picker/ml-province-city-picker.vue +1 -1
  19. package/components/ml-radio/ml-radio.vue +1 -1
  20. package/components/ml-radio-button/ml-radio-button.vue +3 -3
  21. package/components/ml-radio-group/ml-radio-group.vue +3 -2
  22. package/components/ml-row/ml-row.vue +1 -1
  23. package/components/ml-select-picker/ml-select-picker.vue +1 -1
  24. package/components/{ml-layout-tabbar/ml-layout-tabbar.vue → ml-tabbar/ml-tabbar.vue} +21 -16
  25. package/components/ml-tabs/ml-tabs.vue +1 -0
  26. package/components/ml-textarea/ml-textarea.vue +1 -1
  27. package/components/ml-year-picker/ml-year-picker.vue +1 -1
  28. package/package.json +1 -1
@@ -7,7 +7,7 @@ import XEUtils from 'xe-utils'
7
7
  import { toNumMoneyToChinese } from '../../utils'
8
8
 
9
9
  export default {
10
- name: 'ml-amount-input',
10
+ name: 'MlAmountInput',
11
11
  props: {
12
12
  value: String,
13
13
  align: String,
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: 'ml-button',
9
+ name: 'MlButton',
10
10
  options: {
11
11
  virtualHost: true
12
12
  },
@@ -11,7 +11,7 @@
11
11
 
12
12
  <script>
13
13
  export default {
14
- name: 'ml-checkbox',
14
+ name: 'MlCheckbox',
15
15
  props: {
16
16
  value: [Boolean, Number, String],
17
17
  label: {
@@ -8,7 +8,7 @@
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'ml-checkbox-group',
11
+ name: 'MlCheckboxGroup',
12
12
  props: {
13
13
  value: Array,
14
14
  options: Array,
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-date-picker',
7
+ name: 'MlDatePicker',
8
8
  props: {
9
9
  value: String,
10
10
  border: Boolean,
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-date-range-picker',
7
+ name: 'MlDateRangePicker',
8
8
  props: {
9
9
  border: Boolean,
10
10
  startDate: String,
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-date-picker',
7
+ name: 'MlDatePicker',
8
8
  props: {
9
9
  value: String,
10
10
  border: Boolean,
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-datetime-range-picker',
7
+ name: 'MlDatetimeRangePicker',
8
8
  props: {
9
9
  border: Boolean,
10
10
  startDate: String,
@@ -35,7 +35,7 @@ function compareVersion(v1, v2) {
35
35
  }
36
36
 
37
37
  export default {
38
- name: 'ml-echarts',
38
+ name: 'MlEcharts',
39
39
  props: {
40
40
  options: Object,
41
41
  height:String,
@@ -10,7 +10,7 @@
10
10
  import XEUtils from 'xe-utils'
11
11
 
12
12
  export default {
13
- name: 'ml-form',
13
+ name: 'MlForm',
14
14
  props: {
15
15
  data: Object,
16
16
  items: Array,
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: 'ml-form-item',
9
+ name: 'MlFormItem',
10
10
  props: {
11
11
  title: String,
12
12
  field: String
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: 'ml-full-watermark',
9
+ name: 'MlFullWatermark',
10
10
  props: {
11
11
  content: String
12
12
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-icon',
7
+ name: 'MlIcon',
8
8
  props: {
9
9
  name: String,
10
10
  className: String
@@ -18,7 +18,7 @@
18
18
 
19
19
  <script>
20
20
  export default {
21
- name: 'ml-input',
21
+ name: 'MlInput',
22
22
  props: {
23
23
  value: [Number, String],
24
24
  type: String,
@@ -9,7 +9,7 @@
9
9
 
10
10
  <script>
11
11
  export default {
12
- name: 'ml-month-picker',
12
+ name: 'MlMonthPicker',
13
13
  props: {
14
14
  value: String,
15
15
  border: Boolean
@@ -4,7 +4,7 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'ml-number-input',
7
+ name: 'MlNumberInput',
8
8
  props: {
9
9
  value: String,
10
10
  align: String,
@@ -25,7 +25,7 @@
25
25
  import XEUtils from 'xe-utils'
26
26
 
27
27
  export default {
28
- name: 'ml-progress-bar',
28
+ name: 'MlProgressBar',
29
29
  props: {
30
30
  value: Number,
31
31
  max: {
@@ -17,7 +17,7 @@
17
17
  import provinceCity from './provinceCity.json'
18
18
 
19
19
  export default {
20
- name: 'ml-province-city-picker',
20
+ name: 'MlProvinceCityPicker',
21
21
  props: {
22
22
  value: Array,
23
23
  border: Boolean,
@@ -11,7 +11,7 @@
11
11
 
12
12
  <script>
13
13
  export default {
14
- name: 'ml-radio',
14
+ name: 'MlRadio',
15
15
  props: {
16
16
  value: [Boolean, Number, String],
17
17
  label: {
@@ -13,10 +13,10 @@ export default {
13
13
  disabled: Boolean
14
14
  },
15
15
  methods: {
16
- changeEvent (item) {
17
- const value = item.value
16
+ changeEvent (option) {
17
+ const value = option.value
18
18
  this.$emit('input', value)
19
- this.$emit('change', { value })
19
+ this.$emit('change', { value, option })
20
20
  }
21
21
  }
22
22
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'ml-radio-group',
11
+ name: 'MlRadioGroup',
12
12
  props: {
13
13
  value: [Boolean, Number, String],
14
14
  options: Array,
@@ -17,8 +17,9 @@ export default {
17
17
  },
18
18
  methods: {
19
19
  changeEvent ({ value }) {
20
+ const option = this.options.find(item => item.value === value)
20
21
  this.$emit('input', value)
21
- this.$emit('change', { value })
22
+ this.$emit('change', { value, option })
22
23
  }
23
24
  }
24
25
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: 'ml-row',
9
+ name: 'MlRow',
10
10
  options: {
11
11
  virtualHost: true
12
12
  },
@@ -12,7 +12,7 @@
12
12
 
13
13
  <script>
14
14
  export default {
15
- name: 'ml-select-picker',
15
+ name: 'MlSelectPicker',
16
16
  props: {
17
17
  value: [Number, String],
18
18
  border: Boolean,
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <view class="ml-layout-tabbar">
3
- <view class="ml-layout-tabbar-list">
4
- <view class="ml-layout-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @click="clickEvent(item)">
5
- <view class="ml-layout-tabbar-icon">
2
+ <view class="ml-tabbar">
3
+ <view class="ml-tabbar-list">
4
+ <view class="ml-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @click="clickEvent(item)">
5
+ <view class="ml-tabbar-icon">
6
6
  <ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
7
7
  </view>
8
- <view class="ml-layout-tabbar-name">{{ item.name }}</view>
9
- <view v-if="item.showNum && item.num > 0" class="ml-layout-tabbar-num">{{ item.num }}</view>
8
+ <view class="ml-tabbar-name">{{ item.name }}</view>
9
+ <view v-if="item.showNum && item.num > 0" class="ml-tabbar-num">{{ item.num }}</view>
10
10
  </view>
11
11
  </view>
12
12
  </view>
@@ -14,7 +14,7 @@
14
14
 
15
15
  <script>
16
16
  export default {
17
- name: 'MlLayoutTabbar',
17
+ name: 'MlTabbar',
18
18
  props: {
19
19
  value: [String, Number],
20
20
  options: Array
@@ -25,24 +25,29 @@ export default {
25
25
  }
26
26
  },
27
27
  methods: {
28
- clickEvent (item) {
29
- const value = item.value
28
+ clickEvent (option) {
29
+ const value = option.value
30
30
  this.$emit('input', value)
31
- this.$emit('change', { value })
31
+ this.$emit('change', { value, option })
32
+ if (option.url) {
33
+ uni.redirectTo({
34
+ url: option.url
35
+ })
36
+ }
32
37
  }
33
38
  }
34
39
  }
35
40
  </script>
36
41
 
37
42
  <style lang="scss">
38
- .ml-layout-tabbar {
43
+ .ml-tabbar {
39
44
  width: 100%;
40
45
  position: fixed;
41
46
  left: 0;
42
47
  bottom: 0;
43
48
  z-index: 88;
44
49
  background: #FFFFFF;
45
- .ml-layout-tabbar-list {
50
+ .ml-tabbar-list {
46
51
  width: 100%;
47
52
  height: 120rpx;
48
53
  display: flex;
@@ -51,7 +56,7 @@ export default {
51
56
  justify-content: space-between;
52
57
  box-sizing: border-box;
53
58
  }
54
- .ml-layout-tabbar-item {
59
+ .ml-tabbar-item {
55
60
  position: relative;
56
61
  flex: 1;
57
62
  &.is-active {
@@ -59,7 +64,7 @@ export default {
59
64
  color: #2497FF;
60
65
  }
61
66
  }
62
- .ml-layout-tabbar-num {
67
+ .ml-tabbar-num {
63
68
  position: absolute;
64
69
  top: -4px;
65
70
  right: 40rpx;
@@ -72,7 +77,7 @@ export default {
72
77
  text-align: center;
73
78
  font-size: 24rpx;
74
79
  }
75
- .ml-layout-tabbar-icon {
80
+ .ml-tabbar-icon {
76
81
  width: 45rpx;
77
82
  height: 45rpx;
78
83
  margin: 0 auto;
@@ -81,7 +86,7 @@ export default {
81
86
  font-size: 40rpx;
82
87
  }
83
88
  }
84
- .ml-layout-tabbar-name {
89
+ .ml-tabbar-name {
85
90
  width: 100%;
86
91
  height: 30rpx;
87
92
  text-align: center;
@@ -10,6 +10,7 @@
10
10
 
11
11
  <script>
12
12
  export default {
13
+ name: 'MlTabs',
13
14
  props: {
14
15
  value: [String, Number],
15
16
  options: Array
@@ -15,7 +15,7 @@
15
15
  import VoiceInput from './voice-input.vue'
16
16
 
17
17
  export default {
18
- name: 'ml-textarea',
18
+ name: 'MlTextarea',
19
19
  components: {
20
20
  VoiceInput
21
21
  },
@@ -9,7 +9,7 @@
9
9
 
10
10
  <script>
11
11
  export default {
12
- name: 'ml-year-picker',
12
+ name: 'MlYearPicker',
13
13
  props: {
14
14
  value: String,
15
15
  border: Boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.23",
3
+ "version": "0.0.26",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",