vxe-pc-ui 4.14.7 → 4.14.9
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.
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +5 -0
- package/es/tree/src/tree.js +17 -4
- package/es/tree/style.css +6 -0
- package/es/tree/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-tree/style.css +6 -0
- package/es/vxe-tree/style.min.css +1 -1
- package/lib/index.umd.js +29 -6
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +5 -0
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree/src/tree.js +22 -4
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree/style/style.css +6 -0
- package/lib/tree/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-tree/style/style.css +6 -0
- package/lib/vxe-tree/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table-select/src/table-select.ts +5 -0
- package/packages/tree/src/tree.ts +17 -4
- package/styles/components/tree.scss +10 -0
- package/styles/theme/base.scss +2 -0
- package/types/components/table.d.ts +3 -0
- package/types/components/tree.d.ts +4 -0
- /package/es/icon/{iconfont.1778465063324.ttf → iconfont.1778663911182.ttf} +0 -0
- /package/es/icon/{iconfont.1778465063324.woff → iconfont.1778663911182.woff} +0 -0
- /package/es/icon/{iconfont.1778465063324.woff2 → iconfont.1778663911182.woff2} +0 -0
- /package/es/{iconfont.1778465063324.ttf → iconfont.1778663911182.ttf} +0 -0
- /package/es/{iconfont.1778465063324.woff → iconfont.1778663911182.woff} +0 -0
- /package/es/{iconfont.1778465063324.woff2 → iconfont.1778663911182.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1778465063324.ttf → iconfont.1778663911182.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1778465063324.woff → iconfont.1778663911182.woff} +0 -0
- /package/lib/icon/style/{iconfont.1778465063324.woff2 → iconfont.1778663911182.woff2} +0 -0
- /package/lib/{iconfont.1778465063324.ttf → iconfont.1778663911182.ttf} +0 -0
- /package/lib/{iconfont.1778465063324.woff → iconfont.1778663911182.woff} +0 -0
- /package/lib/{iconfont.1778465063324.woff2 → iconfont.1778663911182.woff2} +0 -0
|
@@ -327,6 +327,8 @@ export default defineVxeComponent({
|
|
|
327
327
|
const computeTreeStyle = computed(() => {
|
|
328
328
|
const { indent } = props
|
|
329
329
|
const { customHeight, customMinHeight, customMaxHeight } = reactData
|
|
330
|
+
const checkboxOpts = computeCheckboxOpts.value
|
|
331
|
+
const { nodeStyle } = checkboxOpts
|
|
330
332
|
const stys: VxeComponentStyleType = {}
|
|
331
333
|
if (customHeight) {
|
|
332
334
|
stys.height = toCssUnit(customHeight)
|
|
@@ -340,6 +342,15 @@ export default defineVxeComponent({
|
|
|
340
342
|
if (indent) {
|
|
341
343
|
stys['--vxe-ui-tree-node-indent'] = toCssUnit(indent)
|
|
342
344
|
}
|
|
345
|
+
if (nodeStyle) {
|
|
346
|
+
const { indeterminateColor, checkedColor } = nodeStyle
|
|
347
|
+
if (indeterminateColor) {
|
|
348
|
+
stys['--vxe-ui-tree-node-checkbox-indeterminate-color'] = indeterminateColor
|
|
349
|
+
}
|
|
350
|
+
if (checkedColor) {
|
|
351
|
+
stys['--vxe-ui-tree-node-checkbox-checked-color'] = checkedColor
|
|
352
|
+
}
|
|
353
|
+
}
|
|
343
354
|
return stys
|
|
344
355
|
})
|
|
345
356
|
|
|
@@ -2395,11 +2406,10 @@ export default defineVxeComponent({
|
|
|
2395
2406
|
return renderEmptyElement($xeTree)
|
|
2396
2407
|
}
|
|
2397
2408
|
|
|
2398
|
-
const renderCheckbox = (node: any, nodeid: string, isChecked: boolean) => {
|
|
2409
|
+
const renderCheckbox = (node: any, nodeid: string, isChecked: boolean, isIndeterminate: boolean) => {
|
|
2399
2410
|
const { showCheckbox } = props
|
|
2400
2411
|
const checkboxOpts = computeCheckboxOpts.value
|
|
2401
2412
|
const { showIcon, checkMethod, visibleMethod } = checkboxOpts
|
|
2402
|
-
const isIndeterminate = isIndeterminateByCheckboxNodeid(nodeid)
|
|
2403
2413
|
const isVisible = !visibleMethod || visibleMethod({ $tree: $xeTree, node })
|
|
2404
2414
|
let isDisabled = !!checkMethod
|
|
2405
2415
|
if (showCheckbox && showIcon && isVisible) {
|
|
@@ -2449,8 +2459,10 @@ export default defineVxeComponent({
|
|
|
2449
2459
|
}
|
|
2450
2460
|
|
|
2451
2461
|
let isCheckboxChecked = false
|
|
2462
|
+
let isIndeterminate = false
|
|
2452
2463
|
if (showCheckbox) {
|
|
2453
2464
|
isCheckboxChecked = isCheckedByCheckboxNodeId(nodeid)
|
|
2465
|
+
isIndeterminate = isIndeterminateByCheckboxNodeid(nodeid)
|
|
2454
2466
|
}
|
|
2455
2467
|
|
|
2456
2468
|
let hasLazyChilds = false
|
|
@@ -2504,7 +2516,8 @@ export default defineVxeComponent({
|
|
|
2504
2516
|
class: ['vxe-tree--node-item', {
|
|
2505
2517
|
'is--current': currentNode && nodeid === getNodeId(currentNode),
|
|
2506
2518
|
'is-radio--checked': isRadioChecked,
|
|
2507
|
-
'is-checkbox--checked': isCheckboxChecked
|
|
2519
|
+
'is-checkbox--checked': isCheckboxChecked,
|
|
2520
|
+
'is-checkbox--indeterminate': isIndeterminate
|
|
2508
2521
|
}]
|
|
2509
2522
|
}, [
|
|
2510
2523
|
showLine
|
|
@@ -2539,7 +2552,7 @@ export default defineVxeComponent({
|
|
|
2539
2552
|
: []),
|
|
2540
2553
|
renderDragIcon(node, nodeid),
|
|
2541
2554
|
renderRadio(node, nodeid, isRadioChecked),
|
|
2542
|
-
renderCheckbox(node, nodeid, isCheckboxChecked),
|
|
2555
|
+
renderCheckbox(node, nodeid, isCheckboxChecked, isIndeterminate),
|
|
2543
2556
|
h('div', {
|
|
2544
2557
|
class: 'vxe-tree--node-item-inner'
|
|
2545
2558
|
}, [
|
|
@@ -224,6 +224,16 @@
|
|
|
224
224
|
flex-direction: row;
|
|
225
225
|
height: var(--vxe-ui-tree-node-height);
|
|
226
226
|
line-height: var(--vxe-ui-tree-node-height);
|
|
227
|
+
&.is-checkbox--indeterminate {
|
|
228
|
+
& > .vxe-tree--node-item-inner {
|
|
229
|
+
color: var(--vxe-ui-tree-node-checkbox-indeterminate-color);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
&.is-checkbox--checked {
|
|
233
|
+
& > .vxe-tree--node-item-inner {
|
|
234
|
+
color: var(--vxe-ui-tree-node-checkbox-checked-color);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
227
237
|
}
|
|
228
238
|
.vxe-tree--node-item-switcher {
|
|
229
239
|
position: relative;
|
package/styles/theme/base.scss
CHANGED
|
@@ -181,6 +181,8 @@
|
|
|
181
181
|
--vxe-ui-tree-node-line-color:#909399;
|
|
182
182
|
--vxe-ui-tree-node-line-style: dotted;
|
|
183
183
|
--vxe-ui-tree-node-line-width: 1px;
|
|
184
|
+
--vxe-ui-tree-node-checkbox-indeterminate-color: inherit;
|
|
185
|
+
--vxe-ui-tree-node-checkbox-checked-color: inherit;
|
|
184
186
|
|
|
185
187
|
/*tabs*/
|
|
186
188
|
--vxe-ui-tabs-header-height-default: 40px;
|
|
@@ -99,6 +99,10 @@ export namespace VxeTreePropTypes {
|
|
|
99
99
|
}) => boolean
|
|
100
100
|
showIcon?: boolean
|
|
101
101
|
trigger?: '' | 'default' | 'node'
|
|
102
|
+
nodeStyle?: {
|
|
103
|
+
indeterminateColor?: string
|
|
104
|
+
checkedColor?: string
|
|
105
|
+
}
|
|
102
106
|
}
|
|
103
107
|
export interface NodeConfig<D = any> {
|
|
104
108
|
isHover?: boolean
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|