plain-design 1.0.0-beta.122 → 1.0.0-beta.124
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/plain-design.commonjs.min.js +2 -2
- package/dist/plain-design.min.js +2 -2
- package/dist/report.html +2 -2
- package/package.json +1 -1
- package/src/packages/components/Tree/RenderTreeNode.tsx +1 -1
- package/src/packages/components/TreeCore/TreeCore.type.tsx +2 -0
- package/src/packages/components/TreeCore/createTreeProps.ts +1 -0
- package/src/packages/components/TreeNodeWithMenu/index.tsx +4 -0
- package/src/packages/entry.tsx +1 -0
package/package.json
CHANGED
@@ -33,7 +33,7 @@ export const RenderTreeNode = designComponent({
|
|
33
33
|
const classes = useClasses(() => [
|
34
34
|
getComponentCls('tree-node'),
|
35
35
|
{
|
36
|
-
'tree-node-current': tree.state.current === props.treeNode.key,
|
36
|
+
'tree-node-current': !tree.props.disableCurrent && tree.state.current === props.treeNode.key,
|
37
37
|
'tree-node-lead': isLeaf.value,
|
38
38
|
'tree-node-single-check': !props.multiple && props.treeNode.checkStatus() === CheckboxStatus.check,
|
39
39
|
'tree-node-multi-check': props.multiple && props.treeNode.checkStatus() === CheckboxStatus.check,
|
@@ -35,6 +35,8 @@ export interface iTreeProps {
|
|
35
35
|
getChildrenData?: (treeNode: iTreeNode | null) => Promise<any[] | null>,
|
36
36
|
/*当前高亮的选中行,单选时这个值与modelValue逻辑一致*/
|
37
37
|
current?: string,
|
38
|
+
/*禁用高亮当前选中行*/
|
39
|
+
disableCurrent?: boolean,
|
38
40
|
/*是否为多选*/
|
39
41
|
multiple?: boolean,
|
40
42
|
/*单选的时候绑定值类型,last点击的最后一个节点,all所有父子节点*/
|
@@ -15,6 +15,7 @@ export const TreePropsOptions = {
|
|
15
15
|
lazy: { type: Boolean as PropType<iTreeProps["lazy"]> },
|
16
16
|
getChildrenData: { type: Function as PropType<iTreeProps["getChildrenData"]> },
|
17
17
|
current: { type: String as PropType<iTreeProps["current"]> },
|
18
|
+
disableCurrent: { type: Boolean as PropType<iTreeProps["disableCurrent"]> },
|
18
19
|
multiple: { type: Boolean as PropType<iTreeProps["multiple"]> },
|
19
20
|
singleValueType: { type: String as PropType<iTreeProps['singleValueType']> },
|
20
21
|
checkLast: { type: Boolean as PropType<iTreeProps['checkLast']>, default: null },
|
@@ -14,6 +14,7 @@ export const TreeNodeWithMenu = designComponent({
|
|
14
14
|
treeNode: { type: Object as PropType<iTreeNode>, required: true },
|
15
15
|
dropdownOptions: { type: Array as PropType<iTreeNodeWithMenuOption[]> },
|
16
16
|
dropdownAttrs: { type: Object as PropType<ComponentPropsType<typeof Dropdown>> },
|
17
|
+
hideButton: { type: Boolean },
|
17
18
|
},
|
18
19
|
setup({ props }) {
|
19
20
|
|
@@ -56,6 +57,9 @@ export const TreeNodeWithMenu = designComponent({
|
|
56
57
|
<div className={classes.value}>
|
57
58
|
<div className="tree-node-with-menu-content" ref={onRef.content}>{props.treeNode.label()}</div>
|
58
59
|
{(() => {
|
60
|
+
if (props.hideButton) {
|
61
|
+
return;
|
62
|
+
}
|
59
63
|
let btn = (
|
60
64
|
<div className="tree-node-with-menu-button" onMouseDown={handler.onMousedownDraggier.value}>
|
61
65
|
<Icon icon="pi-drag-dot-vertical"/>
|
package/src/packages/entry.tsx
CHANGED
@@ -58,6 +58,7 @@ export {Tab} from './components/Tab';
|
|
58
58
|
export {Tag} from './components/Tag';
|
59
59
|
export {Tree} from './components/Tree';
|
60
60
|
export type {iTreeDragChangeData} from './components/TreeCore/createTreeProps';
|
61
|
+
export {eTreeDropType} from './components/TreeCore/createTreeDraggier';
|
61
62
|
export {TreeNodeWithMenu} from './components/TreeNodeWithMenu';
|
62
63
|
export {ColorPicker} from './components/ColorPicker';
|
63
64
|
export {TimePicker} from './components/TimePicker';
|