mali-applet-ui 1.0.147 → 1.0.149

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.
@@ -105,7 +105,7 @@ export default {
105
105
  flex-direction: row;
106
106
  padding: 20rpx $ml-page-interval-margin 60rpx $ml-page-interval-margin;
107
107
  // #ifdef H5
108
- padding-left: calc($ml-page-toolbar-left-width + $ml-page-interval-margin);
108
+ // padding-left: calc($ml-page-toolbar-left-width + $ml-page-interval-margin);
109
109
  // #endif
110
110
  }
111
111
  }
@@ -1,17 +1,17 @@
1
1
  <template>
2
2
  <view class="ml-list-select-page" :class="[className || '', {'is-border': border, 'is-disabled': disabled}]" @tap="tapEvent">
3
3
  <view class="ml-list-select-page-warpper">
4
- <view v-if="hasEmpty" class="ml-list-select-page-placeholder">{{ placeholder }}</view>
4
+ <view v-if="hasEmpty" class="ml-list-select-page-placeholder">{{ readonly ? '' : placeholder }}</view>
5
5
  <view v-else>
6
6
  <slot>
7
7
  <view>{{ selectLabel }}</view>
8
8
  </slot>
9
9
  </view>
10
10
  </view>
11
- <view v-if="clearable && !hasEmpty" class="ml-list-select-page-clear-icon" @click.stop="clearEvent">
11
+ <view v-if="clearable && !readonly && !hasEmpty" class="ml-list-select-page-clear-icon" @click.stop="clearEvent">
12
12
  <ml-icon name="delete-filling"></ml-icon>
13
13
  </view>
14
- <view v-else class="ml-list-select-page-icon">
14
+ <view v-else-if="!readonly" class="ml-list-select-page-icon">
15
15
  <ml-icon name="arrow-right" />
16
16
  </view>
17
17
  </view>
@@ -25,6 +25,7 @@ export default {
25
25
  props: {
26
26
  value: [Array, Number, String],
27
27
  defaultOptions: Array,
28
+ options: Array,
28
29
  optionProps: Object,
29
30
  compTitle: {
30
31
  type: String,
@@ -40,6 +41,7 @@ export default {
40
41
  default: '请选择'
41
42
  },
42
43
  disabled: Boolean,
44
+ readonly: Boolean,
43
45
  border: Boolean,
44
46
  clearable: Boolean,
45
47
  className: String
@@ -78,10 +80,18 @@ export default {
78
80
  watch: {
79
81
  defaultOptions () {
80
82
  this.dataList = this.defaultOptions
83
+ },
84
+ options () {
85
+ this.dataList = this.options
81
86
  }
82
87
  },
83
88
  created () {
84
- this.dataList = this.defaultOptions
89
+ if (this.defaultOptions) {
90
+ this.dataList = this.defaultOptions
91
+ }
92
+ if (this.options) {
93
+ this.dataList = this.options
94
+ }
85
95
  },
86
96
  methods: {
87
97
  tapEvent () {
@@ -8,17 +8,17 @@
8
8
  <view class="ml-list-select-page-footer-btns">
9
9
  <ml-button status="primary" size="medium" @click="confirmEvent">确认</ml-button>
10
10
  </view>
11
-
12
- <ml-picker-drawer v-model="showPopup" height="600rpx" showFooter @confirm="confirmSelectEvent">
13
- <ml-list-select-group
14
- border
15
- type="checkbox"
16
- :options="selectRows"
17
- :checkedKeys.sync="checkList"
18
- :optionProps="optionProps">
19
- </ml-list-select-group>
20
- </ml-picker-drawer>
21
11
  </view>
12
+
13
+ <ml-picker-drawer v-model="showPopup" height="600rpx" showFooter @confirm="confirmSelectEvent">
14
+ <ml-list-select-group
15
+ border
16
+ type="checkbox"
17
+ :options="selectRows"
18
+ :checkedKeys.sync="checkList"
19
+ :optionProps="optionProps">
20
+ </ml-list-select-group>
21
+ </ml-picker-drawer>
22
22
  </ml-fixed-footer>
23
23
  </template>
24
24
 
@@ -14,7 +14,7 @@
14
14
  </view>
15
15
  </view>
16
16
  <view v-else class="ml-list-select-user-list">
17
- <view class="ml-list-select-user-page-placeholder">{{ placeholder }}</view>
17
+ <view class="ml-list-select-user-page-placeholder">{{ readonly ? '' : placeholder }}</view>
18
18
  </view>
19
19
  <view v-if="!readonly" class="ml-list-select-user-add-item" @click="openUserEvent">
20
20
  <view class="ml-list-select-user-add-btn">
@@ -33,6 +33,7 @@ export default {
33
33
  props: {
34
34
  value: [Array, Number, String],
35
35
  defaultOptions: Array,
36
+ options: Array,
36
37
  optionProps: Object,
37
38
  compTitle: {
38
39
  type: String,
@@ -87,10 +88,18 @@ export default {
87
88
  watch: {
88
89
  defaultOptions () {
89
90
  this.dataList = this.defaultOptions
91
+ },
92
+ options () {
93
+ this.dataList = this.options
90
94
  }
91
95
  },
92
96
  created () {
93
- this.dataList = this.defaultOptions
97
+ if (this.defaultOptions) {
98
+ this.dataList = this.defaultOptions
99
+ }
100
+ if (this.options) {
101
+ this.dataList = this.options
102
+ }
94
103
  },
95
104
  methods: {
96
105
  tapEvent () {
@@ -182,6 +191,7 @@ export default {
182
191
  .ml-list-select-user-list {
183
192
  display: flex;
184
193
  flex-direction: row;
194
+ align-items: center;
185
195
  flex-wrap: wrap;
186
196
  min-height: 76rpx;
187
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.147",
3
+ "version": "1.0.149",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",