plain-design 1.0.0-beta.122 → 1.0.0-beta.124

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plain-design",
3
- "version": "1.0.0-beta.122",
3
+ "version": "1.0.0-beta.124",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -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"/>
@@ -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';