mali-applet-ui 1.0.131 → 1.0.133

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,6 +1,6 @@
1
1
  <template>
2
2
  <view class="ml-checkbox-button" :class="[className || '', {'is-disabled': disabled}]">
3
- <view class="ml-checkbox-button-item" v-for="(item, index) in optionList" :class="{'is-disabled': disabled, 'is-active': value.includes(item.value)}" :key="index" @tap="changeEvent(item)">{{ item.label }}</view>
3
+ <view class="ml-checkbox-button-item" v-for="(item, index) in optionList" :class="{'is-disabled': disabled, 'is-active': value && value.includes(item.value)}" :key="index" @tap="changeEvent(item)">{{ item.label }}</view>
4
4
  </view>
5
5
  </template>
6
6
 
@@ -27,8 +27,8 @@ export default {
27
27
  if (this.disabled) {
28
28
  return
29
29
  }
30
- const checked = !this.value.includes(option.value)
31
- const value = this.value.filter(val => val !== option.value)
30
+ const checked = !this.value || !this.value.includes(option.value)
31
+ const value = this.value ? this.value.filter(val => val !== option.value) : []
32
32
  if (checked) {
33
33
  value.push(option.value)
34
34
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="ml-checkbox-group" :class="[className || '', {'is-disabled': disabled, 'is-vertical': vertical}]">
3
3
  <view class="ml-checkbox-group-item" v-for="(item, index) in options" :key="index">
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>
4
+ <ml-checkbox :value="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>
6
6
  </view>
7
7
  </template>
@@ -24,7 +24,7 @@ export default {
24
24
  if (this.disabled) {
25
25
  return
26
26
  }
27
- const value = this.value.filter(item => item !== label)
27
+ const value = this.value ? this.value.filter(item => item !== label) : []
28
28
  if (checked) {
29
29
  value.push(label)
30
30
  }
@@ -1,18 +1,7 @@
1
1
  <template>
2
2
  <view class="ml-list-select-group" :class="[className || '', type ? `type-${type}` : '']">
3
3
  <slot>
4
- <ml-list-group :border="border">
5
- <ml-list-item
6
- v-for="(item, index) in options"
7
- :key="index"
8
- :value="item[optValueField]"
9
- :disabled="!!item[optDisabledField]"
10
- :padding="false"
11
- suffixIcon="none"
12
- @disabled-click="disabledClickEvent(item)">
13
- {{ item[optLabelField] }}
14
- </ml-list-item>
15
- </ml-list-group>
4
+ j
16
5
  </slot>
17
6
  </view>
18
7
  </template>
@@ -108,6 +108,7 @@ export default {
108
108
  // #ifdef H5
109
109
  cursor: pointer;
110
110
  // #endif
111
+ color: rgba(0, 0, 0, 0.5);
111
112
  &.is-active {
112
113
  border: 0;
113
114
  color: $uni-color-primary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.131",
3
+ "version": "1.0.133",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",