cnhis-design-vue 3.1.22 → 3.1.23-beta.0
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/components/big-table/index.d.ts +8 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +8 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.js +4 -1
- package/es/components/big-table/src/hooks/useSeparateRow2.js +1 -41
- package/es/components/field-set/src/FieldSet.js +5 -1
- package/es/components/form-render/src/hooks/useFormContext2.js +2 -1
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- package/es/components/form-render/src/utils/index.js +1 -10
- package/es/components/iho-table/index.d.ts +141 -277
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.js +52 -31
- package/es/components/iho-table/src/IhoTable.vue.d.ts +142 -278
- package/es/components/iho-table/src/constants/index.d.ts +5 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +8 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +10 -3
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +32 -21
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks2.js +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +177 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +223 -59
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +10 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks2.js +27 -0
- package/es/components/iho-table/src/plugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/index2.js +2 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.d.ts +0 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.js +0 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.js +110 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.vue.d.ts +107 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +158 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.d.ts +14 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils2.js +54 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +2 -1
- package/es/components/iho-table/src/types/index.d.ts +8 -3
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +97 -83
- package/es/components/iho-table/src/types/pluginType.js +1 -1
- package/es/components/iho-table/src/types/pluginType2.js +3 -1
- package/es/components/iho-table/src/utils/index2.js +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.js +3 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/shared/utils/index.d.ts +4 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/index2.js +60 -2
- package/es/shared/utils/tapable/AsyncSeriesHook.js +17 -2
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +0 -1
|
@@ -13,65 +13,229 @@ import { AbstractEventHooks } from '../../types/pluginType2.js';
|
|
|
13
13
|
class EventHooks extends AbstractEventHooks {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
-
this.onKeydownStart = new AsyncParallelHook([
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.
|
|
16
|
+
this.onKeydownStart = new AsyncParallelHook([
|
|
17
|
+
"event",
|
|
18
|
+
"context",
|
|
19
|
+
"config"
|
|
20
|
+
]);
|
|
21
|
+
this.onKeydown = new AsyncParallelHook([
|
|
22
|
+
"event",
|
|
23
|
+
"context",
|
|
24
|
+
"config"
|
|
25
|
+
]);
|
|
26
|
+
this.onKeydownEnd = new AsyncParallelHook([
|
|
27
|
+
"event",
|
|
28
|
+
"context",
|
|
29
|
+
"config"
|
|
30
|
+
]);
|
|
31
|
+
this.onPaste = new AsyncParallelHook([
|
|
32
|
+
"event",
|
|
33
|
+
"context",
|
|
34
|
+
"config"
|
|
35
|
+
]);
|
|
36
|
+
this.onCopy = new AsyncParallelHook([
|
|
37
|
+
"event",
|
|
38
|
+
"context",
|
|
39
|
+
"config"
|
|
40
|
+
]);
|
|
41
|
+
this.onCut = new AsyncParallelHook([
|
|
42
|
+
"event",
|
|
43
|
+
"context",
|
|
44
|
+
"config"
|
|
45
|
+
]);
|
|
46
|
+
this.onCurrentChange = new AsyncParallelHook([
|
|
47
|
+
"event",
|
|
48
|
+
"context",
|
|
49
|
+
"config"
|
|
50
|
+
]);
|
|
51
|
+
this.onRadioChange = new AsyncParallelHook([
|
|
52
|
+
"event",
|
|
53
|
+
"context",
|
|
54
|
+
"config"
|
|
55
|
+
]);
|
|
56
|
+
this.onCheckboxChange = new AsyncParallelHook([
|
|
57
|
+
"event",
|
|
58
|
+
"context",
|
|
59
|
+
"config"
|
|
60
|
+
]);
|
|
61
|
+
this.onCheckboxAll = new AsyncParallelHook([
|
|
62
|
+
"event",
|
|
63
|
+
"context",
|
|
64
|
+
"config"
|
|
65
|
+
]);
|
|
66
|
+
this.onCheckboxRangeStart = new AsyncParallelHook(["event", "context", "config"]);
|
|
67
|
+
this.onCheckboxRangeChange = new AsyncParallelHook(["event", "context", "config"]);
|
|
68
|
+
this.onCheckboxRangeEnd = new AsyncParallelHook(["event", "context", "config"]);
|
|
69
|
+
this.onCellClick = new AsyncParallelHook([
|
|
70
|
+
"event",
|
|
71
|
+
"context",
|
|
72
|
+
"config"
|
|
73
|
+
]);
|
|
74
|
+
this.onCellDblclick = new AsyncParallelHook([
|
|
75
|
+
"event",
|
|
76
|
+
"context",
|
|
77
|
+
"config"
|
|
78
|
+
]);
|
|
79
|
+
this.onCellMenu = new AsyncParallelHook([
|
|
80
|
+
"event",
|
|
81
|
+
"context",
|
|
82
|
+
"config"
|
|
83
|
+
]);
|
|
84
|
+
this.onCellMouseenter = new AsyncParallelHook([
|
|
85
|
+
"event",
|
|
86
|
+
"context",
|
|
87
|
+
"config"
|
|
88
|
+
]);
|
|
89
|
+
this.onCellMouseleave = new AsyncParallelHook([
|
|
90
|
+
"event",
|
|
91
|
+
"context",
|
|
92
|
+
"config"
|
|
93
|
+
]);
|
|
94
|
+
this.onHeaderCellClick = new AsyncParallelHook([
|
|
95
|
+
"event",
|
|
96
|
+
"context",
|
|
97
|
+
"config"
|
|
98
|
+
]);
|
|
99
|
+
this.onHeaderCellDblclick = new AsyncParallelHook(["event", "context", "config"]);
|
|
100
|
+
this.onHeaderCellMenu = new AsyncParallelHook([
|
|
101
|
+
"event",
|
|
102
|
+
"context",
|
|
103
|
+
"config"
|
|
104
|
+
]);
|
|
105
|
+
this.onFooterCellClick = new AsyncParallelHook([
|
|
106
|
+
"event",
|
|
107
|
+
"context",
|
|
108
|
+
"config"
|
|
109
|
+
]);
|
|
110
|
+
this.onFooterCellDblclick = new AsyncParallelHook(["event", "context", "config"]);
|
|
111
|
+
this.onFooterCellMenu = new AsyncParallelHook([
|
|
112
|
+
"event",
|
|
113
|
+
"context",
|
|
114
|
+
"config"
|
|
115
|
+
]);
|
|
116
|
+
this.onSortChange = new AsyncParallelHook([
|
|
117
|
+
"event",
|
|
118
|
+
"context",
|
|
119
|
+
"config"
|
|
120
|
+
]);
|
|
121
|
+
this.onFilterChange = new AsyncParallelHook([
|
|
122
|
+
"event",
|
|
123
|
+
"context",
|
|
124
|
+
"config"
|
|
125
|
+
]);
|
|
126
|
+
this.onFilterVisible = new AsyncParallelHook([
|
|
127
|
+
"event",
|
|
128
|
+
"context",
|
|
129
|
+
"config"
|
|
130
|
+
]);
|
|
131
|
+
this.onResizableChange = new AsyncParallelHook([
|
|
132
|
+
"event",
|
|
133
|
+
"context",
|
|
134
|
+
"config"
|
|
135
|
+
]);
|
|
136
|
+
this.onToggleRowExpand = new AsyncParallelHook([
|
|
137
|
+
"event",
|
|
138
|
+
"context",
|
|
139
|
+
"config"
|
|
140
|
+
]);
|
|
141
|
+
this.onToggleTreeExpand = new AsyncParallelHook(["event", "context", "config"]);
|
|
142
|
+
this.onMenuClick = new AsyncParallelHook([
|
|
143
|
+
"event",
|
|
144
|
+
"context",
|
|
145
|
+
"config"
|
|
146
|
+
]);
|
|
147
|
+
this.onEditClosed = new AsyncParallelHook([
|
|
148
|
+
"event",
|
|
149
|
+
"context",
|
|
150
|
+
"config"
|
|
151
|
+
]);
|
|
152
|
+
this.onEditActived = new AsyncParallelHook([
|
|
153
|
+
"event",
|
|
154
|
+
"context",
|
|
155
|
+
"config"
|
|
156
|
+
]);
|
|
157
|
+
this.onEditDisabled = new AsyncParallelHook([
|
|
158
|
+
"event",
|
|
159
|
+
"context",
|
|
160
|
+
"config"
|
|
161
|
+
]);
|
|
162
|
+
this.onValidError = new AsyncParallelHook([
|
|
163
|
+
"event",
|
|
164
|
+
"context",
|
|
165
|
+
"config"
|
|
166
|
+
]);
|
|
167
|
+
this.onScroll = new AsyncParallelHook([
|
|
168
|
+
"event",
|
|
169
|
+
"context",
|
|
170
|
+
"config"
|
|
171
|
+
]);
|
|
172
|
+
this.onCustom = new AsyncParallelHook([
|
|
173
|
+
"event",
|
|
174
|
+
"context",
|
|
175
|
+
"config"
|
|
176
|
+
]);
|
|
177
|
+
this.onOpenFnr = new AsyncParallelHook([
|
|
178
|
+
"event",
|
|
179
|
+
"context",
|
|
180
|
+
"config"
|
|
181
|
+
]);
|
|
182
|
+
this.onFnrChange = new AsyncParallelHook([
|
|
183
|
+
"event",
|
|
184
|
+
"context",
|
|
185
|
+
"config"
|
|
186
|
+
]);
|
|
187
|
+
this.onFnrFind = new AsyncParallelHook([
|
|
188
|
+
"event",
|
|
189
|
+
"context",
|
|
190
|
+
"config"
|
|
191
|
+
]);
|
|
192
|
+
this.onFnrFindAll = new AsyncParallelHook([
|
|
193
|
+
"event",
|
|
194
|
+
"context",
|
|
195
|
+
"config"
|
|
196
|
+
]);
|
|
197
|
+
this.onFnrReplace = new AsyncParallelHook([
|
|
198
|
+
"event",
|
|
199
|
+
"context",
|
|
200
|
+
"config"
|
|
201
|
+
]);
|
|
202
|
+
this.onFnrReplaceAll = new AsyncParallelHook([
|
|
203
|
+
"event",
|
|
204
|
+
"context",
|
|
205
|
+
"config"
|
|
206
|
+
]);
|
|
207
|
+
this.onCellAreaCopy = new AsyncParallelHook([
|
|
208
|
+
"event",
|
|
209
|
+
"context",
|
|
210
|
+
"config"
|
|
211
|
+
]);
|
|
212
|
+
this.onCellAreaCut = new AsyncParallelHook([
|
|
213
|
+
"event",
|
|
214
|
+
"context",
|
|
215
|
+
"config"
|
|
216
|
+
]);
|
|
217
|
+
this.onCellAreaPaste = new AsyncParallelHook([
|
|
218
|
+
"event",
|
|
219
|
+
"context",
|
|
220
|
+
"config"
|
|
221
|
+
]);
|
|
222
|
+
this.onCellAreaMerge = new AsyncParallelHook([
|
|
223
|
+
"event",
|
|
224
|
+
"context",
|
|
225
|
+
"config"
|
|
226
|
+
]);
|
|
227
|
+
this.onClearCellAreaMerge = new AsyncParallelHook(["event", "context", "config"]);
|
|
228
|
+
this.onHeaderCellAreaSelection = new AsyncParallelHook(["event", "context", "config"]);
|
|
229
|
+
this.onCellAreaSelectionStart = new AsyncParallelHook(["event", "context", "config"]);
|
|
230
|
+
this.onCellAreaSelectionDrag = new AsyncParallelHook(["event", "context", "config"]);
|
|
231
|
+
this.onCellAreaSelectionEnd = new AsyncParallelHook(["event", "context", "config"]);
|
|
232
|
+
this.onCellAreaExtensionStart = new AsyncParallelHook(["event", "context", "config"]);
|
|
233
|
+
this.onCellAreaExtensionDrag = new AsyncParallelHook(["event", "context", "config"]);
|
|
234
|
+
this.onCellAreaExtensionEnd = new AsyncParallelHook(["event", "context", "config"]);
|
|
235
|
+
this.onCellAreaArrowsStart = new AsyncParallelHook(["event", "context", "config"]);
|
|
236
|
+
this.onCellAreaArrowsEnd = new AsyncParallelHook(["event", "context", "config"]);
|
|
237
|
+
this.onActiveCellChangeStart = new AsyncParallelHook(["event", "context", "config"]);
|
|
238
|
+
this.onActiveCellChangeEnd = new AsyncParallelHook(["event", "context", "config"]);
|
|
75
239
|
}
|
|
76
240
|
}
|
|
77
241
|
function useEventHooks() {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SyncHook } from '../../../../../../es/shared/utils/tapable';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { AbstractSetupHooks, IhoTableConfig, IhoTableFieldItem } from '../../../../../../es/components/iho-table';
|
|
4
|
+
declare class SetupHooks extends AbstractSetupHooks {
|
|
5
|
+
readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>], void, import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
|
+
}
|
|
7
|
+
export declare function useSetupHooks(): {
|
|
8
|
+
create: () => SetupHooks;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSetupHooks } from './useSetupHooks2.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import SyncHook from '../../../../../shared/utils/tapable/SyncHook.js';
|
|
2
|
+
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
3
|
+
import '../../../../../shared/utils/tapable/SyncWaterfallHook.js';
|
|
4
|
+
import '../../../../../shared/utils/tapable/SyncLoopHook.js';
|
|
5
|
+
import '../../../../../shared/utils/tapable/AsyncParallelHook.js';
|
|
6
|
+
import '../../../../../shared/utils/tapable/AsyncParallelBailHook.js';
|
|
7
|
+
import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
8
|
+
import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
9
|
+
import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
10
|
+
import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
11
|
+
import '../../../index2.js';
|
|
12
|
+
import { AbstractSetupHooks } from '../../types/pluginType2.js';
|
|
13
|
+
|
|
14
|
+
class SetupHooks extends AbstractSetupHooks {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.setup = new SyncHook(["config", "fieldList"]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function useSetupHooks() {
|
|
21
|
+
function create() {
|
|
22
|
+
return new SetupHooks();
|
|
23
|
+
}
|
|
24
|
+
return { create };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useSetupHooks };
|
|
@@ -6,5 +6,6 @@ export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlug
|
|
|
6
6
|
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
7
7
|
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
8
8
|
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
9
|
-
export { inputRendererPlugins } from './rendererPlugins/
|
|
9
|
+
export { inputRendererPlugins } from './rendererPlugins/editableWidgets/inputRendererPlugins.js';
|
|
10
|
+
export { separateRendererPlugins } from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
10
11
|
export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
|
|
@@ -6,5 +6,6 @@ export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlug
|
|
|
6
6
|
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
7
7
|
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
8
8
|
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
9
|
-
export { inputRendererPlugins } from './rendererPlugins/
|
|
9
|
+
export { inputRendererPlugins } from './rendererPlugins/editableWidgets/inputRendererPlugins.js';
|
|
10
|
+
export { separateRendererPlugins } from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
10
11
|
export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
|
|
@@ -13,7 +13,8 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
13
13
|
field: _field.columnName,
|
|
14
14
|
width: _field.colWidth,
|
|
15
15
|
showOverflow: "tooltip",
|
|
16
|
-
...pick(_field, ["title"])
|
|
16
|
+
...pick(_field, ["title"]),
|
|
17
|
+
context: _field.context || {}
|
|
17
18
|
};
|
|
18
19
|
settingObjAdaptor(_field.settingObj, result);
|
|
19
20
|
return result;
|
|
File without changes
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, watch, computed, onMounted, onDeactivated, openBlock, createBlock, unref, withCtx, createElementVNode, withModifiers, normalizeStyle, toDisplayString } from 'vue';
|
|
2
|
+
import script from '../../../../../../../shared/components/SlotRender/SlotRender.js';
|
|
3
|
+
import { cloneDeep, isObject, isArray } from 'lodash-es';
|
|
4
|
+
import { NPopover, NInput } from 'naive-ui';
|
|
5
|
+
import { InjectionIhoTableEmits, InjectionIhoTableHandler } from '../../../../constants/index2.js';
|
|
6
|
+
import _export_sfc from '../../../../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
|
+
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "edit-separate",
|
|
10
|
+
props: {
|
|
11
|
+
value: {},
|
|
12
|
+
height: { type: Number },
|
|
13
|
+
column: { type: Object, required: true },
|
|
14
|
+
row: { type: Object, required: true },
|
|
15
|
+
displayContent: { type: String, default: "" },
|
|
16
|
+
dataIndex: { type: Number, required: true }
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:value"],
|
|
19
|
+
setup(__props, { emit }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const globEmit = inject(InjectionIhoTableEmits);
|
|
22
|
+
const tableHandler = inject(InjectionIhoTableHandler);
|
|
23
|
+
const popoverRef = ref();
|
|
24
|
+
const editContent = ref();
|
|
25
|
+
const show = ref(false);
|
|
26
|
+
function setShow(v) {
|
|
27
|
+
show.value = v;
|
|
28
|
+
}
|
|
29
|
+
watch(show, updateShow);
|
|
30
|
+
async function onShow() {
|
|
31
|
+
var _a;
|
|
32
|
+
editContent.value = cloneDeep(props.value);
|
|
33
|
+
await new Promise((resolve) => setTimeout(resolve));
|
|
34
|
+
(_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
async function onClose() {
|
|
38
|
+
if (!isObject(editContent.value) && !isArray(editContent.value)) {
|
|
39
|
+
if (props.value === editContent.value)
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
emit("update:value", editContent.value);
|
|
43
|
+
globEmit("formChange", {
|
|
44
|
+
value: editContent.value,
|
|
45
|
+
row: props.row,
|
|
46
|
+
column: props.column,
|
|
47
|
+
index: props.dataIndex
|
|
48
|
+
});
|
|
49
|
+
tableHandler.updateTableDataRef();
|
|
50
|
+
}
|
|
51
|
+
function updateShow(show2) {
|
|
52
|
+
show2 ? onShow() : onClose();
|
|
53
|
+
}
|
|
54
|
+
const style = computed(() => ({
|
|
55
|
+
border: "1px solid #f5f5f5",
|
|
56
|
+
height: props.height + "px",
|
|
57
|
+
padding: "4px 0 4px 0",
|
|
58
|
+
background: "white",
|
|
59
|
+
boxSizing: "border-box",
|
|
60
|
+
"border-radius": "4px"
|
|
61
|
+
}));
|
|
62
|
+
const elementRef = ref();
|
|
63
|
+
onMounted(() => {
|
|
64
|
+
console.log(elementRef.value);
|
|
65
|
+
});
|
|
66
|
+
onDeactivated(onClose);
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return openBlock(), createBlock(unref(NPopover), {
|
|
69
|
+
ref_key: "popoverRef",
|
|
70
|
+
ref: popoverRef,
|
|
71
|
+
trigger: "manual",
|
|
72
|
+
show: show.value,
|
|
73
|
+
"onUpdate:show": _cache[3] || (_cache[3] = ($event) => show.value = $event),
|
|
74
|
+
"show-arrow": false
|
|
75
|
+
}, {
|
|
76
|
+
trigger: withCtx(() => [
|
|
77
|
+
createElementVNode("div", {
|
|
78
|
+
ref_key: "elementRef",
|
|
79
|
+
ref: elementRef,
|
|
80
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => show.value = !show.value, ["stop"])),
|
|
81
|
+
style: normalizeStyle(unref(style))
|
|
82
|
+
}, toDisplayString(__props.displayContent || " "), 5)
|
|
83
|
+
]),
|
|
84
|
+
default: withCtx(() => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
return [
|
|
87
|
+
((_a = __props.column.context) == null ? void 0 : _a.separateSlot) ? (openBlock(), createBlock(unref(script), {
|
|
88
|
+
key: 0,
|
|
89
|
+
renderer: (_b = __props.column.context) == null ? void 0 : _b.separateSlot,
|
|
90
|
+
value: editContent.value,
|
|
91
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => editContent.value = $event),
|
|
92
|
+
"onUpdate:show": setShow,
|
|
93
|
+
col: __props.column,
|
|
94
|
+
row: __props.row
|
|
95
|
+
}, null, 8, ["renderer", "value", "col", "row"])) : (openBlock(), createBlock(unref(NInput), {
|
|
96
|
+
key: 1,
|
|
97
|
+
value: editContent.value,
|
|
98
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => editContent.value = $event),
|
|
99
|
+
type: "textarea"
|
|
100
|
+
}, null, 8, ["value"]))
|
|
101
|
+
];
|
|
102
|
+
}),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 8, ["show"]);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
var EditSeparate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "edit-separate.vue"]]);
|
|
109
|
+
|
|
110
|
+
export { EditSeparate as default };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
2
|
+
import { CSSProperties, PropType } from 'vue';
|
|
3
|
+
import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
value: {};
|
|
6
|
+
height: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
};
|
|
9
|
+
column: {
|
|
10
|
+
type: PropType<IhoTableFieldItem>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
row: {
|
|
14
|
+
type: PropType<AnyObject>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
displayContent: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
dataIndex: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
value: {};
|
|
28
|
+
height: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
};
|
|
31
|
+
column: {
|
|
32
|
+
type: PropType<IhoTableFieldItem>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
row: {
|
|
36
|
+
type: PropType<AnyObject>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
displayContent: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
dataIndex: {
|
|
44
|
+
type: NumberConstructor;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
}>>;
|
|
50
|
+
globEmit: (event: string, ...args: unknown[]) => void;
|
|
51
|
+
tableHandler: import("../../../../../../../../es/components/iho-table").IhoTableHandler;
|
|
52
|
+
popoverRef: import("vue").Ref<any>;
|
|
53
|
+
editContent: import("vue").Ref<any>;
|
|
54
|
+
show: import("vue").Ref<boolean>;
|
|
55
|
+
setShow: (v: boolean) => void;
|
|
56
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
57
|
+
onShow: () => Promise<void>;
|
|
58
|
+
onClose: () => Promise<void>;
|
|
59
|
+
updateShow: (show: boolean) => void;
|
|
60
|
+
style: import("vue").ComputedRef<CSSProperties>;
|
|
61
|
+
elementRef: import("vue").Ref<any>;
|
|
62
|
+
SlotRender: import("vue").DefineComponent<{
|
|
63
|
+
renderer: {
|
|
64
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../../../es/shared/types").Func<any[], any>>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
rootSlots: {
|
|
68
|
+
type: PropType<Record<string, import("../../../../../../../../es/shared/types").Func<any[], any>>>;
|
|
69
|
+
};
|
|
70
|
+
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
71
|
+
renderer: {
|
|
72
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../../../es/shared/types").Func<any[], any>>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
rootSlots: {
|
|
76
|
+
type: PropType<Record<string, import("../../../../../../../../es/shared/types").Func<any[], any>>>;
|
|
77
|
+
};
|
|
78
|
+
}>>, {}>;
|
|
79
|
+
NPopover: any;
|
|
80
|
+
NInput: any;
|
|
81
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
82
|
+
value: {};
|
|
83
|
+
height: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
};
|
|
86
|
+
column: {
|
|
87
|
+
type: PropType<IhoTableFieldItem>;
|
|
88
|
+
required: true;
|
|
89
|
+
};
|
|
90
|
+
row: {
|
|
91
|
+
type: PropType<AnyObject>;
|
|
92
|
+
required: true;
|
|
93
|
+
};
|
|
94
|
+
displayContent: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
dataIndex: {
|
|
99
|
+
type: NumberConstructor;
|
|
100
|
+
required: true;
|
|
101
|
+
};
|
|
102
|
+
}>> & {
|
|
103
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
displayContent: string;
|
|
106
|
+
}>;
|
|
107
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function separateRendererPlugins(): import("../../../../../../../../es/components/iho-table").TablePlugin;
|