cnhis-design-vue 3.1.43-beta.11 → 3.1.43-beta.12
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/base-search/index.d.ts +4 -0
- package/es/components/base-search/src/index.vue.d.ts +4 -0
- package/es/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/classification/index.d.ts +3 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -1
- package/es/components/classification/src/index.vue.d.ts +3 -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/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- 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/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/utils/dist/index.d.ts +44 -0
- package/es/components/index.css +1 -1
- package/es/components/quick-search/style/index.css +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/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/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
- package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +3 -28
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.d.ts +117 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +17 -0
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +5 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +124 -19
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +3 -1
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
form: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
item: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
isLock: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
item: {
|
|
21
|
+
type: ObjectConstructor;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
isLock: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
item: Record<string, any>;
|
|
32
|
+
isLock: boolean;
|
|
33
|
+
form: Record<string, any>;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
declare const _default: vue_1.DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
changeSize: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
closable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
modalWidth: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
modalHeight: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
handleOk: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
cancel: {
|
|
28
|
+
type: FunctionConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
visible: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
36
|
+
title: {
|
|
37
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
changeSize: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
closable: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
modalWidth: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
modalHeight: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
handleOk: {
|
|
57
|
+
type: FunctionConstructor;
|
|
58
|
+
default: () => {};
|
|
59
|
+
};
|
|
60
|
+
cancel: {
|
|
61
|
+
type: FunctionConstructor;
|
|
62
|
+
default: () => {};
|
|
63
|
+
};
|
|
64
|
+
visible: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
}>> & {
|
|
69
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
closable: boolean;
|
|
73
|
+
title: string | Function;
|
|
74
|
+
visible: boolean;
|
|
75
|
+
modalWidth: string;
|
|
76
|
+
modalHeight: string;
|
|
77
|
+
handleOk: Function;
|
|
78
|
+
changeSize: boolean;
|
|
79
|
+
cancel: Function;
|
|
80
|
+
}>;
|
|
81
|
+
export default _default;
|
|
82
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
2
|
+
export const SearchMenu: vue_1.DefineComponent<{
|
|
3
|
+
childKey: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
labelKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
valueKey: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
currentNode: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
cursorNode: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
};
|
|
25
|
+
}, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
|
|
26
|
+
childKey: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ArrayConstructor;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
valueKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
currentNode: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
};
|
|
45
|
+
cursorNode: {
|
|
46
|
+
type: ObjectConstructor;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
onNodeClick?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
onChangeCursor?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
options: unknown[];
|
|
53
|
+
valueKey: string;
|
|
54
|
+
childKey: string;
|
|
55
|
+
labelKey: string;
|
|
56
|
+
}>;
|
|
57
|
+
import vue_1 = require("vue");
|
|
@@ -50,7 +50,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
DATE: string;
|
|
51
51
|
DATE_TIME: string;
|
|
52
52
|
CHECKBOX_GROUP: string;
|
|
53
|
-
|
|
53
|
+
INPUTNUMBER_RANGE: string;
|
|
54
|
+
DATE_RANGE: string;
|
|
55
|
+
DATETIME_RANGE: string;
|
|
54
56
|
};
|
|
55
57
|
WidgetValEnums: {
|
|
56
58
|
CUSTOM: string;
|
|
@@ -170,7 +170,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
170
170
|
DATE: string;
|
|
171
171
|
DATE_TIME: string;
|
|
172
172
|
CHECKBOX_GROUP: string;
|
|
173
|
-
|
|
173
|
+
INPUTNUMBER_RANGE: string;
|
|
174
|
+
DATE_RANGE: string;
|
|
175
|
+
DATETIME_RANGE: string;
|
|
174
176
|
};
|
|
175
177
|
WidgetValEnums: {
|
|
176
178
|
CUSTOM: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const l=[{value:"TODAY",label:"今天"},{value:"TOMORROW",label:"明天"},{value:"YESTERDAY",label:"昨天"},{value:"THIS_WEEK",label:"本周"},{value:"NEXT_WEEK",label:"下周"},{value:"PREV_WEEK",label:"上周"},{value:"THIS_MONTH",label:"本月"},{value:"NEXT_MONTH",label:"下月"},{value:"PREV_MONTH",label:"上月"},{value:"THIS_QUATER",label:"本季度"},{value:"NEXT_QUATER",label:"下季度"},{value:"PREV_QUATER",label:"上季度"},{value:"THIS_YEAR",label:"本年"},{value:"NEXT_YEAR",label:"下年"},{value:"PREV_YEAR",label:"上年"}];export{l as DateRangeOptions};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
declare type ITypeDate = 'date' | 'datetime'
|
|
2
|
+
declare type ITypeDate = 'date' | 'datetime';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
type: {
|
|
5
5
|
type: PropType<ITypeDate>;
|
|
@@ -13,14 +13,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: StringConstructor;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
-
startPlaceholder: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
endPlaceholder: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
16
|
placeholder: {
|
|
25
17
|
type: StringConstructor;
|
|
26
18
|
default: string;
|
|
@@ -43,14 +35,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
35
|
type: StringConstructor;
|
|
44
36
|
default: string;
|
|
45
37
|
};
|
|
46
|
-
startPlaceholder: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
default: string;
|
|
49
|
-
};
|
|
50
|
-
endPlaceholder: {
|
|
51
|
-
type: StringConstructor;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
38
|
placeholder: {
|
|
55
39
|
type: StringConstructor;
|
|
56
40
|
default: string;
|
|
@@ -64,7 +48,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
48
|
}>>;
|
|
65
49
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
66
50
|
valueCp: import("vue").Ref<any>;
|
|
67
|
-
|
|
51
|
+
dateFormat: import("vue").ComputedRef<string>;
|
|
52
|
+
handleChange: (val: any) => void;
|
|
68
53
|
NDatePicker: any;
|
|
69
54
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
55
|
type: {
|
|
@@ -79,14 +64,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
64
|
type: StringConstructor;
|
|
80
65
|
default: string;
|
|
81
66
|
};
|
|
82
|
-
startPlaceholder: {
|
|
83
|
-
type: StringConstructor;
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
endPlaceholder: {
|
|
87
|
-
type: StringConstructor;
|
|
88
|
-
default: string;
|
|
89
|
-
};
|
|
90
67
|
placeholder: {
|
|
91
68
|
type: StringConstructor;
|
|
92
69
|
default: string;
|
|
@@ -102,8 +79,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
79
|
value: string;
|
|
103
80
|
placeholder: string;
|
|
104
81
|
clearable: boolean;
|
|
105
|
-
startPlaceholder: string;
|
|
106
|
-
endPlaceholder: string;
|
|
107
82
|
valueFormat: string;
|
|
108
83
|
}>;
|
|
109
84
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,watch as l,openBlock as
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as o}from"vue";import{NDatePicker as p}from"naive-ui";import m from"moment";import{isString as v}from"lodash-es";import i from"../../../../../../_virtual/plugin-vue_export-helper.js";var d=i(e({__name:"Date",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:i}){const d=e,n=a(),f=t((()=>{let e="";switch(d.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e}));function c(e){n.value=e;const a=e?m(e).format(f.value):e;i("update:value",a)}return l((()=>d.value),(e=>{e&&v(e)?n.value=m(e).valueOf():n.value=null}),{immediate:!0}),(a,t)=>(r(),u(o(p),{type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:n.value,"onUpdate:value":c},null,8,["type","clearable","valueFormat","placeholder","value"]))}}),[["__file","Date.vue"]]);export{d as default};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare type ITypeDate = 'date' | 'datetime';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
type: {
|
|
5
|
+
type: PropType<ITypeDate>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
filterExplicit: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
clearable: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
valueFormat: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
startPlaceholder: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
endPlaceholder: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
value: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
type: {
|
|
35
|
+
type: PropType<ITypeDate>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
filterExplicit: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
clearable: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
valueFormat: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
startPlaceholder: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
endPlaceholder: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
value: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
}>> & {
|
|
63
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}>>;
|
|
65
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
66
|
+
dateList: import("vue").Ref<any[]>;
|
|
67
|
+
isShow: import("vue").Ref<boolean>;
|
|
68
|
+
radioValue: import("vue").Ref<string>;
|
|
69
|
+
startDate: import("vue").Ref<any>;
|
|
70
|
+
endDate: import("vue").Ref<any>;
|
|
71
|
+
dateFormat: import("vue").ComputedRef<string>;
|
|
72
|
+
initData: () => void;
|
|
73
|
+
handleRadioClick: (value: string) => void;
|
|
74
|
+
handleChange: (val: any, type: 'start' | 'end') => void;
|
|
75
|
+
NDatePicker: any;
|
|
76
|
+
NButton: any;
|
|
77
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
78
|
+
type: {
|
|
79
|
+
type: PropType<ITypeDate>;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
filterExplicit: {
|
|
83
|
+
type: NumberConstructor;
|
|
84
|
+
default: number;
|
|
85
|
+
};
|
|
86
|
+
clearable: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
valueFormat: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
startPlaceholder: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: string;
|
|
97
|
+
};
|
|
98
|
+
endPlaceholder: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
value: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
}>> & {
|
|
107
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
type: ITypeDate;
|
|
110
|
+
value: string;
|
|
111
|
+
filterExplicit: number;
|
|
112
|
+
clearable: boolean;
|
|
113
|
+
startPlaceholder: string;
|
|
114
|
+
endPlaceholder: string;
|
|
115
|
+
valueFormat: string;
|
|
116
|
+
}>;
|
|
117
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as v,renderList as i,normalizeClass as o,toDisplayString as d,createCommentVNode as n,createVNode as s,unref as p,withCtx as c,createTextVNode as m,createElementVNode as f}from"vue";import{NButton as y,NDatePicker as h}from"naive-ui";import g from"moment";import{isString as b}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";import Y from"../../../../../../_virtual/plugin-vue_export-helper.js";const F={class:"render-widget-date-range"},_={key:0,class:"radio-date-group"},D=["onClick"],M={key:1,class:"date-detail-range"},S=f("span",{class:"divider"},null,-1);var x=Y(e({__name:"DateRange",props:{type:{type:String,default:"date"},filterExplicit:{type:Number,default:1},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const Y=e,x=a([]),P=a(!0),w=a(""),C=a(),j=a(),E=l((()=>{let e="";switch(Y.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e}));function H(e,a){switch(a){case"start":C.value=e;break;case"end":j.value=e}const l=C.value?g(C.value).format(E.value):null,t=j.value?g(j.value).format(E.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}return t((()=>Y.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(C.value=g(a.trim()).valueOf()),void(l.trim()&&(j.value=g(l.trim()).valueOf()))}C.value=j.value=null,w.value=""}),{immediate:!0}),function(){const e=k(E.value);x.value=e}(),(a,l)=>(u(),r("div",F,[0===e.filterExplicit?(u(),r(v,{key:0},[P.value?n("v-if",!0):(u(),r("div",_,[(u(!0),r(v,null,i(x.value,(e=>(u(),r("span",{key:e.value,class:o(["radio-date-item",w.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,w.value===l?w.value="":w.value=l,void(w.value&&f("update:value",w.value));var l}},d(e.label),11,D)))),128))])),s(p(y),{secondary:"",class:o(P.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>P.value=!P.value)},{default:c((()=>[m("选择日期")])),_:1},8,["class"])],64)):n("v-if",!0),P.value?(u(),r("div",M,[s(p(h),{type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:C.value,"onUpdate:value":l[1]||(l[1]=e=>H(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),S,s(p(h),{type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:j.value,"onUpdate:value":l[2]||(l[2]=e=>H(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):n("v-if",!0)]))}}),[["__file","DateRange.vue"]]);export{x as default};
|
|
@@ -27,7 +27,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
isRemote: import("vue").Ref<boolean>;
|
|
28
28
|
isLoading: import("vue").Ref<boolean>;
|
|
29
29
|
valueCp: import("vue").WritableComputedRef<any>;
|
|
30
|
-
maxTagCount: import("vue").ComputedRef<"responsive" | undefined>;
|
|
31
30
|
searchOptions: (keyword: string) => Promise<any>;
|
|
32
31
|
_handleSearch: (query: string) => Promise<void>;
|
|
33
32
|
handleSearch: (query: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as i,createBlock as l,unref as o,mergeProps as u,isRef as r,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as i,createBlock as l,unref as o,mergeProps as u,isRef as r,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as d}from"@vueuse/core";import v from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var m=f(e({__name:"Select",props:{value:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:f}){const m=e,{handleGetConfigApi:y}=v(),g=a(),h=t([]),b=t(!1),w=t(!1),I=n({set(e){f("update:value",e)},get:()=>m.value});async function S(e){try{if(g.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:i,showKeys:l,valueKey:o}=g.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:i,keyword:e,page:1};w.value=!0;let r=await y(u,"requestDynamicSelect",{},m.filterApiConfig);if(r){const{fieldList:e,rows:a}=r,t=a.map((e=>({...e,label:e[l[0]],value:e[o]})));return h.value=t,t}}}catch(e){console.log(e)}finally{w.value=!1}}const A=d((async e=>{await async function(e){const{manualMapping:a}=g;if(a)return void(h.value=h.value.filter((a=>a.label.includes(e.trim()))));const t=e.trim();await S(t)}(e)}),300);async function C(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=g;if(e&&Array.isArray(t))return b.value=!1,void(h.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&m.filterApiConfig&&(b.value=!0,await S(""))}function O(e){const{manualMapping:a}=g;if(a)return s("div",e.label);const{showKeys:t=[]}=g.dynamicOptionInfo;return g.dynamicOptionInfo&&t.length>0?s("div",{class:"select-widget-dynamic-option"},t.map((a=>s("span",{class:"select-widget-dynamic-item"},e[a])))):s("div",e.label)}function _({option:e,handleClose:a}){const{multiple:t}=g;return t?s(p,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>s("div",e.label)}):s("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:i}=g;if(await C(),!i){if(e)return f("update:value",a),void f("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=h.value[0];f("update:value",[e.value]),f("changeInitState",n,!0);break}}}}(),(e,a)=>(i(),l(o(c),u(o(g),{value:o(I),"onUpdate:value":a[0]||(a[0]=e=>r(I)?I.value=e:null),loading:w.value,options:h.value,remote:b.value,"render-label":O,"render-tag":_,onSearch:o(A),onClear:C}),null,16,["value","loading","options","remote","onSearch"]))}}),[["__file","Select.vue"]]);export{m as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import CheckboxGroup from './CheckboxGroup.vue';
|
|
2
2
|
import InputNumberGroup from './InputNumberGroup.vue';
|
|
3
3
|
import Date from './Date.vue';
|
|
4
|
-
|
|
4
|
+
import DateRange from './DateRange.vue';
|
|
5
|
+
export { CheckboxGroup, InputNumberGroup, Date, DateRange };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";
|
|
1
|
+
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRange}from"./DateRange.vue.js";
|
|
@@ -15,3 +15,20 @@ export declare const DatePresetValEnums: {
|
|
|
15
15
|
MONTH_START: string;
|
|
16
16
|
MONTH_END: string;
|
|
17
17
|
};
|
|
18
|
+
export declare const DateRangeValEnums: {
|
|
19
|
+
TODAY: string;
|
|
20
|
+
TOMORROW: string;
|
|
21
|
+
YESTERDAY: string;
|
|
22
|
+
THIS_WEEK: string;
|
|
23
|
+
NEXT_WEEK: string;
|
|
24
|
+
PREV_WEEK: string;
|
|
25
|
+
THIS_MONTH: string;
|
|
26
|
+
NEXT_MONTH: string;
|
|
27
|
+
PREV_MONTH: string;
|
|
28
|
+
THIS_QUATER: string;
|
|
29
|
+
NEXT_QUATER: string;
|
|
30
|
+
PREV_QUATER: string;
|
|
31
|
+
THIS_YEAR: string;
|
|
32
|
+
NEXT_YEAR: string;
|
|
33
|
+
PREV_YEAR: string;
|
|
34
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"};export{T as DatePresetValEnums};
|
|
1
|
+
const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"},E={TODAY:"TODAY",TOMORROW:"TOMORROW",YESTERDAY:"YESTERDAY",THIS_WEEK:"THIS_WEEK",NEXT_WEEK:"NEXT_WEEK",PREV_WEEK:"PREV_WEEK",THIS_MONTH:"THIS_MONTH",NEXT_MONTH:"NEXT_MONTH",PREV_MONTH:"PREV_MONTH",THIS_QUATER:"THIS_QUATER",NEXT_QUATER:"NEXT_QUATER",PREV_QUATER:"PREV_QUATER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",PREV_YEAR:"PREV_YEAR"};export{T as DatePresetValEnums,E as DateRangeValEnums};
|
package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
1
|
export declare const presetValToTimestamp: (presetVal: string, format?: string) => any;
|
|
2
|
+
export declare const getAllDateRangeInfo: (format?: string) => {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number | never[];
|
|
5
|
+
}[];
|
|
6
|
+
export declare const formatDateRangeInfo: (key: string, format?: string) => string | number | never[];
|
package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DatePresetValEnums as t}from"../enums.js";import
|
|
1
|
+
import{DatePresetValEnums as t,DateRangeValEnums as a}from"../enums.js";import{DateRangeOptions as r}from"../basicData.js";import d from"moment";const e=new Map([[t.NOW,()=>d()],[t.TODAY,()=>d().startOf("day")],[t.TODAY_START,()=>d().startOf("day")],[t.TODAY_END,()=>d().endOf("day")],[t.TOMORROW,()=>d().add(1,"days").startOf("day")],[t.TOMORROW_START,()=>d().add(1,"days").startOf("day")],[t.TOMORROW_END,()=>d().add(1,"days").endOf("day")],[t.YESTERDAY,()=>d().subtract(1,"days").startOf("day")],[t.YESTERDAY_START,()=>d().subtract(1,"days").startOf("day")],[t.YESTERDAY_END,()=>d().subtract(1,"days").endOf("day")],[t.WEEK_START,()=>d().startOf("week")],[t.WEEK_END,()=>d().endOf("week")],[t.MONTH_START,()=>d().startOf("month")],[t.MONTH_END,()=>d().endOf("month")]]),O=(t,a="x")=>{if(!e.has(t))return;const r=e.get(t)().format(a);return"x"===a||"X"===a?Number(r):r},s=new Map([[a.TODAY,()=>[d().startOf("day"),d().endOf("day")]],[a.TOMORROW,()=>[d().add(1,"days").startOf("day"),d().add(1,"days").endOf("day")]],[a.YESTERDAY,()=>[d().subtract(1,"days").startOf("day"),d().subtract(1,"days").endOf("day")]],[a.THIS_WEEK,()=>[d().startOf("week"),d().endOf("week")]],[a.NEXT_WEEK,()=>[d().add(1,"w").startOf("week"),d().add(1,"w").endOf("week")]],[a.PREV_WEEK,()=>[d().subtract(1,"w").startOf("week"),d().subtract(1,"w").endOf("week")]],[a.THIS_MONTH,()=>[d().startOf("month"),d().endOf("month")]],[a.NEXT_MONTH,()=>[d().add(1,"months").startOf("month"),d().add(1,"months").endOf("month")]],[a.PREV_MONTH,()=>[d().subtract(1,"months").startOf("month"),d().subtract(1,"months").endOf("month")]],[a.THIS_QUATER,()=>[d().startOf("quarter"),d().endOf("quarter")]],[a.NEXT_QUATER,()=>[d().add(1,"Q").startOf("quarter"),d().add(1,"Q").endOf("quarter")]],[a.PREV_QUATER,()=>[d().subtract(1,"Q").startOf("quarter"),d().subtract(1,"Q").endOf("quarter")]],[a.THIS_YEAR,()=>[d().startOf("year"),d().endOf("year")]],[a.NEXT_YEAR,()=>[d().add(1,"y").startOf("year"),d().add(1,"y").endOf("year")]],[a.PREV_YEAR,()=>[d().subtract(1,"y").startOf("year"),d().subtract(1,"y").endOf("year")]]]),f=(t="x")=>r.map((a=>{const r=n(a.value,t);return{label:a.label,value:r}})),n=(t,a="x")=>{const r=s.get(t);if(r){const[t,d]=r(),e=`${t.format(a)} ~ ${d.format(a)}`;return"x"===a||"X"===a?Number(e):e}return[]};export{n as formatDateRangeInfo,f as getAllDateRangeInfo,O as presetValToTimestamp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r}from"./widgetCfgMaps.js";import n from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=n(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){var t;const{widgetType:i,rangeFilter:r}=e;if(!a.includes(i))return r?void 0:{width:`${null!=(t=e.advanceColWidth)?t:200}px`}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:n,title:a,placeholder:l,widgetCfg:s,rangeFilter:o}=e,{props:h,handlerProps:
|
|
1
|
+
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r}from"./widgetCfgMaps.js";import n from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=n(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){var t;const{widgetType:i,rangeFilter:r}=e;if(!a.includes(i))return r?void 0:{width:`${null!=(t=e.advanceColWidth)?t:200}px`}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:n,title:a,placeholder:l,widgetCfg:s,rangeFilter:o,filterExplicit:p}=e,{props:h,handlerProps:d}=r.get(i);let u={...h};d&&(u=d(u,{...s,title:n||a,rangeFilter:o,_frontId:t,filterExplicit:p})),!o&&l&&(u.placeholder=l),this.initialProps=u,u.value&&(this.valueCp=u.value)},generateWidget(e){const{widgetType:i}=e;if(!r.has(i))return null;const{value:n}=e,{component:a,style:l,eventsBySearch:s=[]}=r.get(i),o={...this.initialProps,value:n,filterApiConfig:this.filterApiConfig},p=s.reduce(((e,t)=>{const{name:i,handler:r}=t;let n=this.search;return r&&(n=e=>{r(e,this.search,o)}),{...e,[`on${i}`]:n}}),{});return t(a,{...l,...o,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
|