cnhis-design-vue 3.1.40-beta.0 → 3.1.40-beta.10
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 +12 -48
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/button-print/src/utils/print.js +6 -1
- package/es/components/form-config/index.d.ts +66 -148
- package/es/components/form-config/src/FormConfig.vue.d.ts +66 -148
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +33 -74
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +33 -74
- package/es/components/form-render/index.d.ts +33 -74
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +33 -74
- package/es/components/form-render/src/FormRender.vue.js +37 -20
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +33 -74
- package/es/components/form-render/src/components/renderer/searchCascade.js +2 -0
- package/es/components/form-render/src/components/renderer/select.js +5 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +6 -3
- package/es/components/form-render/src/hooks/useAnchor.js +26 -26
- package/es/components/form-render/src/hooks/useAutoHidden.d.ts +4 -0
- package/es/components/form-render/src/hooks/useAutoHidden.js +43 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +7 -10
- package/es/components/form-render/src/hooks/useBusinessBinding.js +38 -36
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -6
- package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -2
- package/es/components/form-render/src/hooks/useFormContext.js +2 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +25 -21
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/form-render/test/basic-config.spec.d.ts +1 -0
- package/es/components/form-render/test/renderer.spec.d.ts +1 -0
- package/es/components/iho-table/index.d.ts +121 -121
- package/es/components/iho-table/src/IhoTable.vue.d.ts +121 -121
- package/es/components/iho-table/src/IhoTable.vue.js +2 -1
- package/es/components/iho-table/src/constants/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +59 -59
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +7 -1
- package/es/components/info-header/index.d.ts +18 -3
- package/es/components/info-header/src/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +18 -3
- package/es/components/info-header/src/InfoHeader.vue.js +40 -19
- package/es/components/keyboard/index.d.ts +20 -2
- package/es/components/keyboard/src/Keyboard.vue.d.ts +20 -2
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +19 -2
- package/es/components/keyboard/src/components/InputNumber.vue.js +15 -5
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +20 -2
- package/es/components/keyboard/src/components/NumberPanel.vue.js +14 -10
- package/es/components/recommend-search/index.d.ts +14 -14
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +14 -14
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -4
- package/es/components/scale-view/index.d.ts +5 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -2
- package/es/components/scale-view/src/ScaleView.vue.js +4 -3
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
- package/es/components/scale-view/src/hooks/scaleview-computed.js +76 -31
- package/es/components/scale-view/src/hooks/use-evaluate.js +13 -13
- package/es/components/shortcut-provider/index.d.ts +15 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +15 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +8 -2
- package/es/components/shortcut-setter/index.d.ts +33 -74
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -74
- package/es/components/steps-wheel/index.d.ts +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
- package/es/components/table-filter/index.d.ts +8933 -0
- package/es/components/table-filter/index.js +21 -0
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3841 -0
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +2272 -0
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +3198 -0
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1315 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +71 -0
- package/es/components/table-filter/src/classification/search-class-name.vue.js +195 -0
- package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +1119 -0
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +594 -0
- package/es/components/table-filter/src/components/age-com/index.vue.d.ts +119 -0
- package/es/components/table-filter/src/components/age-com/index.vue.js +185 -0
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +199 -0
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +86 -0
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +2 -0
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +30 -0
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +90 -0
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +253 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +112 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +114 -0
- package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +4 -0
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +14 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +20 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +87 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +59 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +147 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +278 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +304 -0
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +113 -0
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +153 -0
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +266 -0
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +310 -0
- package/es/components/table-filter/src/components/range-age/index.vue.d.ts +248 -0
- package/es/components/table-filter/src/components/range-age/index.vue.js +137 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +104 -0
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +64 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +34 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +45 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -0
- package/es/components/table-filter/src/components/render-widget/components/index.js +2 -0
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +25 -0
- package/es/components/table-filter/src/components/render-widget/enums.js +27 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +70 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +32 -0
- package/es/components/table-filter/src/components/render-widget/index.vue.js +107 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +199 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +152 -0
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +789 -0
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1520 -0
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +18 -0
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +171 -0
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +1217 -0
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +199 -0
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +1624 -0
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +241 -0
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.d.ts +292 -0
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +526 -0
- package/es/components/table-filter/src/const/dataOptions.d.ts +36 -0
- package/es/components/table-filter/src/const/dataOptions.js +107 -0
- package/es/components/table-filter/src/const/index.d.ts +5 -0
- package/es/components/table-filter/src/const/index.js +5 -0
- package/es/components/table-filter/src/directive/flexibleResize.d.ts +28 -0
- package/es/components/table-filter/src/directive/flexibleResize.js +157 -0
- package/es/components/table-filter/src/directive/preventReClick.d.ts +4 -0
- package/es/components/table-filter/src/directive/preventReClick.js +14 -0
- package/es/components/table-filter/src/directive/resize.d.ts +4 -0
- package/es/components/table-filter/src/directive/resize.js +12 -0
- package/es/components/table-filter/src/hooks/export.d.ts +1 -0
- package/es/components/table-filter/src/hooks/export.js +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +28 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +64 -0
- package/es/components/table-filter/src/hooks/useMixins.d.ts +60 -0
- package/es/components/table-filter/src/hooks/useMixins.js +532 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +15 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.js +94 -0
- package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +131 -0
- package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
- package/es/components/table-filter/src/hooks/useWordBookutils.js +91 -0
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +1942 -0
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +2038 -0
- package/es/components/table-filter/src/tool/generateDefOptions.d.ts +14 -0
- package/es/components/table-filter/src/tool/generateDefOptions.js +65 -0
- package/es/components/table-filter/src/tool/getWidgetType.d.ts +1 -0
- package/es/components/table-filter/src/tool/getWidgetType.js +27 -0
- package/es/components/table-filter/src/tool/options.d.ts +18 -0
- package/es/components/table-filter/src/tool/options.js +200 -0
- package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
- package/es/components/table-filter/src/tool/resizeSensor.js +123 -0
- package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
- package/es/components/table-filter/src/tool/time-domain.js +100 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +92 -0
- package/es/components/table-filter/src/tool/transformData.js +169 -0
- package/es/components/table-filter/src/tool/utils.d.ts +4 -0
- package/es/components/table-filter/src/tool/utils.js +29 -0
- package/es/components/table-filter/src/types/enums.d.ts +65 -0
- package/es/components/table-filter/src/types/enums.js +67 -0
- package/es/components/table-filter/src/types/index.d.ts +483 -0
- package/es/components/table-filter/src/types/index.js +1 -0
- package/es/components/table-filter/src/types/tool.d.ts +7 -0
- package/es/components/table-filter/src/types/tool.js +1 -0
- package/es/components/table-filter/style/index.css +1 -0
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/shared/utils/utilExpand.js +66 -0
- package/package.json +3 -3
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
value: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => void;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
disabled: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
isDetail: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
defaultValue: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
itemData: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
default: () => {};
|
|
25
|
+
};
|
|
26
|
+
shortcutFieldsList: {
|
|
27
|
+
type: ArrayConstructor;
|
|
28
|
+
default: () => never[];
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
value: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => void;
|
|
35
|
+
};
|
|
36
|
+
format: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
disabled: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
isDetail: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
defaultValue: {
|
|
49
|
+
type: ObjectConstructor;
|
|
50
|
+
default: () => {};
|
|
51
|
+
};
|
|
52
|
+
itemData: {
|
|
53
|
+
type: ObjectConstructor;
|
|
54
|
+
default: () => {};
|
|
55
|
+
};
|
|
56
|
+
shortcutFieldsList: {
|
|
57
|
+
type: ArrayConstructor;
|
|
58
|
+
default: () => never[];
|
|
59
|
+
};
|
|
60
|
+
}>> & {
|
|
61
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
}>>;
|
|
63
|
+
emits: (event: "change", ...args: any[]) => void;
|
|
64
|
+
ageValue: any;
|
|
65
|
+
showType: import("vue").ComputedRef<string>;
|
|
66
|
+
isDisabled: import("vue").ComputedRef<boolean>;
|
|
67
|
+
handleInitDefaultValue: () => void;
|
|
68
|
+
checkType: (val: any) => string;
|
|
69
|
+
handlefillVal: (val?: any) => void;
|
|
70
|
+
handleYearChange: (e: any) => void;
|
|
71
|
+
handleMonthChange: (e: any) => void;
|
|
72
|
+
handleDayChange: (e: any) => void;
|
|
73
|
+
getvalue: (e: any) => any;
|
|
74
|
+
valueChange: (val: string, key: string) => void;
|
|
75
|
+
checkVal: (val: string, key: string) => boolean;
|
|
76
|
+
handleProrate: () => void;
|
|
77
|
+
triggerChange: (changedValue: any) => void;
|
|
78
|
+
NInputNumber: any;
|
|
79
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
|
+
value: {
|
|
81
|
+
type: ObjectConstructor;
|
|
82
|
+
default: () => void;
|
|
83
|
+
};
|
|
84
|
+
format: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
disabled: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
isDetail: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
defaultValue: {
|
|
97
|
+
type: ObjectConstructor;
|
|
98
|
+
default: () => {};
|
|
99
|
+
};
|
|
100
|
+
itemData: {
|
|
101
|
+
type: ObjectConstructor;
|
|
102
|
+
default: () => {};
|
|
103
|
+
};
|
|
104
|
+
shortcutFieldsList: {
|
|
105
|
+
type: ArrayConstructor;
|
|
106
|
+
default: () => never[];
|
|
107
|
+
};
|
|
108
|
+
}>> & {
|
|
109
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
value: Record<string, any>;
|
|
112
|
+
disabled: boolean;
|
|
113
|
+
isDetail: boolean;
|
|
114
|
+
defaultValue: Record<string, any>;
|
|
115
|
+
format: string;
|
|
116
|
+
itemData: Record<string, any>;
|
|
117
|
+
shortcutFieldsList: unknown[];
|
|
118
|
+
}>;
|
|
119
|
+
export default _default;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, Fragment, createVNode, createCommentVNode, createBlock, createElementVNode } from 'vue';
|
|
2
|
+
import { NInputNumber } from 'naive-ui';
|
|
3
|
+
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
4
|
+
|
|
5
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", { class: "age-com-suffix" }, "\u5C81", -1);
|
|
6
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "age-com-suffix" }, "\u6708", -1);
|
|
7
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("span", { class: "age-com-suffix" }, "\u65E5", -1);
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "index",
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => {
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
format: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "YYYY-MM-DD"
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
isDetail: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
defaultValue: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => ({})
|
|
31
|
+
},
|
|
32
|
+
itemData: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => ({})
|
|
35
|
+
},
|
|
36
|
+
shortcutFieldsList: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
emits: [
|
|
42
|
+
"change"
|
|
43
|
+
],
|
|
44
|
+
setup(__props, { emit: emits }) {
|
|
45
|
+
const props = __props;
|
|
46
|
+
let ageValue = ref({
|
|
47
|
+
year: null,
|
|
48
|
+
month: null,
|
|
49
|
+
day: null,
|
|
50
|
+
days: null
|
|
51
|
+
});
|
|
52
|
+
let showType = computed(() => {
|
|
53
|
+
return props.format && checkType(props.format) == "[object String]" ? props.format.toUpperCase() : "YYYY-MM-DD";
|
|
54
|
+
});
|
|
55
|
+
let isDisabled = computed(() => {
|
|
56
|
+
return props.disabled || false;
|
|
57
|
+
});
|
|
58
|
+
function handleInitDefaultValue() {
|
|
59
|
+
if (Object.keys(props.defaultValue || {}).length) {
|
|
60
|
+
triggerChange({ ...props.defaultValue });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function checkType(val) {
|
|
64
|
+
return Object.prototype.toString.call(val);
|
|
65
|
+
}
|
|
66
|
+
function handlefillVal(val = {}) {
|
|
67
|
+
if (Object.keys(val || {}).length === 0) {
|
|
68
|
+
Object.assign(ageValue.value, {
|
|
69
|
+
year: null,
|
|
70
|
+
month: null,
|
|
71
|
+
day: null,
|
|
72
|
+
days: null
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
let type = checkType(val);
|
|
76
|
+
if (["[object String]", "[object Number]"].includes(type)) {
|
|
77
|
+
valueChange(val, "year");
|
|
78
|
+
} else if (type == "[object Object]") {
|
|
79
|
+
Object.assign(ageValue.value, { ...val });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function handleYearChange(e) {
|
|
84
|
+
const val = getvalue(e);
|
|
85
|
+
valueChange(val, "year");
|
|
86
|
+
}
|
|
87
|
+
function handleMonthChange(e) {
|
|
88
|
+
const val = getvalue(e);
|
|
89
|
+
valueChange(val, "month");
|
|
90
|
+
}
|
|
91
|
+
function handleDayChange(e) {
|
|
92
|
+
const val = getvalue(e);
|
|
93
|
+
valueChange(val, "day");
|
|
94
|
+
}
|
|
95
|
+
function getvalue(e) {
|
|
96
|
+
return e;
|
|
97
|
+
}
|
|
98
|
+
function valueChange(val, key) {
|
|
99
|
+
let value = parseInt(val, 10);
|
|
100
|
+
if (isNaN(value) || checkVal(val, key)) {
|
|
101
|
+
value = "";
|
|
102
|
+
}
|
|
103
|
+
triggerChange({ [key]: value });
|
|
104
|
+
}
|
|
105
|
+
function checkVal(val, key) {
|
|
106
|
+
const o = {
|
|
107
|
+
day: 31,
|
|
108
|
+
month: 12,
|
|
109
|
+
year: 200
|
|
110
|
+
};
|
|
111
|
+
return val > o[key];
|
|
112
|
+
}
|
|
113
|
+
function handleProrate() {
|
|
114
|
+
const c = (v) => v || 0;
|
|
115
|
+
let days = c(ageValue.value.year) * 365 + c(ageValue.value.month) * 30 + c(ageValue.value.day);
|
|
116
|
+
ageValue.value.days = days || 0;
|
|
117
|
+
}
|
|
118
|
+
function triggerChange(changedValue) {
|
|
119
|
+
Object.assign(ageValue.value, changedValue);
|
|
120
|
+
handleProrate();
|
|
121
|
+
const { year = 0, month = 0, day = 0, days = "" } = ageValue.value;
|
|
122
|
+
emits("change", Object.assign({}, { year, month, day, days }));
|
|
123
|
+
}
|
|
124
|
+
watch(
|
|
125
|
+
() => props.defaultValue,
|
|
126
|
+
() => {
|
|
127
|
+
handleInitDefaultValue();
|
|
128
|
+
},
|
|
129
|
+
{ immediate: true }
|
|
130
|
+
);
|
|
131
|
+
watch(
|
|
132
|
+
() => props.value,
|
|
133
|
+
(val) => {
|
|
134
|
+
handlefillVal(val);
|
|
135
|
+
},
|
|
136
|
+
{ immediate: true }
|
|
137
|
+
);
|
|
138
|
+
return (_ctx, _cache) => {
|
|
139
|
+
return openBlock(), createElementBlock("div", {
|
|
140
|
+
class: normalizeClass(["container age-com-block", { "form-item-disabled": __props.isDetail }])
|
|
141
|
+
}, [
|
|
142
|
+
unref(showType).includes("YYYY") ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
143
|
+
createVNode(unref(NInputNumber), {
|
|
144
|
+
value: unref(ageValue).year,
|
|
145
|
+
"onUpdate:value": [
|
|
146
|
+
_cache[0] || (_cache[0] = ($event) => unref(ageValue).year = $event),
|
|
147
|
+
handleYearChange
|
|
148
|
+
],
|
|
149
|
+
disabled: unref(isDisabled) || __props.isDetail,
|
|
150
|
+
min: 0
|
|
151
|
+
}, null, 8, ["value", "disabled"]),
|
|
152
|
+
_hoisted_1
|
|
153
|
+
], 64)) : createCommentVNode("v-if", true),
|
|
154
|
+
unref(showType).includes("MM") ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
155
|
+
createVNode(unref(NInputNumber), {
|
|
156
|
+
value: unref(ageValue).month,
|
|
157
|
+
"onUpdate:value": [
|
|
158
|
+
_cache[1] || (_cache[1] = ($event) => unref(ageValue).month = $event),
|
|
159
|
+
handleMonthChange
|
|
160
|
+
],
|
|
161
|
+
disabled: unref(isDisabled) || __props.isDetail,
|
|
162
|
+
min: 0
|
|
163
|
+
}, null, 8, ["value", "disabled"]),
|
|
164
|
+
_hoisted_2
|
|
165
|
+
], 64)) : createCommentVNode("v-if", true),
|
|
166
|
+
unref(showType).includes("DD") ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
167
|
+
unref(showType).includes("DD") ? (openBlock(), createBlock(unref(NInputNumber), {
|
|
168
|
+
key: 0,
|
|
169
|
+
value: unref(ageValue).day,
|
|
170
|
+
"onUpdate:value": [
|
|
171
|
+
_cache[2] || (_cache[2] = ($event) => unref(ageValue).day = $event),
|
|
172
|
+
handleDayChange
|
|
173
|
+
],
|
|
174
|
+
disabled: unref(isDisabled) || __props.isDetail,
|
|
175
|
+
min: 0
|
|
176
|
+
}, null, 8, ["value", "disabled"])) : createCommentVNode("v-if", true),
|
|
177
|
+
_hoisted_3
|
|
178
|
+
], 64)) : createCommentVNode("v-if", true)
|
|
179
|
+
], 2);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
var ageCom = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "index.vue"]]);
|
|
184
|
+
|
|
185
|
+
export { ageCom as default };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
title: {
|
|
3
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
4
|
+
};
|
|
5
|
+
list: {
|
|
6
|
+
type: ArrayConstructor;
|
|
7
|
+
default: never[];
|
|
8
|
+
};
|
|
9
|
+
currentTempId: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
BTNOBJ: {
|
|
14
|
+
copy: string;
|
|
15
|
+
pencil: string;
|
|
16
|
+
delete: string;
|
|
17
|
+
add: string;
|
|
18
|
+
download: string;
|
|
19
|
+
label: string;
|
|
20
|
+
queding: string;
|
|
21
|
+
del: string;
|
|
22
|
+
};
|
|
23
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
+
title: {
|
|
25
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
26
|
+
};
|
|
27
|
+
list: {
|
|
28
|
+
type: ArrayConstructor;
|
|
29
|
+
default: never[];
|
|
30
|
+
};
|
|
31
|
+
currentTempId: {
|
|
32
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
33
|
+
};
|
|
34
|
+
}>> & {
|
|
35
|
+
onShowDrawer?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
onClickGroupBtn?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}>>;
|
|
38
|
+
emit: (event: "showDrawer" | "clickGroupBtn", ...args: any[]) => void;
|
|
39
|
+
btnObj: import("vue").Ref<{
|
|
40
|
+
copy: string;
|
|
41
|
+
pencil: string;
|
|
42
|
+
delete: string;
|
|
43
|
+
add: string;
|
|
44
|
+
download: string;
|
|
45
|
+
label: string;
|
|
46
|
+
queding: string;
|
|
47
|
+
del: string;
|
|
48
|
+
}>;
|
|
49
|
+
handleSelect: (key: string, option: any) => void;
|
|
50
|
+
showDrawer: (btn: any, j: number) => void;
|
|
51
|
+
clickBtn: (btn: any, j: number) => void;
|
|
52
|
+
NButton: any;
|
|
53
|
+
NDropdown: any;
|
|
54
|
+
TextOverTooltip: import("vue").DefineComponent<{
|
|
55
|
+
content: {
|
|
56
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
57
|
+
required: false;
|
|
58
|
+
};
|
|
59
|
+
className: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
required: false;
|
|
62
|
+
};
|
|
63
|
+
refName: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
required: false;
|
|
66
|
+
};
|
|
67
|
+
effect: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
required: false;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
placement: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
required: false;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
tooltipTitle: {
|
|
78
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
79
|
+
required: false;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
isAlias: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
required: false;
|
|
85
|
+
};
|
|
86
|
+
}, {
|
|
87
|
+
props: {
|
|
88
|
+
content?: string | number | undefined;
|
|
89
|
+
className?: string | undefined;
|
|
90
|
+
refName?: string | undefined;
|
|
91
|
+
effect: string;
|
|
92
|
+
placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
93
|
+
tooltipTitle: string | number;
|
|
94
|
+
isAlias?: boolean | undefined;
|
|
95
|
+
};
|
|
96
|
+
isDisabledTooltip: import("vue").Ref<boolean>;
|
|
97
|
+
curContent: import("vue").ComputedRef<string>;
|
|
98
|
+
$refName: any;
|
|
99
|
+
onMouseOver: (str: any) => void;
|
|
100
|
+
onMouseOut: () => void;
|
|
101
|
+
NTooltip: any;
|
|
102
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
103
|
+
content: {
|
|
104
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
105
|
+
required: false;
|
|
106
|
+
};
|
|
107
|
+
className: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
required: false;
|
|
110
|
+
};
|
|
111
|
+
refName: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
required: false;
|
|
114
|
+
};
|
|
115
|
+
effect: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
required: false;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
placement: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
required: false;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
tooltipTitle: {
|
|
126
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
127
|
+
required: false;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
isAlias: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
required: false;
|
|
133
|
+
};
|
|
134
|
+
}>>, {
|
|
135
|
+
effect: string;
|
|
136
|
+
placement: string;
|
|
137
|
+
tooltipTitle: string | number;
|
|
138
|
+
isAlias: boolean;
|
|
139
|
+
}>;
|
|
140
|
+
SvgIcon: import("vue").DefineComponent<{
|
|
141
|
+
iconClass: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
required: true;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
|
+
title: {
|
|
147
|
+
type: StringConstructor;
|
|
148
|
+
required: false;
|
|
149
|
+
default: string;
|
|
150
|
+
};
|
|
151
|
+
className: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
required: false;
|
|
154
|
+
};
|
|
155
|
+
}, {
|
|
156
|
+
props: {
|
|
157
|
+
iconClass: string;
|
|
158
|
+
title: string;
|
|
159
|
+
className?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
iconName: import("vue").ComputedRef<string>;
|
|
162
|
+
svgClass: import("vue").ComputedRef<string>;
|
|
163
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
164
|
+
iconClass: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
required: true;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
title: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
required: false;
|
|
172
|
+
default: string;
|
|
173
|
+
};
|
|
174
|
+
className: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
required: false;
|
|
177
|
+
};
|
|
178
|
+
}>>, {
|
|
179
|
+
title: string;
|
|
180
|
+
iconClass: string;
|
|
181
|
+
}>;
|
|
182
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("showDrawer" | "clickGroupBtn")[], "showDrawer" | "clickGroupBtn", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
183
|
+
title: {
|
|
184
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
185
|
+
};
|
|
186
|
+
list: {
|
|
187
|
+
type: ArrayConstructor;
|
|
188
|
+
default: never[];
|
|
189
|
+
};
|
|
190
|
+
currentTempId: {
|
|
191
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
192
|
+
};
|
|
193
|
+
}>> & {
|
|
194
|
+
onShowDrawer?: ((...args: any[]) => any) | undefined;
|
|
195
|
+
onClickGroupBtn?: ((...args: any[]) => any) | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
list: unknown[];
|
|
198
|
+
}>;
|
|
199
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, unref, withCtx } from 'vue';
|
|
2
|
+
import { NDropdown, NButton } from 'naive-ui';
|
|
3
|
+
import script from '../../../../../shared/components/TextOverTooltip/TextOverTooltip.vue.js';
|
|
4
|
+
import script$1 from '../../../../../shared/components/SvgIcon/SvgIcon.vue.js';
|
|
5
|
+
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = { class: "buttonGroup-com-block" };
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "ButtonGroup",
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: [String, Number]
|
|
13
|
+
},
|
|
14
|
+
list: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: []
|
|
17
|
+
},
|
|
18
|
+
currentTempId: {
|
|
19
|
+
type: [String, Number]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: [
|
|
23
|
+
"showDrawer",
|
|
24
|
+
"clickGroupBtn"
|
|
25
|
+
],
|
|
26
|
+
setup(__props, { emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const BTNOBJ = {
|
|
29
|
+
copy: "copy",
|
|
30
|
+
pencil: "edit",
|
|
31
|
+
delete: "delete",
|
|
32
|
+
add: "plus-circle",
|
|
33
|
+
download: "download",
|
|
34
|
+
label: "tag",
|
|
35
|
+
queding: "check",
|
|
36
|
+
del: "close"
|
|
37
|
+
};
|
|
38
|
+
ref(BTNOBJ);
|
|
39
|
+
function handleSelect(key, option) {
|
|
40
|
+
const j = props.list.findIndex((item) => item.sid == option.sid);
|
|
41
|
+
if (option.type == "ADD") {
|
|
42
|
+
showDrawer(option, j);
|
|
43
|
+
} else if (option.type != "LINK" && props.currentTempId == "0") {
|
|
44
|
+
clickBtn(option, j);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function showDrawer(btn, j) {
|
|
48
|
+
emit("showDrawer", btn, j);
|
|
49
|
+
}
|
|
50
|
+
function clickBtn(btn, j) {
|
|
51
|
+
emit("clickGroupBtn", btn, j);
|
|
52
|
+
}
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
55
|
+
createVNode(unref(NDropdown), {
|
|
56
|
+
trigger: "hover",
|
|
57
|
+
options: __props.list,
|
|
58
|
+
"key-field": "sid",
|
|
59
|
+
"label-field": "alias",
|
|
60
|
+
onSelect: handleSelect
|
|
61
|
+
}, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
createVNode(unref(NButton), {
|
|
64
|
+
type: "primary",
|
|
65
|
+
class: "group-btn"
|
|
66
|
+
}, {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createVNode(unref(script), {
|
|
69
|
+
refName: "buttonGroupTitle",
|
|
70
|
+
class: "group-left",
|
|
71
|
+
content: __props.title
|
|
72
|
+
}, null, 8, ["content"]),
|
|
73
|
+
createVNode(unref(script$1), { "icon-class": "xitongtubiaoliebiaocaozuoanniuzhankai" })
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
}, 8, ["options"])
|
|
80
|
+
]);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "ButtonGroup.vue"]]);
|
|
85
|
+
|
|
86
|
+
export { ButtonGroup as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
|
|
3
|
+
const getBtnIcon = {
|
|
4
|
+
props: ["data", "btnObj"],
|
|
5
|
+
functional: true,
|
|
6
|
+
render: function(context) {
|
|
7
|
+
const data = context.data || {};
|
|
8
|
+
const btnObj = context.data || {};
|
|
9
|
+
if (data.icon) {
|
|
10
|
+
return data.showStyle !== "only_icon" && btnObj[data.icon] ? h("n-icon", {
|
|
11
|
+
class: "custom-icon",
|
|
12
|
+
type: btnObj[data.icon]
|
|
13
|
+
}) : h("svg-icon", {
|
|
14
|
+
iconClass: data.icon,
|
|
15
|
+
style: {
|
|
16
|
+
marginRight: "8px"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
} else if (data.iconSetting) {
|
|
20
|
+
return h("svg-icon", {
|
|
21
|
+
iconClass: JSON.parse(data.iconSetting).icon,
|
|
22
|
+
style: {
|
|
23
|
+
marginRight: "8px"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { getBtnIcon as default };
|