twcpt 0.0.33 → 0.0.35

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.
@@ -1,5 +1,5 @@
1
1
  import { DefineComponent, ExtractPropTypes, Ref, ComponentInternalInstance, StyleValue, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, ShallowRef, ComputedRef, ComponentOptionsMixin, CSSProperties, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PublicProps, CreateComponentPublicInstanceWithMixins } from 'vue';
2
- import { ComponentSize, InputModelModifiers, InputType, InputAutoSize, InputProps, IconProps } from 'element-plus';
2
+ import { ComponentSize, InputModelModifiers, InputType, InputAutoSize, InputProps } from 'element-plus';
3
3
  import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
4
4
  import { OnCleanup } from '@vue/reactivity';
5
5
  declare const _default: DefineComponent<ExtractPropTypes<{
@@ -387,7 +387,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
387
387
  attrsWithoutWordLimit: ComputedRef<{
388
388
  [x: string]: any;
389
389
  }>;
390
- handleTextareaClear: () => void;
390
+ clearIcon: string;
391
+ handleClear: () => void;
391
392
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
392
393
  bgGrey: {
393
394
  type: BooleanConstructor;
@@ -570,29 +571,5 @@ declare const _default: DefineComponent<ExtractPropTypes<{
570
571
  append?: (props: {}) => any;
571
572
  };
572
573
  })>;
573
- ElIcon: SFCWithInstall<{
574
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
575
- size: number | string;
576
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
577
- P: {};
578
- B: {};
579
- D: {};
580
- C: {};
581
- M: {};
582
- Defaults: {};
583
- }, Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, {
584
- size: number | string;
585
- }>;
586
- __isFragment?: never;
587
- __isTeleport?: never;
588
- __isSuspense?: never;
589
- } & ComponentOptionsBase<Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
590
- size: number | string;
591
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
592
- $slots: {
593
- default?: (props: {}) => any;
594
- };
595
- })>;
596
- CircleClose: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
597
574
  }, {}, string, ComponentProvideOptions, true, {}, any>;
598
575
  export default _default;
@@ -5,6 +5,7 @@ export interface JTWSearchBoxProps {
5
5
  defaultExpanded?: boolean;
6
6
  wrapWidth?: string;
7
7
  gap?: string;
8
+ maxlength?: number;
8
9
  }
9
10
  export interface JTWSearchBoxEmits {
10
11
  'update:modelValue': (value: string) => void;
@@ -41,7 +41,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
41
41
  type: PropType<(node: JTWTreeNode) => boolean>;
42
42
  required: true;
43
43
  };
44
- isNodeSelected: {
44
+ isNodeActive: {
45
45
  type: PropType<(nodeValue: string | number) => boolean>;
46
46
  required: true;
47
47
  };
@@ -98,7 +98,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
98
98
  type: PropType<(node: JTWTreeNode) => boolean>;
99
99
  required: true;
100
100
  };
101
- isNodeSelected: {
101
+ isNodeActive: {
102
102
  type: PropType<(nodeValue: string | number) => boolean>;
103
103
  required: true;
104
104
  };
@@ -61,6 +61,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
61
61
  type: BooleanConstructor;
62
62
  default: boolean;
63
63
  };
64
+ defaultHighlightAll: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
64
68
  }>, {
65
69
  treeSelectRef: Ref<HTMLElement | null, HTMLElement | null>;
66
70
  searchText: Ref<string, string>;
@@ -72,11 +76,12 @@ declare const _default: DefineComponent<ExtractPropTypes<{
72
76
  handleNodeClick: (node: JTWTreeNode) => void;
73
77
  isNodeChecked: (nodeValue: string | number) => boolean;
74
78
  isNodeIndeterminate: (node: JTWTreeNode) => boolean;
75
- isNodeSelected: (nodeValue: string | number) => boolean;
79
+ isNodeActive: (nodeValue: string | number) => boolean;
76
80
  shouldShowCheckbox: (node: JTWTreeNode) => boolean;
77
81
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
78
82
  'update:modelValue': (_value: string | number | (string | number)[]) => true;
79
83
  change: (_value: string | number | (string | number)[], _node: JTWTreeNode | JTWTreeNode[] | null) => true;
84
+ 'active-change': (_value: string | number, _node: JTWTreeNode) => true;
80
85
  blur: (_event: FocusEvent) => true;
81
86
  }, string, PublicProps, Readonly< ExtractPropTypes<{
82
87
  data: {
@@ -139,10 +144,15 @@ declare const _default: DefineComponent<ExtractPropTypes<{
139
144
  type: BooleanConstructor;
140
145
  default: boolean;
141
146
  };
147
+ defaultHighlightAll: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
142
151
  }>> & Readonly<{
143
152
  "onUpdate:modelValue"?: ((_value: string | number | (string | number)[]) => any) | undefined;
144
153
  onBlur?: ((_event: FocusEvent) => any) | undefined;
145
154
  onChange?: ((_value: string | number | (string | number)[], _node: JTWTreeNode | JTWTreeNode[] | null) => any) | undefined;
155
+ "onActive-change"?: ((_value: string | number, _node: JTWTreeNode) => any) | undefined;
146
156
  }>, {
147
157
  data: JTWTreeNode[];
148
158
  modelValue: string | number | (string | number)[];
@@ -156,6 +166,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
156
166
  checkStrictly: boolean;
157
167
  externalSearchText: string;
158
168
  showSearch: boolean;
169
+ defaultHighlightAll: boolean;
159
170
  checkIndependently: boolean;
160
171
  nodeDataMap: Record<string | number, any[]>;
161
172
  selectedDataValues: (string | number)[];
@@ -201,7 +212,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
201
212
  type: PropType<(node: JTWTreeNode) => boolean>;
202
213
  required: true;
203
214
  };
204
- isNodeSelected: {
215
+ isNodeActive: {
205
216
  type: PropType<(nodeValue: string | number) => boolean>;
206
217
  required: true;
207
218
  };
@@ -258,7 +269,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
258
269
  type: PropType<(node: JTWTreeNode) => boolean>;
259
270
  required: true;
260
271
  };
261
- isNodeSelected: {
272
+ isNodeActive: {
262
273
  type: PropType<(nodeValue: string | number) => boolean>;
263
274
  required: true;
264
275
  };
@@ -73,6 +73,13 @@ export interface JTWTreeSelectProps {
73
73
  * @default false
74
74
  */
75
75
  defaultExpandFirst?: boolean;
76
+ /**
77
+ * 是否启用「默认高亮全部」能力:
78
+ * - true:数据就绪后聚焦根节点(优先 value=all)淡色底且不勾选;勾选/取消「全部」走聚焦与选中分离逻辑,并抛出 active-change
79
+ * - false:与旧版一致,背景色仅跟随勾选态,不启用聚焦高亮
80
+ * @default false
81
+ */
82
+ defaultHighlightAll?: boolean;
76
83
  /**
77
84
  * 父子节点完全独立选择
78
85
  * @default false
@@ -93,6 +100,7 @@ export interface JTWTreeSelectProps {
93
100
  export interface JTWTreeSelectEmits {
94
101
  (e: 'update:modelValue', value: string | number | (string | number)[]): void;
95
102
  (e: 'change', value: string | number | (string | number)[], node: JTWTreeNode | JTWTreeNode[] | null): void;
103
+ (e: 'active-change', value: string | number, node: JTWTreeNode): void;
96
104
  (e: 'blur', event: FocusEvent): void;
97
105
  }
98
106
  /** JTWTreeSelect Slots 接口 */
@@ -109,6 +117,7 @@ export interface JTWTreeSelectExpose {
109
117
  export type JTWTreeSelectEmitsOptions = {
110
118
  'update:modelValue': (value: string | number | (string | number)[]) => true;
111
119
  change: (value: string | number | (string | number)[], node: JTWTreeNode | JTWTreeNode[] | null) => true;
120
+ 'active-change': (value: string | number, node: JTWTreeNode) => true;
112
121
  blur: (event: FocusEvent) => true;
113
122
  };
114
123
  /** JTWTreeSelect 组件类型定义 */
@@ -119,6 +128,7 @@ export type JTWTreeSelectInstance = InstanceType<JTWTreeSelectComponent> & JTWTr
119
128
  export interface JTWTreeSelectTemplateProps extends JTWTreeSelectProps {
120
129
  'onUpdate:modelValue'?: (value: string | number | (string | number)[]) => void;
121
130
  onChange?: (value: string | number | (string | number)[], node: JTWTreeNode | JTWTreeNode[] | null) => void;
131
+ onActiveChange?: (value: string | number, node: JTWTreeNode) => void;
122
132
  onBlur?: (event: FocusEvent) => void;
123
133
  class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
124
134
  style?: string | Record<string, string>;