mali-applet-ui 1.0.124 → 1.0.126

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.
@@ -191,7 +191,6 @@ export default {
191
191
  },
192
192
  updateFlowHandlers () {
193
193
  const flowHandlers = this.flowItems.map(item => {
194
-
195
194
  return {
196
195
  copierList: this.mergeMemberIdsByRoleId(item.copyUsers || []),
197
196
  flowItemSettingId: item.id,
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <view class="ml-tree" :class="[className || '']">
2
+ <view class="ml-tree" :class="[className || '', {'is-disabled': disabled}]">
3
3
  <view v-if="showCheckbox && (showAllCheckbox || showCheckboxBtn)" class="ml-tree-checkbox-btns">
4
4
  <view v-if="showAllCheckbox" class="ml-tree-checkbox-btns-left">
5
- <ml-checkbox v-model="isAllCheckboxChecked" :indeterminate="isAllCheckboxIndeterminate" @change="toggleAllCheckboxEvent">全选</ml-checkbox>
5
+ <ml-checkbox v-model="isAllCheckboxChecked" :indeterminate="isAllCheckboxIndeterminate" :disabled="disabled" @change="toggleAllCheckboxEvent">全选</ml-checkbox>
6
6
  </view>
7
7
  <view v-if="showCheckboxBtn" class="ml-tree-checkbox-btns-right">
8
8
  <ml-button v-if="isExpandAll" size="mini" status="primary" @click="setAllTreeExpand(false)">一键收起</ml-button>
@@ -21,6 +21,7 @@ export default {
21
21
  props: {
22
22
  data: Array,
23
23
  height: String,
24
+ disabled: Boolean,
24
25
  // 是否显示顶部全选按钮
25
26
  showAllCheckbox: Boolean,
26
27
  // 是是否显示顶部操作按钮
@@ -34,6 +35,7 @@ export default {
34
35
  type: Boolean,
35
36
  default: false
36
37
  },
38
+ // (暂时没用)
37
39
  indeterminateToChecked: {
38
40
  type: Boolean,
39
41
  default: false
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-tree-node" :class="[className || '']">
2
+ <view class="ml-tree-node" :class="[className || '', {'is-disabled': isDisabled}]">
3
3
  <view class="ml-tree-node-warpper">
4
4
  <view v-if="showCheckbox" class="ml-tree-node-checkbox" :class="{'is-checked': checkCheckbox, 'is-indeterminate': indeterminate}">
5
5
  <view class="ml-tree-node-checkbox-icon" @click="changeCheckboxEvent">
@@ -53,6 +53,9 @@ export default {
53
53
  keyField () {
54
54
  return this.tree ? this.tree.keyField : 'key'
55
55
  },
56
+ isDisabled () {
57
+ return this.tree ? this.tree.disabled : false
58
+ },
56
59
  childrenField () {
57
60
  return this.tree ? this.tree.childrenField : 'children'
58
61
  },
@@ -86,6 +89,9 @@ export default {
86
89
  },
87
90
  methods: {
88
91
  changeCheckboxEvent () {
92
+ if (this.isDisabled) {
93
+ return
94
+ }
89
95
  if (this.tree) {
90
96
  this.tree.selectCheckboxNodeEvent({
91
97
  nodeData: this.nodeData,
@@ -118,6 +124,12 @@ export default {
118
124
  .ml-tree-node-expand-icon {
119
125
  font-size: 1.3em;
120
126
  }
127
+ &.is-disabled {
128
+ color: rgba(0,0,0,0.5);
129
+ .ml-tree-node-checkbox-icon {
130
+ color: rgba(0,0,0,0.25);
131
+ }
132
+ }
121
133
  .ml-tree-node-checkbox {
122
134
  width: 50rpx;
123
135
  text-align: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.124",
3
+ "version": "1.0.126",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",