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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
|
2
1
|
var fabric = fabric || { version: "5.2.1" };
|
|
3
2
|
if (typeof document !== "undefined" && typeof window !== "undefined") {
|
|
4
3
|
if (document instanceof (typeof HTMLDocument !== "undefined" ? HTMLDocument : Document)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index.js';
|
|
3
|
-
import script from './src/FieldSet.js';
|
|
3
|
+
import script from './src/FieldSet.vue.js';
|
|
4
4
|
|
|
5
5
|
const FieldSet = script;
|
|
6
6
|
FieldSet.install = function(app) {
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index.js';
|
|
3
|
-
import script from './src/FormConfig.js';
|
|
3
|
+
import script from './src/FormConfig.vue.js';
|
|
4
4
|
|
|
5
5
|
const FormConfig = script;
|
|
6
6
|
FormConfig.install = function(app) {
|
|
@@ -2,9 +2,9 @@ import { defineComponent, ref, provide, toRaw, openBlock, createElementBlock, no
|
|
|
2
2
|
import { uuidGenerator } from '../../../shared/utils/index.js';
|
|
3
3
|
import { cloneDeep, isFunction } from 'lodash-es';
|
|
4
4
|
import draggableComponent from '../../../shared/components/VueDraggable/src/vuedraggable.js';
|
|
5
|
-
import FormConfigCreator from './components/FormConfigCreator.js';
|
|
6
|
-
import FormConfigDragDisplay from './components/FormConfigDragDisplay.js';
|
|
7
|
-
import FormConfigEdit from './components/FormConfigEdit.js';
|
|
5
|
+
import FormConfigCreator from './components/FormConfigCreator.vue.js';
|
|
6
|
+
import FormConfigDragDisplay from './components/FormConfigDragDisplay.vue.js';
|
|
7
|
+
import FormConfigEdit from './components/FormConfigEdit.vue.js';
|
|
8
8
|
import FormConfigMaterialItem from './components/FormConfigMaterialItem.js';
|
|
9
9
|
import { useDataNormalize } from './hooks/useDataNormalize.js';
|
|
10
10
|
import { InjectionFieldList, InjectionMaterialList, InjectionActiveFieldItem, FORM_CONFIG_GROUP } from './constants/index.js';
|
package/es/components/form-config/src/components/{FormConfigCreator.js → FormConfigCreator.vue.js}
RENAMED
|
File without changes
|
|
File without changes
|
package/es/components/form-config/src/components/{FormConfigEdit.js → FormConfigEdit.vue.js}
RENAMED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as FormConfigCreator } from './FormConfigCreator.js';
|
|
2
|
-
export { default as FormConfigEdit } from './FormConfigEdit.js';
|
|
3
|
-
export { default as FormConfigDragDisplay } from './FormConfigDragDisplay.js';
|
|
4
|
-
export { default as CloseButton } from './renderer/CloseButton.js';
|
|
5
|
-
export { default as ComplexNode } from './renderer/ComplexNode.js';
|
|
6
|
-
export { default as DefaultNode } from './renderer/DefaultNode.js';
|
|
1
|
+
export { default as FormConfigCreator } from './FormConfigCreator.vue.js';
|
|
2
|
+
export { default as FormConfigEdit } from './FormConfigEdit.vue.js';
|
|
3
|
+
export { default as FormConfigDragDisplay } from './FormConfigDragDisplay.vue.js';
|
|
4
|
+
export { default as CloseButton } from './renderer/CloseButton.vue.js';
|
|
5
|
+
export { default as ComplexNode } from './renderer/ComplexNode.vue.js';
|
|
6
|
+
export { default as DefaultNode } from './renderer/DefaultNode.vue.js';
|
package/es/components/form-config/src/components/renderer/{CloseButton.js → CloseButton.vue.js}
RENAMED
|
File without changes
|
package/es/components/form-config/src/components/renderer/{ComplexNode.js → ComplexNode.vue.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, openBlock, createElementBlock, createElementVNode, mergeProps, unref, withModifiers, createTextVNode, toDisplayString, createVNode } from 'vue';
|
|
2
|
-
import FormConfigDragDisplay from '../FormConfigDragDisplay.js';
|
|
3
|
-
import CloseButton from './CloseButton.js';
|
|
2
|
+
import FormConfigDragDisplay from '../FormConfigDragDisplay.vue.js';
|
|
3
|
+
import CloseButton from './CloseButton.vue.js';
|
|
4
4
|
import { InjectionActiveFieldItem } from '../../constants/index.js';
|
|
5
5
|
import { bindHover } from '../../utils/index.js';
|
|
6
6
|
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
package/es/components/form-config/src/components/renderer/{DefaultNode.js → DefaultNode.vue.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, openBlock, createBlock, unref, mergeProps, withModifiers, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { NButton, NEllipsis } from 'naive-ui';
|
|
3
|
-
import CloseButton from './CloseButton.js';
|
|
3
|
+
import CloseButton from './CloseButton.vue.js';
|
|
4
4
|
import { InjectionActiveFieldItem, WidgetTextMap } from '../../constants/index.js';
|
|
5
5
|
import { bindHover } from '../../utils/index.js';
|
|
6
6
|
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as CloseButton } from './CloseButton.js';
|
|
2
|
-
export { default as ComplexNode } from './ComplexNode.js';
|
|
3
|
-
export { default as DefaultNode } from './DefaultNode.js';
|
|
1
|
+
export { default as CloseButton } from './CloseButton.vue.js';
|
|
2
|
+
export { default as ComplexNode } from './ComplexNode.vue.js';
|
|
3
|
+
export { default as DefaultNode } from './DefaultNode.vue.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isString, isArray, isFunction } from 'lodash-es';
|
|
2
2
|
import { computed } from 'vue';
|
|
3
|
-
import ComplexNode from '../components/renderer/ComplexNode.js';
|
|
4
|
-
import DefaultNode from '../components/renderer/DefaultNode.js';
|
|
3
|
+
import ComplexNode from '../components/renderer/ComplexNode.vue.js';
|
|
4
|
+
import DefaultNode from '../components/renderer/DefaultNode.vue.js';
|
|
5
5
|
|
|
6
6
|
function usePresetRenderer() {
|
|
7
7
|
const renderDefaultNode = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index.js';
|
|
3
|
-
import script from './src/FormRenderWrapper.js';
|
|
3
|
+
import script from './src/FormRenderWrapper.vue.js';
|
|
4
4
|
export { useFieldListAdaptor } from './src/hooks/useFieldListAdaptor.js';
|
|
5
5
|
export { useFormRequest } from './src/hooks/useFormRequest.js';
|
|
6
6
|
export { useCommonLog } from './src/hooks/useCommonLog.js';
|
|
@@ -16,7 +16,7 @@ export { useAnchor } from './src/hooks/useAnchor.js';
|
|
|
16
16
|
export { useAutographOptions } from './src/hooks/useAutographOptions.js';
|
|
17
17
|
export { useFormContext } from './src/hooks/useFormContext.js';
|
|
18
18
|
export { useCommonInjection, useSelectOptionProps } from './src/hooks/useCommonInjection.js';
|
|
19
|
-
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties,
|
|
19
|
+
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties, optionMatcherWithKeyword, parseNumberFromMaybeString, presetRequestHandler, splitExtendKey, validateMessageParser } from './src/utils/index.js';
|
|
20
20
|
export * from '@formily/core';
|
|
21
21
|
export { businessDateParser, isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './src/utils/business.js';
|
|
22
22
|
export { findNextWidget, queryDecorator, queryInput } from './src/utils/dom.js';
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createBlock, nextTick } from 'vue';
|
|
2
|
-
import FormRender from './FormRender.js';
|
|
2
|
+
import FormRender from './FormRender.vue.js';
|
|
3
3
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
4
4
|
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useVModel } from '@vueuse/core';
|
|
2
3
|
import '../../../index.js';
|
|
3
4
|
import '../../utils/index.js';
|
|
4
5
|
import { connect, mapProps } from '@formily/vue';
|
|
@@ -39,10 +40,7 @@ const script = defineComponent({
|
|
|
39
40
|
setup(props, {
|
|
40
41
|
emit
|
|
41
42
|
}) {
|
|
42
|
-
const valueRef =
|
|
43
|
-
get: () => props.value,
|
|
44
|
-
set: (v) => emit("update:value", v)
|
|
45
|
-
});
|
|
43
|
+
const valueRef = useVModel(props, "value", emit);
|
|
46
44
|
const {
|
|
47
45
|
labelKey,
|
|
48
46
|
valueKey,
|
|
@@ -11,6 +11,7 @@ import * as labelSelect from './labelSelect.js';
|
|
|
11
11
|
import * as levelSearchCascader from './levelSearchCascader.js';
|
|
12
12
|
import * as index$1 from './lineBar/index.js';
|
|
13
13
|
import * as radio from './radio.js';
|
|
14
|
+
import * as recommendSelect from './recommendSelect.js';
|
|
14
15
|
import * as remoteSearch from './remoteSearch.js';
|
|
15
16
|
import * as search from './search.js';
|
|
16
17
|
import * as searchCascade from './searchCascade.js';
|
|
@@ -35,6 +36,7 @@ const modules = Object.assign({
|
|
|
35
36
|
"./levelSearchCascader.tsx": levelSearchCascader,
|
|
36
37
|
"./lineBar/index.ts": index$1,
|
|
37
38
|
"./radio.tsx": radio,
|
|
39
|
+
"./recommendSelect.tsx": recommendSelect,
|
|
38
40
|
"./remoteSearch.tsx": remoteSearch,
|
|
39
41
|
"./search.tsx": search,
|
|
40
42
|
"./searchCascade.tsx": searchCascade,
|
|
@@ -8,7 +8,7 @@ import { formRenderLog, mergeDeepProperties } from '../../../utils/index.js';
|
|
|
8
8
|
import { connect, mapProps } from '@formily/vue';
|
|
9
9
|
import { useDebounceFn, isObject } from '@vueuse/core';
|
|
10
10
|
import { NButton, NIcon } from 'naive-ui';
|
|
11
|
-
import FormRender from '../../../FormRender.js';
|
|
11
|
+
import FormRender from '../../../FormRender.vue.js';
|
|
12
12
|
import { assignUpdateValue } from '../../../utils/schema.js';
|
|
13
13
|
|
|
14
14
|
const script = defineComponent({
|
|
@@ -7,7 +7,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
|
7
7
|
import { formRenderLog } from '../../utils/index.js';
|
|
8
8
|
import { connect, mapProps } from '@formily/vue';
|
|
9
9
|
import SearchCascader from '../../../../search-cascader/index.js';
|
|
10
|
-
import script$1 from '../../../../../shared/components/no-data/NoData.js';
|
|
10
|
+
import script$1 from '../../../../../shared/components/no-data/NoData.vue.js';
|
|
11
11
|
import { visitedDecorator, assignUpdateValue } from '../../utils/schema.js';
|
|
12
12
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
13
13
|
import { useFormRequest } from '../../hooks/useFormRequest.js';
|
|
File without changes
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { RecommendIds } from '../../../../../../es/components/form-render';
|
|
4
|
+
export declare const RECOMMEND_SELECT: import("vue").DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
commonList: {
|
|
9
|
+
type: PropType<AnyObject[]>;
|
|
10
|
+
};
|
|
11
|
+
recentList: {
|
|
12
|
+
type: PropType<AnyObject[]>;
|
|
13
|
+
};
|
|
14
|
+
options: {
|
|
15
|
+
type: PropType<AnyObject[]>;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
autograph: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
lazyRequest: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
requestCache: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
wordbook: {
|
|
30
|
+
type: PropType<Partial<{
|
|
31
|
+
level_num: number;
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
render_key: string[];
|
|
35
|
+
search_key: string[];
|
|
36
|
+
primary_key: string;
|
|
37
|
+
type: string;
|
|
38
|
+
value_key: string;
|
|
39
|
+
level_key: string;
|
|
40
|
+
link_key: string;
|
|
41
|
+
link_key_split: string;
|
|
42
|
+
show_key: string[];
|
|
43
|
+
conObj: AnyObject[];
|
|
44
|
+
conObjFirstLevel: AnyObject[];
|
|
45
|
+
}>>;
|
|
46
|
+
};
|
|
47
|
+
getRecommendInfo: {
|
|
48
|
+
type: PropType<() => RecommendIds>;
|
|
49
|
+
};
|
|
50
|
+
recommendNum: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
recommendCache: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
recommendDeletable: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend" | "deleteRecommend")[], "update:value" | "postRecommend" | "deleteRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
|
+
value: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
};
|
|
66
|
+
commonList: {
|
|
67
|
+
type: PropType<AnyObject[]>;
|
|
68
|
+
};
|
|
69
|
+
recentList: {
|
|
70
|
+
type: PropType<AnyObject[]>;
|
|
71
|
+
};
|
|
72
|
+
options: {
|
|
73
|
+
type: PropType<AnyObject[]>;
|
|
74
|
+
default: () => never[];
|
|
75
|
+
};
|
|
76
|
+
autograph: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
};
|
|
79
|
+
lazyRequest: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
requestCache: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
wordbook: {
|
|
88
|
+
type: PropType<Partial<{
|
|
89
|
+
level_num: number;
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
render_key: string[];
|
|
93
|
+
search_key: string[];
|
|
94
|
+
primary_key: string;
|
|
95
|
+
type: string;
|
|
96
|
+
value_key: string;
|
|
97
|
+
level_key: string;
|
|
98
|
+
link_key: string;
|
|
99
|
+
link_key_split: string;
|
|
100
|
+
show_key: string[];
|
|
101
|
+
conObj: AnyObject[];
|
|
102
|
+
conObjFirstLevel: AnyObject[];
|
|
103
|
+
}>>;
|
|
104
|
+
};
|
|
105
|
+
getRecommendInfo: {
|
|
106
|
+
type: PropType<() => RecommendIds>;
|
|
107
|
+
};
|
|
108
|
+
recommendNum: {
|
|
109
|
+
type: NumberConstructor;
|
|
110
|
+
default: number;
|
|
111
|
+
};
|
|
112
|
+
recommendCache: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: boolean;
|
|
115
|
+
};
|
|
116
|
+
recommendDeletable: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
}>> & {
|
|
121
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
122
|
+
onPostRecommend?: ((...args: any[]) => any) | undefined;
|
|
123
|
+
onDeleteRecommend?: ((...args: any[]) => any) | undefined;
|
|
124
|
+
}, {
|
|
125
|
+
options: AnyObject[];
|
|
126
|
+
lazyRequest: boolean;
|
|
127
|
+
requestCache: boolean;
|
|
128
|
+
recommendDeletable: boolean;
|
|
129
|
+
recommendNum: number;
|
|
130
|
+
recommendCache: boolean;
|
|
131
|
+
}>;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { defineComponent, inject, createVNode, ref, computed } from 'vue';
|
|
2
|
+
import { connect, mapProps } from '@formily/vue';
|
|
3
|
+
import { useVModel } from '@vueuse/core';
|
|
4
|
+
import { isFunction, omit } from 'lodash-es';
|
|
5
|
+
import '../../../index.js';
|
|
6
|
+
import { InjectionAsyncQueue } from '../../constants/index.js';
|
|
7
|
+
import RecommendSearch from '../../../../recommend-search/index.js';
|
|
8
|
+
import { useFormField } from '../../hooks/useFormField.js';
|
|
9
|
+
import { useAutographOptions } from '../../hooks/useAutographOptions.js';
|
|
10
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
11
|
+
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
12
|
+
import { useFormRequest } from '../../hooks/useFormRequest.js';
|
|
13
|
+
|
|
14
|
+
function createPropRef(props, key) {
|
|
15
|
+
const _list = ref();
|
|
16
|
+
return computed({
|
|
17
|
+
get() {
|
|
18
|
+
if (_list.value)
|
|
19
|
+
return _list.value;
|
|
20
|
+
return props[key];
|
|
21
|
+
},
|
|
22
|
+
set(value) {
|
|
23
|
+
_list.value = value;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const script = defineComponent({
|
|
28
|
+
name: "FormRecommendSearch",
|
|
29
|
+
props: {
|
|
30
|
+
value: {
|
|
31
|
+
type: String
|
|
32
|
+
},
|
|
33
|
+
commonList: {
|
|
34
|
+
type: Array
|
|
35
|
+
},
|
|
36
|
+
recentList: {
|
|
37
|
+
type: Array
|
|
38
|
+
},
|
|
39
|
+
options: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => []
|
|
42
|
+
},
|
|
43
|
+
autograph: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
lazyRequest: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
requestCache: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
wordbook: {
|
|
55
|
+
type: Object
|
|
56
|
+
},
|
|
57
|
+
getRecommendInfo: {
|
|
58
|
+
type: Function
|
|
59
|
+
},
|
|
60
|
+
recommendNum: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 5
|
|
63
|
+
},
|
|
64
|
+
recommendCache: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
recommendDeletable: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
emits: ["update:value", "postRecommend", "deleteRecommend"],
|
|
74
|
+
setup(props, {
|
|
75
|
+
emit
|
|
76
|
+
}) {
|
|
77
|
+
const valueRef = useVModel(props, "value", emit);
|
|
78
|
+
const {
|
|
79
|
+
fieldKey
|
|
80
|
+
} = useFormField();
|
|
81
|
+
const {
|
|
82
|
+
labelKey,
|
|
83
|
+
valueKey,
|
|
84
|
+
options,
|
|
85
|
+
fetchData: fetchOptions
|
|
86
|
+
} = useAutographOptions(props, valueRef);
|
|
87
|
+
const commonListRef = createPropRef(props, "commonList");
|
|
88
|
+
const recentListRef = createPropRef(props, "recentList");
|
|
89
|
+
const asyncQueue = inject(InjectionAsyncQueue);
|
|
90
|
+
const {
|
|
91
|
+
getRecommendRequestInfo,
|
|
92
|
+
getHttpInstance
|
|
93
|
+
} = useFormRequest();
|
|
94
|
+
function getRecommendConfig(type) {
|
|
95
|
+
const {
|
|
96
|
+
url,
|
|
97
|
+
getRecommendIds
|
|
98
|
+
} = getRecommendRequestInfo();
|
|
99
|
+
const globInfo = isFunction(getRecommendIds) ? getRecommendIds() : {};
|
|
100
|
+
const widgetInfo = isFunction(props.getRecommendInfo) ? props.getRecommendInfo() : {};
|
|
101
|
+
return {
|
|
102
|
+
url: url[type],
|
|
103
|
+
info: Object.assign({}, globInfo, widgetInfo)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
async function getRecommend() {
|
|
107
|
+
if (commonListRef.value && recentListRef.value && props.recommendCache)
|
|
108
|
+
return;
|
|
109
|
+
const list = await asyncQueue.addAsync(createParams(fieldKey.value, props.recommendCache));
|
|
110
|
+
const {
|
|
111
|
+
commonly,
|
|
112
|
+
recently
|
|
113
|
+
} = classifyList(list);
|
|
114
|
+
commonListRef.value = commonly;
|
|
115
|
+
recentListRef.value = recently;
|
|
116
|
+
function classifyList(list2) {
|
|
117
|
+
return list2.reduce((res, item) => {
|
|
118
|
+
if (item.type === "commonly") {
|
|
119
|
+
res.commonly.push(omit(item, ["type"]));
|
|
120
|
+
} else if (item.type === "recently") {
|
|
121
|
+
res.recently.push(omit(item, ["type"]));
|
|
122
|
+
}
|
|
123
|
+
return res;
|
|
124
|
+
}, {
|
|
125
|
+
commonly: [],
|
|
126
|
+
recently: []
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function createParams(key2, cache) {
|
|
130
|
+
const {
|
|
131
|
+
url,
|
|
132
|
+
info
|
|
133
|
+
} = getRecommendConfig("get");
|
|
134
|
+
return {
|
|
135
|
+
url,
|
|
136
|
+
method: "get",
|
|
137
|
+
key: key2,
|
|
138
|
+
cache,
|
|
139
|
+
params: {
|
|
140
|
+
...info,
|
|
141
|
+
recNum: props.recommendNum,
|
|
142
|
+
keyword: ""
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async function postRecommend({
|
|
148
|
+
option
|
|
149
|
+
}) {
|
|
150
|
+
const http = getHttpInstance();
|
|
151
|
+
if (!http)
|
|
152
|
+
return;
|
|
153
|
+
const {
|
|
154
|
+
url,
|
|
155
|
+
info
|
|
156
|
+
} = getRecommendConfig("post");
|
|
157
|
+
emit("postRecommend", await http.post(url, {
|
|
158
|
+
...info,
|
|
159
|
+
keyword: "",
|
|
160
|
+
itemId: valueKey.value,
|
|
161
|
+
itemObj: JSON.stringify(option)
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
async function deleteRecommend(recType) {
|
|
165
|
+
const http = getHttpInstance();
|
|
166
|
+
if (!http)
|
|
167
|
+
return;
|
|
168
|
+
const {
|
|
169
|
+
url,
|
|
170
|
+
info
|
|
171
|
+
} = getRecommendConfig("delete");
|
|
172
|
+
if (recType === "COMMONLY")
|
|
173
|
+
commonListRef.value = [];
|
|
174
|
+
else if (recType === "RECENTLY")
|
|
175
|
+
recentListRef.value = [];
|
|
176
|
+
emit("deleteRecommend", await http.delete(url, {
|
|
177
|
+
...info,
|
|
178
|
+
keyword: "",
|
|
179
|
+
recType
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
async function fetchData(content = "") {
|
|
183
|
+
fetchOptions(content);
|
|
184
|
+
getRecommend();
|
|
185
|
+
}
|
|
186
|
+
const {
|
|
187
|
+
injectValueBindKey
|
|
188
|
+
} = useCommonInjection();
|
|
189
|
+
const key = injectValueBindKey(valueRef);
|
|
190
|
+
return () => {
|
|
191
|
+
return createVNode(RecommendSearch, {
|
|
192
|
+
"mode": "select",
|
|
193
|
+
"value": valueRef.value,
|
|
194
|
+
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
195
|
+
"label-key": labelKey.value,
|
|
196
|
+
"value-key": valueKey.value,
|
|
197
|
+
"key": key.value,
|
|
198
|
+
"options": options.value,
|
|
199
|
+
"common-list": commonListRef.value,
|
|
200
|
+
"recent-list": recentListRef.value,
|
|
201
|
+
"recommend-deletable": props.recommendDeletable,
|
|
202
|
+
"onSearch": fetchData,
|
|
203
|
+
"onChoose": postRecommend,
|
|
204
|
+
"onDelete": deleteRecommend
|
|
205
|
+
}, null);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
const RECOMMEND_SELECT = connect(script, mapProps({
|
|
210
|
+
dataSource: "options"
|
|
211
|
+
}, assignUpdateValue, assignClearBindVisited));
|
|
212
|
+
|
|
213
|
+
export { RECOMMEND_SELECT };
|
|
@@ -5,7 +5,7 @@ import { useCommonInjection, useSelectOptionProps } from '../../hooks/useCommonI
|
|
|
5
5
|
import { InjectionAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
6
6
|
import '../../../../../shared/utils/index.js';
|
|
7
7
|
import '../../../index.js';
|
|
8
|
-
import { createUrlConfigParams, formRenderLog,
|
|
8
|
+
import { createUrlConfigParams, formRenderLog, optionMatcherWithKeyword } from '../../utils/index.js';
|
|
9
9
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
10
10
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
11
11
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -77,8 +77,6 @@ const script = defineComponent({
|
|
|
77
77
|
if (!props.urlConfig) {
|
|
78
78
|
return remoteOptions.value = null;
|
|
79
79
|
}
|
|
80
|
-
if (remoteOptions.value && props.requestCache)
|
|
81
|
-
return;
|
|
82
80
|
try {
|
|
83
81
|
remoteOptions.value = await asyncQueue.addAsync(await createUrlConfigParams({
|
|
84
82
|
config: props.urlConfig,
|
|
@@ -91,10 +89,10 @@ const script = defineComponent({
|
|
|
91
89
|
}, 300);
|
|
92
90
|
const parsedOptions = computed(() => {
|
|
93
91
|
if (remoteOptions.value)
|
|
94
|
-
return
|
|
92
|
+
return optionMatcherWithKeyword(remoteOptions.value, lastSearch.value, labelKey.value);
|
|
95
93
|
if (!Array.isArray(props.options))
|
|
96
94
|
return [];
|
|
97
|
-
return
|
|
95
|
+
return optionMatcherWithKeyword(props.options, lastSearch.value, labelKey.value);
|
|
98
96
|
});
|
|
99
97
|
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
100
98
|
changeContextCollector.setContext(fieldKey.value, (v) => {
|
|
@@ -116,7 +116,7 @@ function useAsyncQueue(requestInstance) {
|
|
|
116
116
|
return new AsyncQueue({
|
|
117
117
|
name: "FormRenderAsyncQueue",
|
|
118
118
|
parallelism,
|
|
119
|
-
async processor({ key, method = "post", params, url }, cb, removeCache) {
|
|
119
|
+
async processor({ key, method = "post", cache, params, url }, cb, removeCache) {
|
|
120
120
|
var _a, _b;
|
|
121
121
|
const http = (_a = unref(requestInstance)) != null ? _a : getHttpInstance();
|
|
122
122
|
if (!http) {
|
|
@@ -134,6 +134,7 @@ function useAsyncQueue(requestInstance) {
|
|
|
134
134
|
res = option.afterRequest(key, res);
|
|
135
135
|
}
|
|
136
136
|
cb(void 0, Array.isArray(res) ? res : []);
|
|
137
|
+
!cache && removeCache();
|
|
137
138
|
} catch (e) {
|
|
138
139
|
cb(new Error(`Request error => ${e}`));
|
|
139
140
|
removeCache();
|
|
@@ -3,7 +3,7 @@ import { isString, isEqual } from 'lodash-es';
|
|
|
3
3
|
import { getCurrentInstance, inject, computed, ref, watch } from 'vue';
|
|
4
4
|
import '../../index.js';
|
|
5
5
|
import { InjectionAsyncQueue } from '../constants/index.js';
|
|
6
|
-
import { formRenderLog,
|
|
6
|
+
import { formRenderLog, optionMatcherWithKeyword } from '../utils/index.js';
|
|
7
7
|
import { useFormField } from './useFormField.js';
|
|
8
8
|
import { useFormRequest } from './useFormRequest.js';
|
|
9
9
|
|
|
@@ -21,22 +21,20 @@ function useAutographOptions(props, valueRef) {
|
|
|
21
21
|
});
|
|
22
22
|
const remoteOptions = ref(null);
|
|
23
23
|
const lastSearch = ref("");
|
|
24
|
-
const {
|
|
24
|
+
const { fieldKey } = useFormField();
|
|
25
25
|
const { getSearchRequestInfo } = useFormRequest();
|
|
26
26
|
const fetchData = useDebounceFn(async function(content) {
|
|
27
27
|
if (!props.autograph || !props.wordbook)
|
|
28
28
|
return;
|
|
29
29
|
lastSearch.value = content || "";
|
|
30
|
-
if (remoteOptions.value && props.requestCache)
|
|
31
|
-
return;
|
|
32
30
|
try {
|
|
33
31
|
remoteOptions.value = await asyncQueue.addAsync(
|
|
34
|
-
createParams(props.wordbook, props.autograph,
|
|
32
|
+
createParams(props.wordbook, props.autograph, fieldKey.value)
|
|
35
33
|
);
|
|
36
34
|
} catch (e) {
|
|
37
35
|
isString(e) && formRenderLog(e);
|
|
38
36
|
}
|
|
39
|
-
function createParams(wordbook, autograph,
|
|
37
|
+
function createParams(wordbook, autograph, key) {
|
|
40
38
|
const params = {
|
|
41
39
|
autograph,
|
|
42
40
|
wordbookId: wordbook.id,
|
|
@@ -50,7 +48,7 @@ function useAutographOptions(props, valueRef) {
|
|
|
50
48
|
}, 300);
|
|
51
49
|
const options = computed(() => {
|
|
52
50
|
var _a;
|
|
53
|
-
return remoteOptions.value ?
|
|
51
|
+
return remoteOptions.value ? optionMatcherWithKeyword(remoteOptions.value, lastSearch.value, labelKey.value) : (_a = props.options) != null ? _a : [];
|
|
54
52
|
});
|
|
55
53
|
watch(
|
|
56
54
|
() => props.wordbook,
|