cnhis-design-vue 3.1.43-beta.0 → 3.1.43-beta.1
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/README.md +87 -87
- package/es/components/big-table/src/hooks/useEdit.d.ts +26 -26
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.d.ts +27 -2
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +20 -20
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +28 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +27 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/types/index.d.ts +7 -24
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +4 -4
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +20 -20
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-person/index.d.ts +13 -0
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue.d.ts +13 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +15 -0
- package/es/shared/types/business.js +1 -0
- package/es/shared/types/index.d.ts +1 -1
- package/es/shared/utils/business.d.ts +11 -0
- package/es/shared/utils/business.js +1 -0
- package/es/shared/utils/index.d.ts +1 -5
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +65 -65
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.d.ts +0 -11
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/fieldConnectionUtils.js +0 -1
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
@@ -194,11 +194,11 @@ export declare const comps: {
|
|
|
194
194
|
}>;
|
|
195
195
|
separate: import("vue").DefineComponent<{
|
|
196
196
|
col: {
|
|
197
|
-
type: import("vue").PropType<import("
|
|
197
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
198
198
|
required: true;
|
|
199
199
|
};
|
|
200
200
|
row: {
|
|
201
|
-
type: import("vue").PropType<import("
|
|
201
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
202
202
|
required: true;
|
|
203
203
|
};
|
|
204
204
|
index: {
|
|
@@ -208,11 +208,11 @@ export declare const comps: {
|
|
|
208
208
|
}, {
|
|
209
209
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
210
210
|
col: {
|
|
211
|
-
type: import("vue").PropType<import("
|
|
211
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
212
212
|
required: true;
|
|
213
213
|
};
|
|
214
214
|
row: {
|
|
215
|
-
type: import("vue").PropType<import("
|
|
215
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
216
216
|
required: true;
|
|
217
217
|
};
|
|
218
218
|
index: {
|
|
@@ -227,93 +227,93 @@ export declare const comps: {
|
|
|
227
227
|
setShow: (v: boolean) => void;
|
|
228
228
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
229
229
|
editContent: import("vue").Ref<any>;
|
|
230
|
-
getRowData: (row: import("
|
|
230
|
+
getRowData: (row: import("../../..").AnyObject) => {
|
|
231
231
|
separateData: Record<string, string>;
|
|
232
232
|
index: number;
|
|
233
|
-
rawRow: import("
|
|
234
|
-
row: import("
|
|
233
|
+
rawRow: import("../../..").AnyObject;
|
|
234
|
+
row: import("../../..").AnyObject;
|
|
235
235
|
colspans?: Record<string, number> | undefined;
|
|
236
236
|
} | undefined;
|
|
237
237
|
onShow: (target: {
|
|
238
238
|
separateData: Record<string, string>;
|
|
239
239
|
index: number;
|
|
240
|
-
rawRow: import("
|
|
241
|
-
row: import("
|
|
240
|
+
rawRow: import("../../..").AnyObject;
|
|
241
|
+
row: import("../../..").AnyObject;
|
|
242
242
|
colspans?: Record<string, number> | undefined;
|
|
243
243
|
} | undefined) => Promise<void>;
|
|
244
244
|
onClose: (target: {
|
|
245
245
|
separateData: Record<string, string>;
|
|
246
246
|
index: number;
|
|
247
|
-
rawRow: import("
|
|
248
|
-
row: import("
|
|
247
|
+
rawRow: import("../../..").AnyObject;
|
|
248
|
+
row: import("../../..").AnyObject;
|
|
249
249
|
colspans?: Record<string, number> | undefined;
|
|
250
250
|
} | undefined) => Promise<void>;
|
|
251
251
|
updateShow: (show: boolean) => void;
|
|
252
252
|
style: import("vue").CSSProperties;
|
|
253
253
|
SlotRender: import("vue").DefineComponent<{
|
|
254
254
|
renderer: {
|
|
255
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("
|
|
255
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").Func<any[], any>>;
|
|
256
256
|
required: true;
|
|
257
257
|
};
|
|
258
258
|
rootSlots: {
|
|
259
|
-
type: import("vue").PropType<Record<string, import("
|
|
259
|
+
type: import("vue").PropType<Record<string, import("../../..").Func<any[], any>>>;
|
|
260
260
|
};
|
|
261
261
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
262
262
|
renderer: {
|
|
263
|
-
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("
|
|
263
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").Func<any[], any>>;
|
|
264
264
|
required: true;
|
|
265
265
|
};
|
|
266
266
|
rootSlots: {
|
|
267
|
-
type: import("vue").PropType<Record<string, import("
|
|
267
|
+
type: import("vue").PropType<Record<string, import("../../..").Func<any[], any>>>;
|
|
268
268
|
};
|
|
269
269
|
}>>, {}>;
|
|
270
270
|
NPopover: any;
|
|
271
271
|
NInput: any;
|
|
272
272
|
Separate: import("vue").DefineComponent<{
|
|
273
273
|
col: {
|
|
274
|
-
type: import("vue").PropType<import("
|
|
274
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
275
275
|
required: true;
|
|
276
276
|
};
|
|
277
277
|
row: {
|
|
278
|
-
type: import("vue").PropType<import("
|
|
278
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
279
279
|
required: true;
|
|
280
280
|
};
|
|
281
281
|
}, {
|
|
282
282
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
283
283
|
col: {
|
|
284
|
-
type: import("vue").PropType<import("
|
|
284
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
285
285
|
required: true;
|
|
286
286
|
};
|
|
287
287
|
row: {
|
|
288
|
-
type: import("vue").PropType<import("
|
|
288
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
289
289
|
required: true;
|
|
290
290
|
};
|
|
291
291
|
}>> & {}>>;
|
|
292
|
-
separateDataMap: import("vue").Ref<WeakMap<import("
|
|
292
|
+
separateDataMap: import("vue").Ref<WeakMap<import("../../..").AnyObject, {
|
|
293
293
|
separateData: Record<string, string>;
|
|
294
294
|
index: number;
|
|
295
|
-
rawRow: import("
|
|
296
|
-
row: import("
|
|
295
|
+
rawRow: import("../../..").AnyObject;
|
|
296
|
+
row: import("../../..").AnyObject;
|
|
297
297
|
colspans?: Record<string, number> | undefined;
|
|
298
298
|
}>>;
|
|
299
299
|
displayContent: import("vue").ComputedRef<string>;
|
|
300
300
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
301
301
|
col: {
|
|
302
|
-
type: import("vue").PropType<import("
|
|
302
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
303
303
|
required: true;
|
|
304
304
|
};
|
|
305
305
|
row: {
|
|
306
|
-
type: import("vue").PropType<import("
|
|
306
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
307
307
|
required: true;
|
|
308
308
|
};
|
|
309
309
|
}>>, {}>;
|
|
310
310
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
311
311
|
col: {
|
|
312
|
-
type: import("vue").PropType<import("
|
|
312
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
313
313
|
required: true;
|
|
314
314
|
};
|
|
315
315
|
row: {
|
|
316
|
-
type: import("vue").PropType<import("
|
|
316
|
+
type: import("vue").PropType<import("../../..").AnyObject>;
|
|
317
317
|
required: true;
|
|
318
318
|
};
|
|
319
319
|
index: {
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -419,7 +419,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
419
419
|
file: import("naive-ui").UploadFileInfo;
|
|
420
420
|
fileList: import("naive-ui").UploadFileInfo[];
|
|
421
421
|
}) => Promise<unknown>;
|
|
422
|
-
submit: (datas: import("
|
|
422
|
+
submit: (datas: import("../../..").AnyObject) => Promise<unknown>;
|
|
423
423
|
validateFormat: () => boolean;
|
|
424
424
|
NForm: any;
|
|
425
425
|
NFormItem: import("vue").DefineComponent<{
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
|
-
declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
updateUnchangedValue: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
};
|
|
6
|
+
onConfirm: {
|
|
7
|
+
type: FunctionConstructor;
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
3
10
|
attrs: {
|
|
4
11
|
[x: string]: unknown;
|
|
5
12
|
};
|
|
13
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
updateUnchangedValue: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
};
|
|
17
|
+
onConfirm: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
};
|
|
20
|
+
}>> & {}>>;
|
|
6
21
|
datePickerRef: import("vue").Ref<import("../../../es/shared/types").AnyObject | null>;
|
|
7
22
|
panelInstRef: import("vue").Ref<null>;
|
|
8
23
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
@@ -11,6 +26,16 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
11
26
|
focus: () => any;
|
|
12
27
|
blur: () => any;
|
|
13
28
|
onUpdateShow: (show: boolean) => void;
|
|
29
|
+
onConfirm: () => void;
|
|
14
30
|
NDatePicker: any;
|
|
15
|
-
},
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
updateUnchangedValue: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
};
|
|
35
|
+
onConfirm: {
|
|
36
|
+
type: FunctionConstructor;
|
|
37
|
+
};
|
|
38
|
+
}>>, {
|
|
39
|
+
updateUnchangedValue: boolean;
|
|
40
|
+
}>>;
|
|
16
41
|
export default DatePicker;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
updateUnchangedValue: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
};
|
|
6
|
+
onConfirm: {
|
|
7
|
+
type: FunctionConstructor;
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
3
10
|
attrs: {
|
|
4
11
|
[x: string]: unknown;
|
|
5
12
|
};
|
|
13
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
updateUnchangedValue: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
};
|
|
17
|
+
onConfirm: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
};
|
|
20
|
+
}>> & {}>>;
|
|
6
21
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
7
22
|
panelInstRef: import("vue").Ref<null>;
|
|
8
23
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
@@ -11,6 +26,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
11
26
|
focus: () => any;
|
|
12
27
|
blur: () => any;
|
|
13
28
|
onUpdateShow: (show: boolean) => void;
|
|
29
|
+
onConfirm: () => void;
|
|
14
30
|
NDatePicker: any;
|
|
15
|
-
},
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
updateUnchangedValue: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
};
|
|
35
|
+
onConfirm: {
|
|
36
|
+
type: FunctionConstructor;
|
|
37
|
+
};
|
|
38
|
+
}>>, {
|
|
39
|
+
updateUnchangedValue: boolean;
|
|
40
|
+
}>;
|
|
16
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as n,computed as l,openBlock as u,createBlock as a,unref as o,mergeProps as r,createSlots as i,renderList as s,withCtx as p,renderSlot as v,nextTick as d}from"vue";import{NDatePicker as f}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import{format as m}from"date-fns";import y from"../../../_virtual/plugin-vue_export-helper.js";var h=y(e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function}},setup(e,{expose:y}){const h=e,g=t(),_=n(null),k=n(null),M=l((()=>{const e=Reflect.get(g,"type")||"";return["datetime","datetimerange"].includes(e)})),R=l((()=>{if(Reflect.get(g,"format"))return g.format;const e=g.type||"";return M.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),$=l((()=>M.value?R.value.split(" "):"")),{focus:w,blur:x}=c(_,R,g);function D(e){e&&M.value&&d((()=>{var e;k.value=null==(e=_.value)?void 0:e.panelInstRef,c(k,$,g)}))}function E(){var e,t,n,l,u;null==(e=h.onConfirm)||e.call(h);const a=Reflect.get(g,"type")||"",o=null==(u=null==(l=null==(n=null==(t=_.value)?void 0:t.inputInstRef)?void 0:n.$el)?void 0:l.querySelector)?void 0:u.call(l,"input");if(!(null==o?void 0:o.value)||!h.updateUnchangedValue||a.includes("range"))return;const r=o.value;o.value=m(new Date,R.value),o.dispatchEvent(new InputEvent("input")),o.value=r,o.dispatchEvent(new InputEvent("input"))}return y({$datePicker:_,focus:w,blur:x}),(e,t)=>(u(),a(o(f),r({ref_key:"datePickerRef",ref:_},e.$attrs,{"onUpdate:show":D,onConfirm:E}),i({_:2},[s(e.$slots,((t,n)=>({name:n,fn:p((()=>[v(e.$slots,n)]))})))]),1040))}}),[["__file","DatePicker.vue"]]);export{h as default};
|