cnhis-design-vue 3.1.23-beta.4 → 3.1.23-beta.7

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.
Files changed (53) hide show
  1. package/README.md +123 -123
  2. package/es/components/fabric-chart/src/components/PopupMenu.js +7 -2
  3. package/es/components/fabric-chart/src/hooks/useCenter2.js +9 -5
  4. package/es/components/form-config/index.d.ts +1 -1
  5. package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
  6. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
  7. package/es/components/form-render/index2.js +2 -1
  8. package/es/components/form-render/src/components/renderer/index.d.ts +2 -1
  9. package/es/components/form-render/src/components/renderer/index.js +2 -1
  10. package/es/components/form-render/src/components/renderer/index2.js +2 -1
  11. package/es/components/form-render/src/components/renderer/{searchCascader.d.ts → levelSearchCascade.d.ts} +29 -6
  12. package/es/components/form-render/src/components/renderer/levelSearchCascade.js +227 -0
  13. package/es/components/form-render/src/components/renderer/search.d.ts +2 -2
  14. package/es/components/form-render/src/components/renderer/search.js +2 -1
  15. package/es/components/form-render/src/components/renderer/{cascader.d.ts → searchCascade.d.ts} +0 -0
  16. package/es/components/form-render/src/components/renderer/{cascader.js → searchCascade.js} +1 -0
  17. package/es/components/form-render/src/components/renderer/select.js +2 -1
  18. package/es/components/form-render/src/hooks/useAsyncQueue2.js +5 -4
  19. package/es/components/form-render/src/hooks/useFieldListAdaptor2.js +11 -4
  20. package/es/components/form-render/src/hooks/useFormRequest.d.ts +2 -0
  21. package/es/components/form-render/src/hooks/useFormRequest2.js +1 -1
  22. package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
  23. package/es/components/iho-table/index.d.ts +270 -101
  24. package/es/components/iho-table/src/IhoTable.vue.d.ts +270 -101
  25. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +11 -8
  26. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.js +18 -20
  27. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.vue.d.ts +1 -17
  28. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +9 -5
  29. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils2.js +2 -2
  30. package/es/components/iho-table/src/types/index.d.ts +0 -3
  31. package/es/components/index.css +1 -1
  32. package/es/components/search-cascader/index.d.ts +69 -6
  33. package/es/components/search-cascader/src/SearchCascader.js +21 -42
  34. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +69 -6
  35. package/es/components/search-cascader/src/components/SearchMenu.d.ts +9 -0
  36. package/es/components/search-cascader/src/components/SearchMenu.js +11 -2
  37. package/es/components/search-cascader/style/index.css +1 -1
  38. package/es/components/shortcut-provider/src/ShortcutProvider.js +2 -1
  39. package/es/components/shortcut-setter/index.d.ts +1 -1
  40. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  41. package/es/shared/components/no-data/NoData.js +74 -0
  42. package/es/shared/components/no-data/NoData.vue.d.ts +51 -0
  43. package/es/shared/components/no-data/index.d.ts +2 -0
  44. package/es/shared/components/no-data/index.js +1 -0
  45. package/es/shared/components/no-data/index2.js +2 -0
  46. package/package.json +2 -2
  47. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +0 -4
  48. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  49. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  50. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  51. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  52. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  53. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -15,9 +15,25 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
15
15
  type: StringConstructor;
16
16
  default: string;
17
17
  };
18
- fetchOptions: {
18
+ editPlaceholder: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ options: {
23
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
24
+ default: () => never[];
25
+ };
26
+ search: {
19
27
  type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
20
28
  };
29
+ labelKey: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ valueKey: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
21
37
  beforeSetValue: {
22
38
  type: import("vue").PropType<(value: string | import("../../../es/shared/types").AnyObject[]) => void | (string | import("../../../es/shared/types").AnyObject[]) | Promise<string | import("../../../es/shared/types").AnyObject[]>>;
23
39
  };
@@ -38,26 +54,43 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
38
54
  type: StringConstructor;
39
55
  default: string;
40
56
  };
41
- fetchOptions: {
57
+ editPlaceholder: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ options: {
62
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
63
+ default: () => never[];
64
+ };
65
+ search: {
42
66
  type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
43
67
  };
68
+ labelKey: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ valueKey: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
44
76
  beforeSetValue: {
45
77
  type: import("vue").PropType<(value: string | import("../../../es/shared/types").AnyObject[]) => void | (string | import("../../../es/shared/types").AnyObject[]) | Promise<string | import("../../../es/shared/types").AnyObject[]>>;
46
78
  };
47
79
  }>> & {
80
+ onFocus?: ((...args: any[]) => any) | undefined;
48
81
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
49
82
  }>>;
50
- emits: (event: "update:value", ...args: any[]) => void;
83
+ emits: (event: "update:value" | "focus", ...args: any[]) => void;
51
84
  emitValue: (value: string | import("../../../es/shared/types").AnyObject[]) => void;
52
85
  onClear: () => void;
53
86
  cssVariable: {
54
87
  '--menu-width': number;
55
88
  };
56
- optionsRef: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
57
89
  uuid: string;
58
90
  show: import("vue").Ref<boolean>;
59
91
  patternContent: import("vue").Ref<string>;
60
92
  displayValue: import("vue").WritableComputedRef<string>;
93
+ onFocus: (focusEvt: Event) => void;
61
94
  openMenu: () => void;
62
95
  closeMenu: () => Promise<void>;
63
96
  inputRef: import("vue").Ref<any>;
@@ -79,6 +112,10 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
79
112
  onNodeClick: {
80
113
  type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
81
114
  };
115
+ labelKey: {
116
+ type: StringConstructor;
117
+ default: string;
118
+ };
82
119
  currentNode: {
83
120
  type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
84
121
  };
@@ -94,14 +131,19 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
94
131
  onNodeClick: {
95
132
  type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
96
133
  };
134
+ labelKey: {
135
+ type: StringConstructor;
136
+ default: string;
137
+ };
97
138
  currentNode: {
98
139
  type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
99
140
  };
100
141
  }>>, {
101
142
  options: import("../../../es/shared/types").AnyObject[];
102
143
  childKey: string;
144
+ labelKey: string;
103
145
  }>;
104
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
146
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "focus")[], "focus" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
105
147
  value: {
106
148
  type: import("vue").PropType<string | import("../../../es/shared/types").AnyObject[]>;
107
149
  };
@@ -117,17 +159,38 @@ declare const SearchCascader: SFCWithInstall<import("vue").DefineComponent<{
117
159
  type: StringConstructor;
118
160
  default: string;
119
161
  };
120
- fetchOptions: {
162
+ editPlaceholder: {
163
+ type: StringConstructor;
164
+ default: string;
165
+ };
166
+ options: {
167
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
168
+ default: () => never[];
169
+ };
170
+ search: {
121
171
  type: import("vue").PropType<import("../../../es/shared/types").Func<any[], any>>;
122
172
  };
173
+ labelKey: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ valueKey: {
178
+ type: StringConstructor;
179
+ default: string;
180
+ };
123
181
  beforeSetValue: {
124
182
  type: import("vue").PropType<(value: string | import("../../../es/shared/types").AnyObject[]) => void | (string | import("../../../es/shared/types").AnyObject[]) | Promise<string | import("../../../es/shared/types").AnyObject[]>>;
125
183
  };
126
184
  }>> & {
185
+ onFocus?: ((...args: any[]) => any) | undefined;
127
186
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
128
187
  }, {
188
+ options: import("../../../es/shared/types").AnyObject[];
129
189
  placeholder: string;
190
+ valueKey: string;
130
191
  clearable: boolean;
131
192
  childKey: string;
193
+ editPlaceholder: string;
194
+ labelKey: string;
132
195
  }>>;
133
196
  export default SearchCascader;
@@ -5,7 +5,6 @@ import { isString, isArray, isFunction } from 'lodash-es';
5
5
  import { NPopover, NInput } from 'naive-ui';
6
6
  import { InjectionSearchCascaderLoadingNode } from './constants/index2.js';
7
7
  import { useCssVariable } from './hooks/useCssVariable2.js';
8
- import { getParentNodeList } from './utils/index2.js';
9
8
  import { SearchMenu } from './components/SearchMenu.js';
10
9
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
11
10
 
@@ -17,11 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
16
  clearable: { type: Boolean, default: false },
18
17
  childKey: { type: String, default: "children" },
19
18
  placeholder: { type: String, default: "\u8BF7\u9009\u62E9" },
20
- fetchOptions: { type: Function },
19
+ editPlaceholder: { type: String, default: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22" },
20
+ options: { type: Array, default: () => [] },
21
+ search: { type: Function },
22
+ labelKey: { type: String, default: "label" },
23
+ valueKey: { type: String, default: "value" },
21
24
  beforeSetValue: { type: Function }
22
25
  },
23
- emits: ["update:value"],
24
- setup(__props, { expose, emit: emits }) {
26
+ emits: ["update:value", "focus"],
27
+ setup(__props, { emit: emits }) {
25
28
  const props = __props;
26
29
  function emitValue(value) {
27
30
  Promise.resolve(isFunction(props.beforeSetValue) ? props.beforeSetValue(value) : value).then((result) => {
@@ -33,7 +36,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
36
  emitValue([]);
34
37
  }
35
38
  const cssVariable = useCssVariable();
36
- const optionsRef = ref([{}]);
37
39
  const uuid = uuidGenerator();
38
40
  const show = ref(false);
39
41
  const patternContent = ref("");
@@ -49,8 +51,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
51
  function arrayOptionsToString(optionList) {
50
52
  return optionList.reduce((res, item, idx) => {
51
53
  if (idx === 0)
52
- return item.label;
53
- return res + " / " + item.label;
54
+ return item[props.labelKey];
55
+ return res + " / " + item[props.labelKey];
54
56
  }, "");
55
57
  }
56
58
  },
@@ -59,10 +61,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
61
  search(void 0, value);
60
62
  }
61
63
  });
64
+ function onFocus(focusEvt) {
65
+ emits("focus", focusEvt);
66
+ openMenu();
67
+ }
62
68
  function openMenu() {
63
69
  if (show.value)
64
70
  return;
65
- optionsRef.value = [];
66
71
  show.value = true;
67
72
  patternContent.value = "";
68
73
  search();
@@ -103,43 +108,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
108
  provide(InjectionSearchCascaderLoadingNode, loadingNode);
104
109
  const search = useDebounceFn(async (node, keyword) => {
105
110
  var _a;
106
- if (!isFunction(props.fetchOptions)) {
107
- emitValue(node ? [node] : []);
108
- return closeMenu();
109
- }
110
- loadingNode.value = node;
111
111
  try {
112
- const options = await props.fetchOptions(node, keyword);
113
- if (!isValidOption(options)) {
114
- if (!node)
115
- return;
116
- node.isLeaf = true;
117
- emitValue(getParentNodeList(node));
118
- return closeMenu();
119
- }
120
- if (node) {
121
- node[props.childKey] = options.map((option) => enrichOption(option, node));
122
- } else {
123
- optionsRef.value = options;
124
- }
112
+ loadingNode.value = node;
113
+ await (isFunction(props.search) && props.search(node, keyword));
125
114
  currentNode.value = node;
126
115
  } finally {
127
116
  loadingNode.value = null;
128
117
  await nextTick();
129
118
  (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
130
119
  }
131
- function enrichOption(option, parent) {
132
- return { ...option, parent };
133
- }
134
- function isValidOption(options) {
135
- return isArray(options) && !!options.length;
136
- }
137
120
  }, 400);
138
- expose({
139
- setOptions(options) {
140
- optionsRef.value = options;
141
- }
142
- });
143
121
  return (_ctx, _cache) => {
144
122
  return openBlock(), createBlock(unref(NPopover), {
145
123
  class: "search-cascader",
@@ -149,26 +127,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
149
127
  "show-arrow": false,
150
128
  placement: "bottom-start",
151
129
  style: normalizeStyle(unref(cssVariable)),
152
- width: optionsRef.value.length ? void 0 : "trigger",
130
+ width: __props.options.length ? void 0 : "trigger",
153
131
  ref_key: "popoverRef",
154
132
  ref: popoverRef
155
133
  }, {
156
134
  trigger: withCtx(() => [
157
135
  createVNode(unref(NInput), {
158
- placeholder: __props.placeholder,
136
+ placeholder: show.value ? __props.editPlaceholder : __props.placeholder,
159
137
  clearable: __props.clearable,
160
138
  onClear,
161
139
  value: unref(displayValue),
162
140
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(displayValue) ? displayValue.value = $event : null),
163
141
  ref_key: "inputRef",
164
142
  ref: inputRef,
165
- onFocus: openMenu
143
+ onFocus
166
144
  }, null, 8, ["placeholder", "clearable", "value"])
167
145
  ]),
168
146
  default: withCtx(() => [
169
147
  createElementVNode("section", { id: unref(uuid) }, [
170
148
  createVNode(unref(SearchMenu), {
171
- options: optionsRef.value,
149
+ "label-key": __props.labelKey,
150
+ options: __props.options,
172
151
  onNodeClick: unref(search),
173
152
  "current-node": currentNode.value
174
153
  }, {
@@ -176,7 +155,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
176
155
  renderSlot(_ctx.$slots, "empty")
177
156
  ]),
178
157
  _: 3
179
- }, 8, ["options", "onNodeClick", "current-node"])
158
+ }, 8, ["label-key", "options", "onNodeClick", "current-node"])
180
159
  ], 8, _hoisted_1)
181
160
  ]),
182
161
  _: 3
@@ -17,9 +17,25 @@ declare const _default: import("vue").DefineComponent<{
17
17
  type: StringConstructor;
18
18
  default: string;
19
19
  };
20
- fetchOptions: {
20
+ editPlaceholder: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ options: {
25
+ type: PropType<AnyObject[]>;
26
+ default: () => never[];
27
+ };
28
+ search: {
21
29
  type: PropType<Func<any[], any>>;
22
30
  };
31
+ labelKey: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ valueKey: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
23
39
  beforeSetValue: {
24
40
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
25
41
  };
@@ -40,26 +56,43 @@ declare const _default: import("vue").DefineComponent<{
40
56
  type: StringConstructor;
41
57
  default: string;
42
58
  };
43
- fetchOptions: {
59
+ editPlaceholder: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ options: {
64
+ type: PropType<AnyObject[]>;
65
+ default: () => never[];
66
+ };
67
+ search: {
44
68
  type: PropType<Func<any[], any>>;
45
69
  };
70
+ labelKey: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ valueKey: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
46
78
  beforeSetValue: {
47
79
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
48
80
  };
49
81
  }>> & {
82
+ onFocus?: ((...args: any[]) => any) | undefined;
50
83
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
51
84
  }>>;
52
- emits: (event: "update:value", ...args: any[]) => void;
85
+ emits: (event: "update:value" | "focus", ...args: any[]) => void;
53
86
  emitValue: (value: ValueType) => void;
54
87
  onClear: () => void;
55
88
  cssVariable: {
56
89
  '--menu-width': number;
57
90
  };
58
- optionsRef: import("vue").Ref<AnyObject[]>;
59
91
  uuid: string;
60
92
  show: import("vue").Ref<boolean>;
61
93
  patternContent: import("vue").Ref<string>;
62
94
  displayValue: import("vue").WritableComputedRef<string>;
95
+ onFocus: (focusEvt: Event) => void;
63
96
  openMenu: () => void;
64
97
  closeMenu: () => Promise<void>;
65
98
  inputRef: import("vue").Ref<any>;
@@ -81,6 +114,10 @@ declare const _default: import("vue").DefineComponent<{
81
114
  onNodeClick: {
82
115
  type: PropType<Func<any[], any>>;
83
116
  };
117
+ labelKey: {
118
+ type: StringConstructor;
119
+ default: string;
120
+ };
84
121
  currentNode: {
85
122
  type: PropType<AnyObject>;
86
123
  };
@@ -96,14 +133,19 @@ declare const _default: import("vue").DefineComponent<{
96
133
  onNodeClick: {
97
134
  type: PropType<Func<any[], any>>;
98
135
  };
136
+ labelKey: {
137
+ type: StringConstructor;
138
+ default: string;
139
+ };
99
140
  currentNode: {
100
141
  type: PropType<AnyObject>;
101
142
  };
102
143
  }>>, {
103
144
  options: AnyObject[];
104
145
  childKey: string;
146
+ labelKey: string;
105
147
  }>;
106
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
148
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "focus")[], "focus" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
107
149
  value: {
108
150
  type: PropType<ValueType>;
109
151
  };
@@ -119,17 +161,38 @@ declare const _default: import("vue").DefineComponent<{
119
161
  type: StringConstructor;
120
162
  default: string;
121
163
  };
122
- fetchOptions: {
164
+ editPlaceholder: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ options: {
169
+ type: PropType<AnyObject[]>;
170
+ default: () => never[];
171
+ };
172
+ search: {
123
173
  type: PropType<Func<any[], any>>;
124
174
  };
175
+ labelKey: {
176
+ type: StringConstructor;
177
+ default: string;
178
+ };
179
+ valueKey: {
180
+ type: StringConstructor;
181
+ default: string;
182
+ };
125
183
  beforeSetValue: {
126
184
  type: PropType<(value: ValueType) => void | ValueType | Promise<ValueType>>;
127
185
  };
128
186
  }>> & {
187
+ onFocus?: ((...args: any[]) => any) | undefined;
129
188
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
130
189
  }, {
190
+ options: AnyObject[];
131
191
  placeholder: string;
192
+ valueKey: string;
132
193
  clearable: boolean;
133
194
  childKey: string;
195
+ editPlaceholder: string;
196
+ labelKey: string;
134
197
  }>;
135
198
  export default _default;
@@ -12,6 +12,10 @@ export declare const SearchMenu: import("vue").DefineComponent<{
12
12
  onNodeClick: {
13
13
  type: PropType<Func<any[], any>>;
14
14
  };
15
+ labelKey: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
15
19
  currentNode: {
16
20
  type: PropType<AnyObject>;
17
21
  };
@@ -27,10 +31,15 @@ export declare const SearchMenu: import("vue").DefineComponent<{
27
31
  onNodeClick: {
28
32
  type: PropType<Func<any[], any>>;
29
33
  };
34
+ labelKey: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
30
38
  currentNode: {
31
39
  type: PropType<AnyObject>;
32
40
  };
33
41
  }>>, {
34
42
  options: AnyObject[];
35
43
  childKey: string;
44
+ labelKey: string;
36
45
  }>;
@@ -14,6 +14,10 @@ const SearchMenuList = defineComponent({
14
14
  activeNodes: {
15
15
  type: Array,
16
16
  default: () => []
17
+ },
18
+ labelKey: {
19
+ type: String,
20
+ default: "label"
17
21
  }
18
22
  },
19
23
  emits: ["nodeClick"],
@@ -45,10 +49,10 @@ const SearchMenuList = defineComponent({
45
49
  "search-cascader__option--active": (_a = props.activeNodes) == null ? void 0 : _a.includes(item.data)
46
50
  }],
47
51
  "onClick": () => emit("nodeClick", item.data),
48
- "title": item.data.label
52
+ "title": item.data[props.labelKey]
49
53
  }, [createVNode("div", {
50
54
  "class": "search-cascader__optionText"
51
- }, [item.data.label]), loadingNode.value === item.data ? createVNode(Reload, {
55
+ }, [item.data[props.labelKey]]), loadingNode.value === item.data ? createVNode(Reload, {
52
56
  "class": "rotate"
53
57
  }, null) : item.data.isLeaf ? null : createVNode(ChevronForward, null, null)]);
54
58
  })])]);
@@ -68,6 +72,10 @@ const SearchMenu = defineComponent({
68
72
  onNodeClick: {
69
73
  type: Function
70
74
  },
75
+ labelKey: {
76
+ type: String,
77
+ default: "label"
78
+ },
71
79
  currentNode: {
72
80
  type: Object
73
81
  }
@@ -78,6 +86,7 @@ const SearchMenu = defineComponent({
78
86
  const activeNodes = ref([]);
79
87
  function renderList(options) {
80
88
  return createVNode(SearchMenuList, {
89
+ "labelKey": props.labelKey,
81
90
  "activeNodes": activeNodes.value,
82
91
  "onNodeClick": props.onNodeClick,
83
92
  "options": options
@@ -1 +1 @@
1
- .search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;padding:0 8px 0 16px;width:100%}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:200px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
1
+ .search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;padding:0 8px 0 16px;width:100%}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:300px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, provide, onBeforeUnmount, openBlock, createElementBlock, renderSlot } from 'vue';
2
+ import { uuidGenerator } from '../../../shared/utils/index2.js';
2
3
  import { InjectionShortcutManager } from './constants/index2.js';
3
4
  import '../index2.js';
4
5
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
@@ -12,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  setup(__props) {
13
14
  const props = __props;
14
15
  const shortcutWrapperRef = ref();
15
- const manager = new ShortcutManager(shortcutWrapperRef, props.scope || String(Date.now())).start();
16
+ const manager = new ShortcutManager(shortcutWrapperRef, props.scope || uuidGenerator()).start();
16
17
  provide(InjectionShortcutManager, manager);
17
18
  onBeforeUnmount(() => {
18
19
  manager.destroy();
@@ -103,7 +103,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
103
103
  level_key?: string | undefined;
104
104
  link_key?: string | undefined;
105
105
  link_key_split?: string | undefined;
106
- show_key?: string | undefined;
106
+ show_key?: string[] | undefined;
107
107
  conObj?: import("../../../es/shared/types").AnyObject[] | undefined;
108
108
  conObjFirstLevel?: import("../../../es/shared/types").AnyObject[] | undefined;
109
109
  } | undefined;
@@ -105,7 +105,7 @@ declare const _default: import("vue").DefineComponent<{
105
105
  level_key?: string | undefined;
106
106
  link_key?: string | undefined;
107
107
  link_key_split?: string | undefined;
108
- show_key?: string | undefined;
108
+ show_key?: string[] | undefined;
109
109
  conObj?: import("../../../../es/shared/types").AnyObject[] | undefined;
110
110
  conObjFirstLevel?: import("../../../../es/shared/types").AnyObject[] | undefined;
111
111
  } | undefined;
@@ -0,0 +1,74 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, unref, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
2
+ import img$1 from '../../assets/img/nodata.js';
3
+ import img$3 from '../../assets/img/no-permission.js';
4
+ import img$2 from '../../assets/img/failure.js';
5
+ import img from '../../assets/img/notfound.js';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
7
+
8
+ const _hoisted_1 = { class: "no-data-tip NoData-page" };
9
+ const _hoisted_2 = ["src"];
10
+ const _hoisted_3 = { key: 1 };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "NoData",
13
+ props: {
14
+ noDataTip: {
15
+ type: String,
16
+ default: "\u6682\u65E0\u6570\u636E"
17
+ },
18
+ noDataImg: {
19
+ type: String,
20
+ default: "nodata"
21
+ },
22
+ showImg: {
23
+ type: Boolean,
24
+ default: true
25
+ }
26
+ },
27
+ setup(__props) {
28
+ const props = __props;
29
+ const imgStr = computed(() => {
30
+ let str = null;
31
+ switch (props.noDataImg) {
32
+ case "no-permission":
33
+ str = img$3;
34
+ break;
35
+ case "failure":
36
+ str = img$2;
37
+ break;
38
+ case "nodata":
39
+ str = img$1;
40
+ break;
41
+ default:
42
+ str = img;
43
+ break;
44
+ }
45
+ return str;
46
+ });
47
+ const handleDesc = computed(() => {
48
+ let res = "";
49
+ switch (props.noDataImg) {
50
+ case "no-permission":
51
+ res = "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
52
+ break;
53
+ case "failure":
54
+ res = "\u8BF7\u7A0D\u540E\u518D\u8BD5";
55
+ break;
56
+ }
57
+ return res;
58
+ });
59
+ return (_ctx, _cache) => {
60
+ return openBlock(), createElementBlock("div", _hoisted_1, [
61
+ __props.showImg ? (openBlock(), createElementBlock("img", {
62
+ key: 0,
63
+ src: unref(imgStr),
64
+ alt: ""
65
+ }, null, 8, _hoisted_2)) : createCommentVNode("v-if", true),
66
+ createElementVNode("p", null, toDisplayString(__props.noDataTip), 1),
67
+ unref(handleDesc) ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(handleDesc)), 1)) : createCommentVNode("v-if", true)
68
+ ]);
69
+ };
70
+ }
71
+ });
72
+ var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "NoData.vue"]]);
73
+
74
+ export { script as default };
@@ -0,0 +1,51 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ noDataTip: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ noDataImg: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ showImg: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }, {
15
+ imgStr: import("vue").ComputedRef<null>;
16
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
+ noDataTip: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ noDataImg: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ showImg: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>> & {
30
+ [x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
31
+ }>>;
32
+ handleDesc: import("vue").ComputedRef<string>;
33
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ noDataTip: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ noDataImg: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ showImg: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>>, {
47
+ noDataTip: string;
48
+ noDataImg: string;
49
+ showImg: boolean;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import script from './NoData.vue';
2
+ export default script;