cnhis-design-vue 3.1.31-beta.1 → 3.1.31-beta.11
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 +123 -123
- package/es/components/big-table/index.js +1 -1
- package/es/components/big-table/src/{BigTable.js → BigTable.vue.js} +1 -1
- package/es/components/big-table/src/{BigTable.vue_vue_type_script_setup_true_lang.js → BigTable.vue2.js} +6 -6
- package/es/components/{scale-view/src/components/NoData.js → big-table/src/components/NoData.vue.js} +4 -4
- package/es/components/big-table/src/components/edit-form/{edit-separate.js → edit-separate.vue.js} +1 -1
- package/es/components/big-table/src/components/{input-button.js → input-button.vue.js} +0 -0
- package/es/components/big-table/src/components/{separate.js → separate.vue.js} +0 -0
- package/es/components/big-table/src/hooks/useEdit.js +1 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/bpmn-workflow/index.js +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/src/{BpmnWorkflow.js → BpmnWorkflow.vue.js} +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/index.d.ts +65 -45
- package/es/components/button-print/index.js +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +65 -45
- package/es/components/button-print/src/{ButtonPrint.js → ButtonPrint.vue.js} +1 -1
- package/es/components/button-print/src/{ButtonPrint.vue_vue_type_script_setup_true_lang.js → ButtonPrint.vue2.js} +1 -1
- package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +66 -46
- package/es/components/button-print/src/components/EditFormat.vue.js +173 -0
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +65 -45
- package/es/components/button-print/src/components/{IdentityVerification.js → IdentityVerification.vue.js} +9 -6
- package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
- package/es/components/button-print/src/components/Preview.vue.js +6 -0
- package/es/components/button-print/src/components/Preview.vue2.js +67 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +1 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -2
- package/es/components/button-print/src/utils/dialog.d.ts +5 -1
- package/es/components/button-print/src/utils/dialog.js +65 -23
- package/es/components/button-print/src/utils/print.d.ts +4 -1
- package/es/components/button-print/src/utils/print.js +13 -3
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/drag-layout/index.js +1 -1
- package/es/components/drag-layout/src/{DragFormLeftItem.js → DragFormLeftItem.vue.js} +0 -0
- package/es/components/drag-layout/src/{DragFormRightItem.js → DragFormRightItem.vue.js} +0 -0
- package/es/components/drag-layout/src/{DragLayout.js → DragLayout.vue.js} +2 -2
- package/es/components/fabric-chart/index.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -4
- package/es/components/fabric-chart/src/{FabricChart.js → FabricChart.vue.js} +1 -1
- package/es/components/fabric-chart/src/components/{PopupTip.js → PopupTip.vue.js} +0 -0
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -6
- package/es/components/fabric-chart/src/hooks/useGrid.js +3 -3
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/fabric-chart/src/utils/index.js +0 -1
- package/es/components/field-set/index.js +1 -1
- package/es/components/field-set/src/{FieldSet.js → FieldSet.vue.js} +0 -0
- package/es/components/form-config/index.js +1 -1
- package/es/components/form-config/src/{FormConfig.js → FormConfig.vue.js} +3 -3
- package/es/components/form-config/src/components/{FormConfigCreator.js → FormConfigCreator.vue.js} +0 -0
- package/es/components/form-config/src/components/{FormConfigDragDisplay.js → FormConfigDragDisplay.vue.js} +0 -0
- package/es/components/form-config/src/components/{FormConfigEdit.js → FormConfigEdit.vue.js} +0 -0
- package/es/components/form-config/src/components/index.js +6 -6
- package/es/components/form-config/src/components/renderer/{CloseButton.js → CloseButton.vue.js} +0 -0
- package/es/components/form-config/src/components/renderer/{ComplexNode.js → ComplexNode.vue.js} +2 -2
- package/es/components/form-config/src/components/renderer/{DefaultNode.js → DefaultNode.vue.js} +1 -1
- package/es/components/form-config/src/components/renderer/index.js +3 -3
- package/es/components/form-config/src/hooks/usePresetRenderer.js +2 -2
- package/es/components/form-render/index.js +2 -2
- package/es/components/form-render/src/{FormRender.js → FormRender.vue.js} +0 -0
- package/es/components/form-render/src/{FormRenderWrapper.js → FormRenderWrapper.vue.js} +1 -1
- package/es/components/form-render/src/components/renderer/checkbox.js +3 -5
- package/es/components/form-render/src/components/renderer/index.js +2 -0
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/{FormCollapse.js → FormCollapse.vue.js} +0 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -1
- package/es/components/form-render/src/components/renderer/recommendSelect.d.ts +131 -0
- package/es/components/form-render/src/components/renderer/recommendSelect.js +213 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +0 -1
- package/es/components/form-render/src/components/renderer/select.js +3 -5
- package/es/components/form-render/src/hooks/useAsyncQueue.js +2 -1
- package/es/components/form-render/src/hooks/useAutographOptions.js +5 -7
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +7 -0
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +8 -1
- package/es/components/form-render/src/hooks/useFormRequest.js +24 -1
- package/es/components/form-render/src/utils/index.d.ts +2 -2
- package/es/components/form-render/src/utils/index.js +27 -3
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +124 -66
- package/es/components/iho-table/index.js +1 -2
- package/es/components/iho-table/src/IhoTable.vue.d.ts +124 -66
- package/es/components/iho-table/src/{IhoTable.js → IhoTable.vue.js} +2 -1
- package/es/components/iho-table/src/components/IhoTableColumn.js +14 -11
- package/es/components/iho-table/src/constants/index.d.ts +5 -3
- package/es/components/iho-table/src/constants/index.js +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +64 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +17 -9
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +5 -3
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +3 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterPlugin/{filter.js → filter.vue.js} +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +32 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/{editDate.js → editDate.vue.js} +0 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +10 -12
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +11 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +17 -24
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +11 -13
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/{editSeparate.js → editSeparate.vue.js} +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +9 -12
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +13 -17
- package/es/components/iho-table/src/types/index.d.ts +6 -6
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
- package/es/components/iho-table/src/utils/index.d.ts +12 -2
- package/es/components/iho-table/src/utils/index.js +33 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +5 -2
- package/es/components/info-header/index.js +1 -1
- package/es/components/info-header/src/{HiddenContent.js → HiddenContent.vue.js} +1 -1
- package/es/components/info-header/src/{InfoEllipsis.js → InfoEllipsis.vue.js} +0 -0
- package/es/components/info-header/src/{InfoHeader.js → InfoHeader.vue.js} +2 -2
- package/es/components/keyboard/index.d.ts +146 -78
- package/es/components/keyboard/index.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +155 -78
- package/es/components/keyboard/src/Keyboard.vue.js +149 -0
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
- package/es/components/keyboard/src/components/{InputNumber.js → InputNumber.vue.js} +0 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +206 -0
- package/es/components/map/index.js +1 -1
- package/es/components/map/src/{Map.js → Map.vue.js} +0 -0
- package/es/components/recommend-search/index.d.ts +813 -0
- package/es/components/recommend-search/index.js +10 -0
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +815 -0
- package/es/components/recommend-search/src/RecommendSearch.vue.js +62 -0
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +119 -0
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +148 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +303 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +103 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +63 -0
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +104 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +350 -0
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +156 -0
- package/es/components/recommend-search/src/constant/index.d.ts +4 -0
- package/es/components/recommend-search/src/constant/index.js +7 -0
- package/es/components/recommend-search/src/types/index.d.ts +9 -0
- package/es/components/recommend-search/src/types/index.js +1 -0
- package/es/components/recommend-search/style/index.css +1 -0
- package/es/components/scale-view/index.js +1 -1
- package/es/components/scale-view/src/{ScaleView.js → ScaleView.vue.js} +5 -5
- package/es/components/scale-view/src/components/{AnswerParse.js → AnswerParse.vue.js} +1 -1
- package/es/components/scale-view/src/components/{EvaluateCountdown.js → EvaluateCountdown.vue.js} +1 -1
- package/es/components/scale-view/src/components/{EvaluatePage.js → EvaluatePage.vue.js} +0 -0
- package/es/components/scale-view/src/components/{LoadingCom.js → LoadingCom.vue.js} +0 -0
- package/es/components/{big-table/src/components/NoData.js → scale-view/src/components/NoData.vue.js} +4 -4
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.js +1 -1
- package/es/components/search-cascader/index.js +1 -1
- package/es/components/search-cascader/src/{SearchCascader.js → SearchCascader.vue.js} +0 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +3 -3
- package/es/components/select-label/index.js +2 -2
- package/es/components/select-label/src/{LabelFormContent.js → LabelFormContent.vue.js} +1 -1
- package/es/components/select-label/src/{SelectLabel.js → SelectLabel.vue.js} +1 -1
- package/es/components/select-label/src/{SelectLabel.vue_vue_type_script_setup_true_lang.js → SelectLabel.vue2.js} +2 -2
- package/es/components/select-label/src/components/{label-classify.js → label-classify.vue.js} +0 -0
- package/es/components/select-person/index.js +1 -1
- package/es/components/select-person/src/{SelectPerson.js → SelectPerson.vue.js} +1 -1
- package/es/components/select-person/src/{SelectPerson.vue_vue_type_script_setup_true_lang.js → SelectPerson.vue2.js} +0 -0
- package/es/components/shortcut-provider/index.js +1 -1
- package/es/components/shortcut-provider/src/{ShortcutProvider.js → ShortcutProvider.vue.js} +0 -0
- package/es/components/shortcut-setter/index.js +1 -1
- package/es/components/shortcut-setter/src/{ShortcutSetter.js → ShortcutSetter.vue.js} +1 -1
- package/es/components/shortcut-setter/src/{ShortcutSetterItem.js → ShortcutSetterItem.vue.js} +0 -0
- package/es/components/steps-wheel/index.d.ts +3 -0
- package/es/components/steps-wheel/index.js +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +3 -0
- package/es/components/steps-wheel/src/{StepsWheel.js → StepsWheel.vue.js} +38 -9
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/time-line/index.js +1 -1
- package/es/components/time-line/src/{TimeLine.js → TimeLine.vue.js} +0 -0
- package/es/components/vod-chunk-upload/index.js +1 -1
- package/es/components/vod-chunk-upload/src/{chunk-upload-new.js → chunk-upload-new.vue.js} +0 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +2 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/{vod-chunk-upload.js → vod-chunk-upload.vue.js} +3 -3
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
- package/es/shared/assets/img/failure.js +1 -3
- package/es/shared/assets/img/failure.png.js +3 -0
- 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 -3
- package/es/shared/assets/img/no-permission.png.js +3 -0
- package/es/shared/assets/img/nodata.js +1 -3
- package/es/shared/assets/img/nodata.png.js +3 -0
- package/es/shared/assets/img/notfound.js +1 -3
- package/es/shared/assets/img/notfound.png.js +3 -0
- package/es/shared/assets/img/qr.js +1 -3
- package/es/shared/assets/img/qr.png.js +3 -0
- package/es/shared/assets/img/success.js +1 -3
- package/es/shared/assets/img/success.png.js +3 -0
- package/es/shared/assets/img/video.js +1 -3
- package/es/shared/assets/img/video.png.js +3 -0
- package/es/shared/assets/img/video_default_cover.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +3 -0
- 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 -3
- package/es/shared/assets/img/xb_big.png.js +3 -0
- package/es/shared/assets/img/xb_small.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +3 -0
- package/es/shared/components/SelectPage/{SelectPage.js → SelectPage.vue.js} +0 -0
- package/es/shared/components/SelectPage/index.js +2 -2
- package/es/shared/components/SvgIcon/{SvgIcon.js → SvgIcon.vue.js} +0 -0
- package/es/shared/components/SvgIcon/index.js +2 -2
- package/es/shared/components/TextOverTooltip/{TextOverTooltip.js → TextOverTooltip.vue.js} +0 -0
- package/es/shared/components/TextOverTooltip/index.js +2 -2
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/components/no-data/{NoData.js → NoData.vue.js} +4 -4
- package/es/shared/components/no-data/index.js +2 -2
- package/es/shared/utils/index.d.ts +1 -1
- package/es/shared/utils/index.js +3 -3
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/button-print/src/components/edit.js +0 -152
- package/es/components/keyboard/src/Keyboard.js +0 -285
|
@@ -11,4 +11,4 @@ export declare function deepOmit<T extends AnyObject>(target: T, keys: Array<key
|
|
|
11
11
|
export declare function separateMetaModule<T extends AnyObject>(modules: Record<string, unknown>): T;
|
|
12
12
|
export declare function findAncestor(ele: HTMLElement | null, finder: (ele: HTMLElement) => boolean): HTMLElement | null;
|
|
13
13
|
export declare function widthAppend(value: string | number, append?: string): string;
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function targetStringIncludes(arr: string[], target: string): boolean;
|
package/es/shared/utils/index.js
CHANGED
|
@@ -136,8 +136,8 @@ function widthAppend(value, append = "px") {
|
|
|
136
136
|
return value.endsWith(append) ? value : `${value}${append}`;
|
|
137
137
|
throw new Error(`invalid width value ${value}, it need to be a string or number!`);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function targetStringIncludes(arr, target) {
|
|
140
|
+
return arr.some((value) => target.includes(value));
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, safeComponentRegister, separateMetaModule, traverse, uuidGenerator,
|
|
143
|
+
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, safeComponentRegister, separateMetaModule, targetStringIncludes, traverse, uuidGenerator, widthAppend };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
type FixedSizeArray<T extends number, U> = T extends 0
|
|
2
|
+
? void[]
|
|
3
|
+
: ReadonlyArray<U> & {
|
|
4
|
+
0: U;
|
|
5
|
+
length: T;
|
|
6
|
+
};
|
|
7
|
+
type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
|
|
8
|
+
type Append<T extends any[], U> = {
|
|
9
|
+
0: [U];
|
|
10
|
+
1: [T[0], U];
|
|
11
|
+
2: [T[0], T[1], U];
|
|
12
|
+
3: [T[0], T[1], T[2], U];
|
|
13
|
+
4: [T[0], T[1], T[2], T[3], U];
|
|
14
|
+
5: [T[0], T[1], T[2], T[3], T[4], U];
|
|
15
|
+
6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
|
|
16
|
+
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
|
|
17
|
+
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
|
|
18
|
+
}[Measure<T['length']>];
|
|
19
|
+
type AsArray<T> = T extends any[] ? T : [T];
|
|
20
|
+
|
|
21
|
+
declare class UnsetAdditionalOptions {
|
|
22
|
+
_UnsetAdditionalOptions: true;
|
|
23
|
+
}
|
|
24
|
+
type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
|
|
25
|
+
|
|
26
|
+
type Callback<E, T> = (error: E | null, result?: T) => void;
|
|
27
|
+
type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
|
|
28
|
+
|
|
29
|
+
type FullTap = Tap & {
|
|
30
|
+
type: 'sync' | 'async' | 'promise';
|
|
31
|
+
fn: Function;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type Tap = TapOptions & {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type TapOptions = {
|
|
39
|
+
before?: string;
|
|
40
|
+
stage?: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
44
|
+
name?: string;
|
|
45
|
+
tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
|
|
46
|
+
call?: (...args: any[]) => void;
|
|
47
|
+
loop?: (...args: any[]) => void;
|
|
48
|
+
error?: (err: Error) => void;
|
|
49
|
+
result?: (result: R) => void;
|
|
50
|
+
done?: () => void;
|
|
51
|
+
register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
|
|
55
|
+
|
|
56
|
+
declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
57
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
58
|
+
name: string | undefined;
|
|
59
|
+
taps: FullTap[];
|
|
60
|
+
intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
|
|
61
|
+
isUsed(): boolean;
|
|
62
|
+
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
63
|
+
promise(...args: AsArray<T>): Promise<R>;
|
|
64
|
+
tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
|
|
65
|
+
withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
69
|
+
call(...args: AsArray<T>): R;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
|
|
73
|
+
export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
|
|
74
|
+
export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
|
|
75
|
+
T,
|
|
76
|
+
AsArray<T>[0],
|
|
77
|
+
AdditionalOptions
|
|
78
|
+
> {}
|
|
79
|
+
|
|
80
|
+
declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
81
|
+
tapAsync(
|
|
82
|
+
options: string | (Tap & IfSet<AdditionalOptions>),
|
|
83
|
+
fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
|
|
84
|
+
): void;
|
|
85
|
+
tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
89
|
+
T,
|
|
90
|
+
void,
|
|
91
|
+
AdditionalOptions
|
|
92
|
+
> {}
|
|
93
|
+
export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
94
|
+
T,
|
|
95
|
+
R,
|
|
96
|
+
AdditionalOptions
|
|
97
|
+
> {}
|
|
98
|
+
export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
99
|
+
T,
|
|
100
|
+
void,
|
|
101
|
+
AdditionalOptions
|
|
102
|
+
> {}
|
|
103
|
+
export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
104
|
+
T,
|
|
105
|
+
R,
|
|
106
|
+
AdditionalOptions
|
|
107
|
+
> {}
|
|
108
|
+
export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
109
|
+
T,
|
|
110
|
+
void,
|
|
111
|
+
AdditionalOptions
|
|
112
|
+
> {}
|
|
113
|
+
export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
114
|
+
T,
|
|
115
|
+
AsArray<T>[0],
|
|
116
|
+
AdditionalOptions
|
|
117
|
+
> {}
|
|
118
|
+
|
|
119
|
+
type HookFactory<H> = (key: any, hook?: H) => H;
|
|
120
|
+
|
|
121
|
+
interface HookMapInterceptor<H> {
|
|
122
|
+
factory?: HookFactory<H>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export class HookMap<H> {
|
|
126
|
+
constructor(factory: HookFactory<H>, name?: string);
|
|
127
|
+
name: string | undefined;
|
|
128
|
+
get(key: any): H | undefined;
|
|
129
|
+
for(key: any): H;
|
|
130
|
+
intercept(interceptor: HookMapInterceptor<H>): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export class MultiHook<H> {
|
|
134
|
+
constructor(hooks: H[], name?: string);
|
|
135
|
+
name: string | undefined;
|
|
136
|
+
tap(options: string | Tap, fn?: Function): void;
|
|
137
|
+
tapAsync(options: string | Tap, fn?: Function): void;
|
|
138
|
+
tapPromise(options: string | Tap, fn?: Function): void;
|
|
139
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.31-beta.
|
|
3
|
+
"version": "3.1.31-beta.11",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "a8d46e9ee25e00f378e72e0e30ca668efb1fb9ff"
|
|
65
65
|
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createElementVNode, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { useMessage, NForm, NFormItem, NSpace, NUpload, NUploadDragger, NIcon, NText, NP } from 'naive-ui';
|
|
3
|
-
import { Archive } from '@vicons/ionicons5';
|
|
4
|
-
import axios from 'axios';
|
|
5
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
6
|
-
|
|
7
|
-
const _hoisted_1 = { style: { "margin-bottom": "12px" } };
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "edit",
|
|
10
|
-
setup(__props, { expose }) {
|
|
11
|
-
const HOST = window.location.host;
|
|
12
|
-
const SAVEIREPORT = `${HOST}/bi-api/reprot/print/open/client/saveIReportFormat`;
|
|
13
|
-
const instance = axios.create({});
|
|
14
|
-
const $message = useMessage();
|
|
15
|
-
const fileList = ref([
|
|
16
|
-
{
|
|
17
|
-
key: "jrxml",
|
|
18
|
-
value: []
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
key: "jasper",
|
|
22
|
-
value: []
|
|
23
|
-
}
|
|
24
|
-
]);
|
|
25
|
-
function submit(datas) {
|
|
26
|
-
return new Promise((resolve, reject) => {
|
|
27
|
-
var _a, _b, _c, _d;
|
|
28
|
-
const isOk = fileList.value.every((file) => file.value.length > 0);
|
|
29
|
-
if (!isOk) {
|
|
30
|
-
$message.warning("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const jrxml = (_b = (_a = fileList.value.find((file) => file.key === "jrxml")) == null ? void 0 : _a.value) == null ? void 0 : _b[0];
|
|
34
|
-
const jasper = (_d = (_c = fileList.value.find((file) => file.key === "jasper")) == null ? void 0 : _c.value) == null ? void 0 : _d[0];
|
|
35
|
-
const data = {
|
|
36
|
-
jrxml: jrxml == null ? void 0 : jrxml.file,
|
|
37
|
-
jasper: jasper == null ? void 0 : jasper.file,
|
|
38
|
-
...datas
|
|
39
|
-
};
|
|
40
|
-
const params = new FormData();
|
|
41
|
-
Object.keys(data).forEach((v) => {
|
|
42
|
-
params.append(v, data[v]);
|
|
43
|
-
});
|
|
44
|
-
instance.post(SAVEIREPORT, params, {
|
|
45
|
-
headers: {
|
|
46
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
47
|
-
}
|
|
48
|
-
}).then(({ data: data2 }) => {
|
|
49
|
-
if ((data2 == null ? void 0 : data2.result) !== "SUCCESS") {
|
|
50
|
-
$message.error((data2 == null ? void 0 : data2.resultMsg) || "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
51
|
-
reject();
|
|
52
|
-
} else {
|
|
53
|
-
resolve("SUCCESS");
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function onChange(data, index) {
|
|
59
|
-
fileList.value[index].value = data.fileList;
|
|
60
|
-
}
|
|
61
|
-
async function onBeforeUpload(data) {
|
|
62
|
-
if (!validateFormat(data.file, ".jrxml,.jasper")) {
|
|
63
|
-
$message.warning("\u53EA\u80FD\u4E0A\u4F20.jrxml\u6216\u8005.jasper\u683C\u5F0F\u7684\u6587\u4EF6\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20");
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
function validateFormat(file, format) {
|
|
69
|
-
let res = false;
|
|
70
|
-
if (!format || format.includes("*")) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
let list = format.split(",");
|
|
74
|
-
if (!list.length) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
let rExt = /\.([^.]+)$/;
|
|
78
|
-
let ext = rExt.exec(file.name) ? RegExp.$1.toLowerCase() : "";
|
|
79
|
-
res = format.includes(ext);
|
|
80
|
-
return res;
|
|
81
|
-
}
|
|
82
|
-
expose({
|
|
83
|
-
submit
|
|
84
|
-
});
|
|
85
|
-
return (_ctx, _cache) => {
|
|
86
|
-
return openBlock(), createBlock(unref(NForm), {
|
|
87
|
-
"label-placement": "left",
|
|
88
|
-
"label-width": 75
|
|
89
|
-
}, {
|
|
90
|
-
default: withCtx(() => [
|
|
91
|
-
createVNode(unref(NFormItem), {
|
|
92
|
-
label: "\u683C\u5F0F\u6587\u4EF6:",
|
|
93
|
-
path: "file"
|
|
94
|
-
}, {
|
|
95
|
-
default: withCtx(() => [
|
|
96
|
-
createVNode(unref(NSpace), { vertical: "" }, {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file, index) => {
|
|
99
|
-
return openBlock(), createBlock(unref(NUpload), {
|
|
100
|
-
"directory-dnd": "",
|
|
101
|
-
max: 1,
|
|
102
|
-
key: file.key,
|
|
103
|
-
onBeforeUpload,
|
|
104
|
-
onChange: (data) => onChange(data, index)
|
|
105
|
-
}, {
|
|
106
|
-
default: withCtx(() => [
|
|
107
|
-
createVNode(unref(NUploadDragger), null, {
|
|
108
|
-
default: withCtx(() => [
|
|
109
|
-
createElementVNode("div", _hoisted_1, [
|
|
110
|
-
createVNode(unref(NIcon), {
|
|
111
|
-
size: "36",
|
|
112
|
-
depth: 3,
|
|
113
|
-
component: unref(Archive)
|
|
114
|
-
}, null, 8, ["component"])
|
|
115
|
-
]),
|
|
116
|
-
createVNode(unref(NText), { style: { "font-size": "14px" } }, {
|
|
117
|
-
default: withCtx(() => [
|
|
118
|
-
createTextVNode("\u70B9\u51FB\u6216\u8005\u62D6\u52A8\u6587\u4EF6\u5230\u8BE5\u533A\u57DF\u6765\u4E0A\u4F20")
|
|
119
|
-
]),
|
|
120
|
-
_: 1
|
|
121
|
-
}),
|
|
122
|
-
createVNode(unref(NP), {
|
|
123
|
-
depth: "3",
|
|
124
|
-
style: { "margin": "5px 0 0 0" }
|
|
125
|
-
}, {
|
|
126
|
-
default: withCtx(() => [
|
|
127
|
-
createTextVNode("xxxxxx." + toDisplayString(file.key), 1)
|
|
128
|
-
]),
|
|
129
|
-
_: 2
|
|
130
|
-
}, 1024)
|
|
131
|
-
]),
|
|
132
|
-
_: 2
|
|
133
|
-
}, 1024)
|
|
134
|
-
]),
|
|
135
|
-
_: 2
|
|
136
|
-
}, 1032, ["onChange"]);
|
|
137
|
-
}), 128))
|
|
138
|
-
]),
|
|
139
|
-
_: 1
|
|
140
|
-
})
|
|
141
|
-
]),
|
|
142
|
-
_: 1
|
|
143
|
-
})
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
var EditForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "edit.vue"]]);
|
|
151
|
-
|
|
152
|
-
export { EditForm as default };
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createCommentVNode, unref, createElementVNode, createVNode, withCtx, renderList, normalizeClass, toDisplayString, createBlock, normalizeStyle, createTextVNode } from 'vue';
|
|
2
|
-
import { NSpace, NIcon } from 'naive-ui';
|
|
3
|
-
import { ArrowUndoSharp, Close, GitCompareOutline } from '@vicons/ionicons5';
|
|
4
|
-
import InputNumber from './components/InputNumber.js';
|
|
5
|
-
import { useRefHistory, useDraggable } from '@vueuse/core';
|
|
6
|
-
import { getNumber } from './utils/index.js';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
8
|
-
|
|
9
|
-
const _hoisted_1 = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "c-keyboard"
|
|
12
|
-
};
|
|
13
|
-
const _hoisted_2 = { class: "left" };
|
|
14
|
-
const _hoisted_3 = { class: "keys" };
|
|
15
|
-
const _hoisted_4 = ["onClick"];
|
|
16
|
-
const _hoisted_5 = ["onClick"];
|
|
17
|
-
const _hoisted_6 = { class: "btns" };
|
|
18
|
-
const _hoisted_7 = ["onClick"];
|
|
19
|
-
const _hoisted_8 = { class: "inputs" };
|
|
20
|
-
const _hoisted_9 = { class: "inputs-right" };
|
|
21
|
-
const _hoisted_10 = /* @__PURE__ */ createElementVNode("hr", null, null, -1);
|
|
22
|
-
const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", null, "\u952E\u76D8", -1);
|
|
23
|
-
const _hoisted_12 = { class: "keys" };
|
|
24
|
-
const _hoisted_13 = ["onClick"];
|
|
25
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
-
__name: "Keyboard",
|
|
27
|
-
props: {
|
|
28
|
-
mode: { type: String, default: "english" },
|
|
29
|
-
dragable: { type: Boolean, default: false },
|
|
30
|
-
positionInitialValue: { type: Object, default: () => ({ x: 0, y: 0 }) }
|
|
31
|
-
},
|
|
32
|
-
emits: [
|
|
33
|
-
"change",
|
|
34
|
-
"keydown"
|
|
35
|
-
],
|
|
36
|
-
setup(__props, { emit }) {
|
|
37
|
-
const props = __props;
|
|
38
|
-
const NUMBERKEYS = "1234567890.";
|
|
39
|
-
const DAYS = [3, 7, 14, 30];
|
|
40
|
-
const ENGLISHKEY = "QWERTYUIOPASDFGHJKLZXCVBNM.";
|
|
41
|
-
const ENGLISHOTHERKEY = ["Switch", " ", "Undo", "Enter"];
|
|
42
|
-
const ENGLISHKEYS = ENGLISHKEY.split("").concat(ENGLISHOTHERKEY);
|
|
43
|
-
const ENGLISHKEYS_ = ENGLISHKEY.split(".")[0].split("").sort().concat(["."], ENGLISHOTHERKEY);
|
|
44
|
-
const englishKeyboardRef = ref(null);
|
|
45
|
-
const keyboardDragRef = ref(null);
|
|
46
|
-
const numberKeys = ref(NUMBERKEYS.split(""));
|
|
47
|
-
const days = ref(DAYS);
|
|
48
|
-
const doses = ref([2, 3, 4, 5, 6, 7, 8]);
|
|
49
|
-
const englishKeys = ref(ENGLISHKEYS.slice());
|
|
50
|
-
const value = ref();
|
|
51
|
-
const inputValue = ref("");
|
|
52
|
-
const integerValue = ref();
|
|
53
|
-
const numeratorValue = ref();
|
|
54
|
-
const denominatorValue = ref();
|
|
55
|
-
const inputValueStatus = ref("success");
|
|
56
|
-
const numeratorValueStatus = ref("success");
|
|
57
|
-
const denominatorValueStatus = ref("success");
|
|
58
|
-
const isDefault = computed(() => props.mode === "english");
|
|
59
|
-
const isDay = computed(() => props.mode === "day");
|
|
60
|
-
const isDose = computed(() => props.mode === "dose");
|
|
61
|
-
const { history, undo, redo } = useRefHistory(inputValue);
|
|
62
|
-
const { x, y, style } = useDraggable(englishKeyboardRef, {
|
|
63
|
-
initialValue: props.positionInitialValue,
|
|
64
|
-
preventDefault: true,
|
|
65
|
-
handle: keyboardDragRef
|
|
66
|
-
});
|
|
67
|
-
function keydown(key) {
|
|
68
|
-
var _a, _b;
|
|
69
|
-
if (props.mode === "english") {
|
|
70
|
-
if (key !== "Switch") {
|
|
71
|
-
emit("keydown", key);
|
|
72
|
-
} else {
|
|
73
|
-
englishKeys.value = englishKeys.value[0] === "Q" ? ENGLISHKEYS_.slice() : ENGLISHKEYS.slice();
|
|
74
|
-
}
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
switch (key) {
|
|
78
|
-
case "Undo": {
|
|
79
|
-
undo();
|
|
80
|
-
setInputValueStatus();
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case "Enter":
|
|
84
|
-
value.value = +inputValue.value;
|
|
85
|
-
emit("change", value.value);
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
if (typeof key === "number") {
|
|
89
|
-
inputValue.value = key.toString();
|
|
90
|
-
} else {
|
|
91
|
-
inputValue.value = (((_b = (_a = inputValue.value) == null ? void 0 : _a.toString) == null ? void 0 : _b.call(_a)) || "") + key;
|
|
92
|
-
}
|
|
93
|
-
setInputValueStatus();
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function updateFraction(value2) {
|
|
98
|
-
if (!setInputStatus(inputValue, inputValueStatus))
|
|
99
|
-
return;
|
|
100
|
-
inputValue.value = (Math.round(+inputValue.value * (1 / value2) * 100) / 100).toString();
|
|
101
|
-
setInputValueStatus();
|
|
102
|
-
}
|
|
103
|
-
function calculateFraction() {
|
|
104
|
-
if (!setInputStatus(inputValue, inputValueStatus) || !setInputStatus(numeratorValue, numeratorValueStatus, true) || !setInputStatus(denominatorValue, denominatorValueStatus, true))
|
|
105
|
-
return;
|
|
106
|
-
const value2 = getNumber(integerValue.value) + getNumber(numeratorValue.value) / getNumber(denominatorValue.value);
|
|
107
|
-
inputValue.value = (Math.round(+inputValue.value * value2 * 100) / 100).toString();
|
|
108
|
-
setInputValueStatus();
|
|
109
|
-
}
|
|
110
|
-
function setInputStatus(valueRef, statusRef, isInteger) {
|
|
111
|
-
if (!isInteger && (!valueRef.value || valueRef.value === ".") || isInteger && !valueRef.value) {
|
|
112
|
-
statusRef.value = "error";
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
function setInputValueStatus() {
|
|
118
|
-
inputValueStatus.value = !inputValue.value ? "error" : "success";
|
|
119
|
-
}
|
|
120
|
-
return (_ctx, _cache) => {
|
|
121
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
122
|
-
createCommentVNode(' <n-popover\r\n ref="popoverRef"\r\n v-if="!isDefault"\r\n trigger="click"\r\n :show-arrow="false"\r\n placement="bottom-start"\r\n style="padding: 0"\r\n display-directive="show"\r\n > '),
|
|
123
|
-
createCommentVNode(' <template #trigger>\r\n <n-input-number v-model:value="value" :show-button="false" />\r\n </template> '),
|
|
124
|
-
!unref(isDefault) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
125
|
-
createElementVNode("div", _hoisted_2, [
|
|
126
|
-
createVNode(InputNumber, {
|
|
127
|
-
modelValue: inputValue.value,
|
|
128
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
129
|
-
status: inputValueStatus.value,
|
|
130
|
-
"onUpdate:status": _cache[1] || (_cache[1] = ($event) => inputValueStatus.value = $event)
|
|
131
|
-
}, null, 8, ["modelValue", "status"]),
|
|
132
|
-
createElementVNode("div", _hoisted_3, [
|
|
133
|
-
createVNode(unref(NSpace), null, {
|
|
134
|
-
default: withCtx(() => [
|
|
135
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(numberKeys.value, (key) => {
|
|
136
|
-
return openBlock(), createElementBlock("span", {
|
|
137
|
-
key,
|
|
138
|
-
class: normalizeClass(key === "0" ? "is-0" : ""),
|
|
139
|
-
onClick: ($event) => keydown(key)
|
|
140
|
-
}, toDisplayString(key), 11, _hoisted_4);
|
|
141
|
-
}), 128))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}),
|
|
145
|
-
createVNode(unref(NSpace), null, {
|
|
146
|
-
default: withCtx(() => [
|
|
147
|
-
createElementVNode("span", {
|
|
148
|
-
class: "opt",
|
|
149
|
-
onClick: _cache[2] || (_cache[2] = ($event) => keydown("Undo"))
|
|
150
|
-
}, [
|
|
151
|
-
createVNode(unref(NIcon), { component: unref(ArrowUndoSharp) }, null, 8, ["component"])
|
|
152
|
-
]),
|
|
153
|
-
createElementVNode("span", {
|
|
154
|
-
class: "opt",
|
|
155
|
-
onClick: _cache[3] || (_cache[3] = ($event) => keydown("Enter"))
|
|
156
|
-
}, "\u786E\u5B9A")
|
|
157
|
-
]),
|
|
158
|
-
_: 1
|
|
159
|
-
})
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
unref(isDay) ? (openBlock(), createBlock(unref(NSpace), {
|
|
163
|
-
key: 0,
|
|
164
|
-
class: "right-days",
|
|
165
|
-
justify: "center",
|
|
166
|
-
vertical: ""
|
|
167
|
-
}, {
|
|
168
|
-
default: withCtx(() => [
|
|
169
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day) => {
|
|
170
|
-
return openBlock(), createElementBlock("span", {
|
|
171
|
-
class: "btn",
|
|
172
|
-
key: day,
|
|
173
|
-
onClick: ($event) => keydown(day)
|
|
174
|
-
}, toDisplayString(day) + "\u5929", 9, _hoisted_5);
|
|
175
|
-
}), 128))
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
})) : createCommentVNode("v-if", true),
|
|
179
|
-
unref(isDose) ? (openBlock(), createBlock(unref(NSpace), {
|
|
180
|
-
key: 1,
|
|
181
|
-
class: "right-dose",
|
|
182
|
-
"wrap-item": false
|
|
183
|
-
}, {
|
|
184
|
-
default: withCtx(() => [
|
|
185
|
-
createElementVNode("div", _hoisted_6, [
|
|
186
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(doses.value, (dose) => {
|
|
187
|
-
return openBlock(), createElementBlock("span", {
|
|
188
|
-
class: "btn",
|
|
189
|
-
key: dose,
|
|
190
|
-
onClick: ($event) => updateFraction(dose)
|
|
191
|
-
}, "1/" + toDisplayString(dose), 9, _hoisted_7);
|
|
192
|
-
}), 128))
|
|
193
|
-
]),
|
|
194
|
-
createVNode(unref(NSpace), {
|
|
195
|
-
justify: "center",
|
|
196
|
-
vertical: ""
|
|
197
|
-
}, {
|
|
198
|
-
default: withCtx(() => [
|
|
199
|
-
createElementVNode("div", _hoisted_8, [
|
|
200
|
-
createVNode(InputNumber, {
|
|
201
|
-
integer: "",
|
|
202
|
-
modelValue: integerValue.value,
|
|
203
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => integerValue.value = $event)
|
|
204
|
-
}, null, 8, ["modelValue"]),
|
|
205
|
-
createElementVNode("div", _hoisted_9, [
|
|
206
|
-
createVNode(InputNumber, {
|
|
207
|
-
integer: "",
|
|
208
|
-
modelValue: numeratorValue.value,
|
|
209
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => numeratorValue.value = $event),
|
|
210
|
-
status: numeratorValueStatus.value,
|
|
211
|
-
"onUpdate:status": _cache[6] || (_cache[6] = ($event) => numeratorValueStatus.value = $event)
|
|
212
|
-
}, null, 8, ["modelValue", "status"]),
|
|
213
|
-
_hoisted_10,
|
|
214
|
-
createVNode(InputNumber, {
|
|
215
|
-
integer: "",
|
|
216
|
-
modelValue: denominatorValue.value,
|
|
217
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => denominatorValue.value = $event),
|
|
218
|
-
status: denominatorValueStatus.value,
|
|
219
|
-
"onUpdate:status": _cache[8] || (_cache[8] = ($event) => denominatorValueStatus.value = $event)
|
|
220
|
-
}, null, 8, ["modelValue", "status"])
|
|
221
|
-
])
|
|
222
|
-
]),
|
|
223
|
-
createElementVNode("span", {
|
|
224
|
-
class: "btn",
|
|
225
|
-
onClick: calculateFraction
|
|
226
|
-
}, "\u5206\u5B50\u5F0F\u5242\u91CF")
|
|
227
|
-
]),
|
|
228
|
-
_: 1
|
|
229
|
-
})
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
})) : createCommentVNode("v-if", true)
|
|
233
|
-
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
234
|
-
createCommentVNode(" </n-popover> "),
|
|
235
|
-
createElementVNode("div", {
|
|
236
|
-
class: normalizeClass(["c-keyboard-english", { isFixed: __props.dragable }]),
|
|
237
|
-
ref_key: "englishKeyboardRef",
|
|
238
|
-
ref: englishKeyboardRef,
|
|
239
|
-
style: normalizeStyle(unref(style))
|
|
240
|
-
}, [
|
|
241
|
-
createVNode(unref(NSpace), {
|
|
242
|
-
"wrap-item": false,
|
|
243
|
-
align: "center",
|
|
244
|
-
justify: "space-between",
|
|
245
|
-
ref_key: "keyboardDragRef",
|
|
246
|
-
ref: keyboardDragRef,
|
|
247
|
-
style: { "cursor": "move" }
|
|
248
|
-
}, {
|
|
249
|
-
default: withCtx(() => [
|
|
250
|
-
_hoisted_11,
|
|
251
|
-
createVNode(unref(NIcon), {
|
|
252
|
-
onClick: _cache[9] || (_cache[9] = ($event) => keydown("close")),
|
|
253
|
-
component: unref(Close)
|
|
254
|
-
}, null, 8, ["component"])
|
|
255
|
-
]),
|
|
256
|
-
_: 1
|
|
257
|
-
}, 512),
|
|
258
|
-
createElementVNode("div", _hoisted_12, [
|
|
259
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(englishKeys.value, (key, index) => {
|
|
260
|
-
return openBlock(), createElementBlock("span", {
|
|
261
|
-
key,
|
|
262
|
-
class: normalizeClass(["key" + index]),
|
|
263
|
-
onClick: ($event) => keydown(key)
|
|
264
|
-
}, [
|
|
265
|
-
key === "Switch" ? (openBlock(), createBlock(unref(NIcon), {
|
|
266
|
-
key: 0,
|
|
267
|
-
component: unref(GitCompareOutline)
|
|
268
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
269
|
-
key === "Undo" ? (openBlock(), createBlock(unref(NIcon), {
|
|
270
|
-
key: 1,
|
|
271
|
-
component: unref(ArrowUndoSharp)
|
|
272
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
273
|
-
createTextVNode(" " + toDisplayString(!ENGLISHOTHERKEY.includes(key) || key === "Enter" ? key : key === "" ? "\u7A7A\u683C" : ""), 1)
|
|
274
|
-
], 10, _hoisted_13);
|
|
275
|
-
}), 128))
|
|
276
|
-
])
|
|
277
|
-
], 6)
|
|
278
|
-
], 2112))
|
|
279
|
-
], 2112);
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "Keyboard.vue"]]);
|
|
284
|
-
|
|
285
|
-
export { script as default };
|