vue2server7 7.0.44 → 7.0.45

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.
@@ -43,6 +43,7 @@
43
43
  :highlight-current="true"
44
44
  :expand-on-click-node="false"
45
45
  :default-expanded-keys="defaultExpandedKeys"
46
+ :default-expand-all="defaultExpandAll"
46
47
  :filter-node-method="filterNode"
47
48
  :check-strictly="checkStrictly"
48
49
  :show-checkbox="multiple"
@@ -125,6 +126,8 @@ interface OrgTreeSelectProps {
125
126
  checkStrictly?: boolean
126
127
  /** 默认展开的节点 */
127
128
  defaultExpandedKeys?: (string | number)[]
129
+ /** 是否默认展开所有节点 */
130
+ defaultExpandAll?: boolean
128
131
  }
129
132
 
130
133
  /** 组件事件类型定义 */
@@ -152,7 +155,8 @@ const props = withDefaults(defineProps<OrgTreeSelectProps>(), {
152
155
  labelKey: 'name',
153
156
  childrenKey: 'children',
154
157
  checkStrictly: false,
155
- defaultExpandedKeys: () => []
158
+ defaultExpandedKeys: () => [],
159
+ defaultExpandAll: false
156
160
  })
157
161
 
158
162
  const emit = defineEmits<OrgTreeSelectEmits>()
@@ -400,12 +404,16 @@ defineExpose<OrgTreeSelectExpose>({
400
404
  }
401
405
 
402
406
  .org-tree-select__tree-wrapper {
403
- max-height: 400px;
407
+ height: 400px;
404
408
  border: 1px solid var(--el-border-color-light);
405
409
  border-radius: 4px;
406
410
  padding: 8px;
407
411
  }
408
412
 
413
+ .org-tree-select__tree-wrapper :deep(.el-scrollbar__wrap) {
414
+ max-height: 384px;
415
+ }
416
+
409
417
  .org-tree-select__node {
410
418
  display: flex;
411
419
  align-items: center;
@@ -43,6 +43,7 @@
43
43
  :highlight-current="true"
44
44
  :expand-on-click-node="false"
45
45
  :default-expanded-keys="defaultExpandedKeys"
46
+ :default-expand-all="defaultExpandAll"
46
47
  :filter-node-method="filterNode"
47
48
  :check-strictly="true"
48
49
  :show-checkbox="multiple"
@@ -123,6 +124,8 @@ interface OrgTreeSelectProps {
123
124
  childrenKey?: string
124
125
  /** 默认展开的节点 */
125
126
  defaultExpandedKeys?: (string | number)[]
127
+ /** 是否默认展开所有节点 */
128
+ defaultExpandAll?: boolean
126
129
  }
127
130
 
128
131
  /** 组件事件类型定义 */
@@ -149,7 +152,8 @@ const props = withDefaults(defineProps<OrgTreeSelectProps>(), {
149
152
  nodeKey: 'id',
150
153
  labelKey: 'name',
151
154
  childrenKey: 'children',
152
- defaultExpandedKeys: () => []
155
+ defaultExpandedKeys: () => [],
156
+ defaultExpandAll: false
153
157
  })
154
158
 
155
159
  const emit = defineEmits<OrgTreeSelectEmits>()
@@ -451,12 +455,16 @@ defineExpose<OrgTreeSelectExpose>({
451
455
  }
452
456
 
453
457
  .org-tree-select__tree-wrapper {
454
- max-height: 400px;
458
+ height: 400px;
455
459
  border: 1px solid var(--el-border-color-light);
456
460
  border-radius: 4px;
457
461
  padding: 8px;
458
462
  }
459
463
 
464
+ .org-tree-select__tree-wrapper :deep(.el-scrollbar__wrap) {
465
+ max-height: 384px;
466
+ }
467
+
460
468
  .org-tree-select__node {
461
469
  display: flex;
462
470
  align-items: center;
@@ -78,6 +78,23 @@
78
78
  当前值:<code>{{ JSON.stringify(cascadeValue) }}</code>
79
79
  </div>
80
80
  </el-card>
81
+
82
+ <el-card class="demo-card" shadow="never">
83
+ <template #header>
84
+ <span>默认全部展开 <code>default-expand-all</code></span>
85
+ </template>
86
+ <OrgTreeSelect
87
+ v-model="expandAllValue"
88
+ :data="orgData"
89
+ multiple
90
+ default-expand-all
91
+ placeholder="默认展开所有节点"
92
+ class="demo-control"
93
+ />
94
+ <div class="demo-output">
95
+ 当前值:<code>{{ JSON.stringify(expandAllValue) }}</code>
96
+ </div>
97
+ </el-card>
81
98
  </section>
82
99
  </template>
83
100
 
@@ -251,6 +268,7 @@ const multipleValue = ref<string[]>([])
251
268
  const disabledValue = ref<string>('25001')
252
269
  const expandedValue = ref<string | null>(null)
253
270
  const cascadeValue = ref<string[]>([])
271
+ const expandAllValue = ref<string[]>([])
254
272
 
255
273
  function onSingleChange(value: string | number | (string | number)[] | null, node?: OrgTreeNode | OrgTreeNode[]) {
256
274
  console.log('单选变化:', value, node)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2server7",
3
- "version": "7.0.44",
3
+ "version": "7.0.45",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "nodemon --watch src --ext ts --exec \"ts-node src/app.ts\"",