cnhis-design-vue 3.1.41-beta.1 → 3.1.41-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 +87 -87
- package/es/components/button-print/src/utils/print.d.ts +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/form-config/index.d.ts +13 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +13 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +7 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +4 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -1
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +2 -0
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -6
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormField.d.ts +1 -0
- package/es/components/form-render/src/hooks/useFormField.js +1 -1
- package/es/components/form-render/src/hooks/useFormGraph.d.ts +6 -0
- package/es/components/form-render/src/hooks/useFormGraph.js +1 -0
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/form-render/src/utils/dom.d.ts +2 -1
- package/es/components/form-render/src/utils/dom.js +1 -1
- package/es/components/iho-table/index.d.ts +5 -5
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +5 -5
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/iho-table/src/plugins/{filterPlugin → filterRenderPlugin}/filter.vue.d.ts +15 -74
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +6 -6
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/recommend-search/index.d.ts +10 -10
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +10 -10
- 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 +1 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -5
- package/es/components/scale-view/src/ScaleView.vue.js +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 +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/utils/judge-types.js +1 -1
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +5 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -1
- 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 +896 -7580
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +42 -3315
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -1
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +461 -2777
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -42
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +18 -5
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/components/search-filter/index.vue.d.ts +456 -0
- package/es/components/table-filter/src/components/search-filter/index.vue.js +1 -0
- package/es/components/table-filter/src/components/set-classification/index.vue.d.ts +843 -0
- package/es/components/table-filter/src/components/set-classification/index.vue.js +1 -0
- package/es/components/table-filter/src/components/table-modal/index.vue.js +1 -0
- package/es/components/table-filter/src/hooks/export.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useMixins.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +48 -1188
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +4 -14
- package/es/components/table-filter/style/index.css +1 -1
- package/es/env.d.ts +24 -24
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/callback/src/components/form.d.ts +0 -0
- package/es/components/callback/src/components/page.d.ts +0 -0
- package/es/components/callback/src/components/table.d.ts +0 -0
- package/es/components/callback/src/types/index.d.ts +0 -0
- package/es/components/callback/src/types/index.js +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +0 -7
- package/es/components/iho-table/src/plugins/filterPlugin/types.js +0 -1
- package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +0 -71
- package/es/components/table-filter/src/classification/search-class-name.vue.js +0 -1
- package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +0 -1436
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +0 -1
- package/es/components/table-filter/src/components/age-com/index.vue.d.ts +0 -119
- package/es/components/table-filter/src/components/age-com/index.vue.js +0 -1
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +0 -199
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +0 -1
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +0 -2
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +0 -1
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +0 -90
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +0 -1
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +0 -113
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +0 -1
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +0 -266
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +0 -1
- package/es/components/table-filter/src/components/range-age/index.vue.d.ts +0 -248
- package/es/components/table-filter/src/components/range-age/index.vue.js +0 -1
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +0 -789
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +0 -1
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +0 -18
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +0 -1
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +0 -1244
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +0 -1
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +0 -1651
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +0 -1
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +0 -1
- package/es/components/table-filter/src/const/dataOptions.d.ts +0 -36
- package/es/components/table-filter/src/const/dataOptions.js +0 -1
- package/es/components/table-filter/src/directive/preventReClick.d.ts +0 -4
- package/es/components/table-filter/src/directive/preventReClick.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
- /package/es/components/table-filter/src/components/table-modal/{TableModal.vue.d.ts → index.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
@@ -42,7 +42,7 @@ export declare class Print {
|
|
|
42
42
|
_queryPrintFile(formatId: string, params?: string): Promise<any>;
|
|
43
43
|
_browserPrint(result: AnyObject, mode: string): Promise<string | void>;
|
|
44
44
|
preview({ templateId, formatId, params, btnprint }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
|
|
45
|
-
printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
|
|
45
|
+
printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode, isDownloadFile }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
|
|
46
46
|
private _downloadPDF;
|
|
47
47
|
/**
|
|
48
48
|
* 下载pdf
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=t.create({withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,p=`${c}/fdp-api/print/assembly/printIReport`,u=`${c}/bi-api/reprot/print/open/client/getRemote`,m=`${c}/printService/file`;let w=null;class f{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],w)return w;w=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{const{exec:i}=JSON.parse(t.data);"config"===i&&(this.downloadPath=(null==(e=JSON.parse(t.data).res)?void 0:e.downloadpath)||""),console.log(t),n(JSON.parse(t.data).res)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):h({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else this.isRemote&&(d.print={print:"1",type:"
|
|
1
|
+
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=t.create({withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,p=`${c}/fdp-api/print/assembly/printIReport`,u=`${c}/bi-api/reprot/print/open/client/getRemote`,m=`${c}/printService/file`;let w=null;class f{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],w)return w;w=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{const{exec:i}=JSON.parse(t.data);"config"===i&&(this.downloadPath=(null==(e=JSON.parse(t.data).res)?void 0:e.downloadpath)||""),console.log(t),n(JSON.parse(t.data).res)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):h({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else this.isRemote&&(d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${l(new Date,"yyyyMMddHHmmss")}`});return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:u})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=c+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:p,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-1],o=await s(`${m}/${a}`),l=r(null,e,o);if("preview"===e)return l}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n});if(!h)return!1;const c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o});if(!u)return!1;const m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),d&&d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{f as Print};
|
|
@@ -43,6 +43,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
43
43
|
fold?: boolean | undefined;
|
|
44
44
|
required?: boolean | undefined;
|
|
45
45
|
requiredDisabled?: boolean | undefined;
|
|
46
|
+
editableDisabled?: boolean | undefined;
|
|
46
47
|
editable?: boolean | undefined;
|
|
47
48
|
notes?: string | undefined;
|
|
48
49
|
desc?: string | undefined;
|
|
@@ -64,6 +65,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
64
65
|
fold?: boolean | undefined;
|
|
65
66
|
required?: boolean | undefined;
|
|
66
67
|
requiredDisabled?: boolean | undefined;
|
|
68
|
+
editableDisabled?: boolean | undefined;
|
|
67
69
|
editable?: boolean | undefined;
|
|
68
70
|
notes?: string | undefined;
|
|
69
71
|
desc?: string | undefined;
|
|
@@ -452,6 +454,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
452
454
|
}[]>;
|
|
453
455
|
onScroll: (scrollEvent: Event) => void;
|
|
454
456
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
457
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
458
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
459
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
455
460
|
formModel: import("@formily/core").Form<{
|
|
456
461
|
[x: string]: any;
|
|
457
462
|
}>;
|
|
@@ -576,7 +581,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
576
581
|
clearSpan: (uuid: string) => void;
|
|
577
582
|
exposeEvent: {
|
|
578
583
|
validate(path?: string): Promise<void>;
|
|
579
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
584
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
580
585
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
581
586
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
582
587
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1112,6 +1117,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1112
1117
|
extendKey?: string | undefined;
|
|
1113
1118
|
is_not_fold?: string | undefined;
|
|
1114
1119
|
remark?: string | undefined;
|
|
1120
|
+
free_entry?: import("..").FormCommonState | undefined;
|
|
1115
1121
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1116
1122
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
1117
1123
|
lazyRequest?: boolean | undefined;
|
|
@@ -2697,6 +2703,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2697
2703
|
fold?: boolean | undefined;
|
|
2698
2704
|
required?: boolean | undefined;
|
|
2699
2705
|
requiredDisabled?: boolean | undefined;
|
|
2706
|
+
editableDisabled?: boolean | undefined;
|
|
2700
2707
|
editable?: boolean | undefined;
|
|
2701
2708
|
notes?: string | undefined;
|
|
2702
2709
|
desc?: string | undefined;
|
|
@@ -2715,6 +2722,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2715
2722
|
fold?: boolean | undefined;
|
|
2716
2723
|
required?: boolean | undefined;
|
|
2717
2724
|
requiredDisabled?: boolean | undefined;
|
|
2725
|
+
editableDisabled?: boolean | undefined;
|
|
2718
2726
|
editable?: boolean | undefined;
|
|
2719
2727
|
notes?: string | undefined;
|
|
2720
2728
|
desc?: string | undefined;
|
|
@@ -3016,6 +3024,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3016
3024
|
}[]>;
|
|
3017
3025
|
onScroll: (scrollEvent: Event) => void;
|
|
3018
3026
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
3027
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
3028
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3029
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3019
3030
|
formModel: import("@formily/core").Form<{
|
|
3020
3031
|
[x: string]: any;
|
|
3021
3032
|
}>;
|
|
@@ -3140,7 +3151,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3140
3151
|
clearSpan: (uuid: string) => void;
|
|
3141
3152
|
exposeEvent: {
|
|
3142
3153
|
validate(path?: string): Promise<void>;
|
|
3143
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
3154
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
3144
3155
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
3145
3156
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
3146
3157
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -44,6 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
fold?: boolean | undefined;
|
|
45
45
|
required?: boolean | undefined;
|
|
46
46
|
requiredDisabled?: boolean | undefined;
|
|
47
|
+
editableDisabled?: boolean | undefined;
|
|
47
48
|
editable?: boolean | undefined;
|
|
48
49
|
notes?: string | undefined;
|
|
49
50
|
desc?: string | undefined;
|
|
@@ -65,6 +66,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
65
66
|
fold?: boolean | undefined;
|
|
66
67
|
required?: boolean | undefined;
|
|
67
68
|
requiredDisabled?: boolean | undefined;
|
|
69
|
+
editableDisabled?: boolean | undefined;
|
|
68
70
|
editable?: boolean | undefined;
|
|
69
71
|
notes?: string | undefined;
|
|
70
72
|
desc?: string | undefined;
|
|
@@ -453,6 +455,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
453
455
|
}[]>;
|
|
454
456
|
onScroll: (scrollEvent: Event) => void;
|
|
455
457
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
458
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
459
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
460
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
456
461
|
formModel: import("@formily/core").Form<{
|
|
457
462
|
[x: string]: any;
|
|
458
463
|
}>;
|
|
@@ -577,7 +582,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
577
582
|
clearSpan: (uuid: string) => void;
|
|
578
583
|
exposeEvent: {
|
|
579
584
|
validate(path?: string): Promise<void>;
|
|
580
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
585
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
581
586
|
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
582
587
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
583
588
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1113,6 +1118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1113
1118
|
extendKey?: string | undefined;
|
|
1114
1119
|
is_not_fold?: string | undefined;
|
|
1115
1120
|
remark?: string | undefined;
|
|
1121
|
+
free_entry?: import("../..").FormCommonState | undefined;
|
|
1116
1122
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1117
1123
|
content?: string | import("../..").FormRenderer | Record<string, import("../..").FormRenderer> | undefined;
|
|
1118
1124
|
lazyRequest?: boolean | undefined;
|
|
@@ -2698,6 +2704,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2698
2704
|
fold?: boolean | undefined;
|
|
2699
2705
|
required?: boolean | undefined;
|
|
2700
2706
|
requiredDisabled?: boolean | undefined;
|
|
2707
|
+
editableDisabled?: boolean | undefined;
|
|
2701
2708
|
editable?: boolean | undefined;
|
|
2702
2709
|
notes?: string | undefined;
|
|
2703
2710
|
desc?: string | undefined;
|
|
@@ -2716,6 +2723,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2716
2723
|
fold?: boolean | undefined;
|
|
2717
2724
|
required?: boolean | undefined;
|
|
2718
2725
|
requiredDisabled?: boolean | undefined;
|
|
2726
|
+
editableDisabled?: boolean | undefined;
|
|
2719
2727
|
editable?: boolean | undefined;
|
|
2720
2728
|
notes?: string | undefined;
|
|
2721
2729
|
desc?: string | undefined;
|
|
@@ -3017,6 +3025,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3017
3025
|
}[]>;
|
|
3018
3026
|
onScroll: (scrollEvent: Event) => void;
|
|
3019
3027
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
3028
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
3029
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3030
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
3020
3031
|
formModel: import("@formily/core").Form<{
|
|
3021
3032
|
[x: string]: any;
|
|
3022
3033
|
}>;
|
|
@@ -3141,7 +3152,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3141
3152
|
clearSpan: (uuid: string) => void;
|
|
3142
3153
|
exposeEvent: {
|
|
3143
3154
|
validate(path?: string): Promise<void>;
|
|
3144
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
3155
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
3145
3156
|
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
3146
3157
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
3147
3158
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -302,6 +302,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
302
302
|
}[]>;
|
|
303
303
|
onScroll: (scrollEvent: Event) => void;
|
|
304
304
|
triggerAutoHidden: (field: import("../../../../../es/components/form-render").GeneralField) => Promise<void>;
|
|
305
|
+
observeFormGraph: Record<string, import("../../../../../es/components/form-render").GeneralField>;
|
|
306
|
+
setGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
307
|
+
removeGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
305
308
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
306
309
|
[x: string]: any;
|
|
307
310
|
}>;
|
|
@@ -426,7 +429,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
426
429
|
clearSpan: (uuid: string) => void;
|
|
427
430
|
exposeEvent: {
|
|
428
431
|
validate(path?: string): Promise<void>;
|
|
429
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
432
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
430
433
|
setFormValues(values: import("../../../../shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
431
434
|
setFieldState(path: string, handler: (field: Partial<Pick<import("../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
432
435
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as t,createBlock as r,unref as o,mergeProps as
|
|
1
|
+
import{defineComponent as e,openBlock as t,createBlock as r,unref as o,mergeProps as i,withCtx as m,createElementVNode as a,normalizeStyle as s,resolveDynamicComponent as l}from"vue";import n from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{usePresetRenderer as u}from"../hooks/usePresetRenderer.js";import{useSortableConfig as d}from"../hooks/useSortalbeConfig.js";import"lodash-es";import{layoutWidthEnum2Column as p}from"../utils/index.js";import f from"../../../../_virtual/plugin-vue_export-helper.js";const g=["data-type","data-required"];var y=f(e({__name:"FormConfigDragDisplay",props:{fieldItem:{type:Object},textFormatter:{type:Function,required:!0}},setup(e){function f(e){return{"--item-column":e?p(e.layoutWidthEnum):24}}const{getRenderer:y}=u(),{getCommonConfig:c}=d();return(u,d)=>(t(),r(o(n),i(o(c)(e.fieldItem),{style:f(e.fieldItem)}),{item:m((({element:i})=>[a("div",{class:"form-config__displayContentItem","data-type":i.type,"data-required":i.required,style:s(f(i))},[(t(),r(l(o(y)(i)),{"field-item":i,textFormatter:e.textFormatter},null,8,["field-item","textFormatter"]))],12,g)])),_:1},16,["style"]))}}),[["__file","FormConfigDragDisplay.vue"]]);export{y as default};
|
|
@@ -120,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
120
|
extendKey?: string | undefined;
|
|
121
121
|
is_not_fold?: string | undefined;
|
|
122
122
|
remark?: string | undefined;
|
|
123
|
+
free_entry?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
123
124
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
124
125
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
125
126
|
lazyRequest?: boolean | undefined;
|
|
@@ -1705,6 +1706,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1705
1706
|
fold?: boolean | undefined;
|
|
1706
1707
|
required?: boolean | undefined;
|
|
1707
1708
|
requiredDisabled?: boolean | undefined;
|
|
1709
|
+
editableDisabled?: boolean | undefined;
|
|
1708
1710
|
editable?: boolean | undefined;
|
|
1709
1711
|
notes?: string | undefined;
|
|
1710
1712
|
desc?: string | undefined;
|
|
@@ -1723,6 +1725,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1723
1725
|
fold?: boolean | undefined;
|
|
1724
1726
|
required?: boolean | undefined;
|
|
1725
1727
|
requiredDisabled?: boolean | undefined;
|
|
1728
|
+
editableDisabled?: boolean | undefined;
|
|
1726
1729
|
editable?: boolean | undefined;
|
|
1727
1730
|
notes?: string | undefined;
|
|
1728
1731
|
desc?: string | undefined;
|
|
@@ -2024,6 +2027,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2024
2027
|
}[]>;
|
|
2025
2028
|
onScroll: (scrollEvent: Event) => void;
|
|
2026
2029
|
triggerAutoHidden: (field: import("../../../../../es/components/form-render").GeneralField) => Promise<void>;
|
|
2030
|
+
observeFormGraph: Record<string, import("../../../../../es/components/form-render").GeneralField>;
|
|
2031
|
+
setGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
2032
|
+
removeGraph: (field: import("../../../../../es/components/form-render").GeneralField) => void;
|
|
2027
2033
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
2028
2034
|
[x: string]: any;
|
|
2029
2035
|
}>;
|
|
@@ -2148,7 +2154,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2148
2154
|
clearSpan: (uuid: string) => void;
|
|
2149
2155
|
exposeEvent: {
|
|
2150
2156
|
validate(path?: string): Promise<void>;
|
|
2151
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
2157
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
2152
2158
|
setFormValues(values: import("../../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
2153
2159
|
setFieldState(path: string, handler: (field: Partial<Pick<import("../../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
2154
2160
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,computed as i,openBlock as r,createBlock as
|
|
1
|
+
import{defineComponent as e,inject as t,computed as i,openBlock as r,createBlock as d,unref as l,mergeProps as o,withModifiers as f,withCtx as m,createVNode as a,normalizeClass as n,createTextVNode as s,toDisplayString as u,createCommentVNode as p}from"vue";import{NButton as c,NEllipsis as I}from"naive-ui";import _ from"./CloseButton.vue.js";import{InjectionActiveFieldItem as v,WidgetTextMap as y}from"../../constants/index.js";import{bindHover as x}from"../../utils/index.js";import j from"../../../../../_virtual/plugin-vue_export-helper.js";var q=j(e({__name:"DefaultNode",props:{fieldItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const j=e,q=t(v);function g(){q.value=j.fieldItem}const h=i((()=>[{"is-active":q.value===j.fieldItem},"form-config__renderer"])),k=i((()=>["form-config__renderer--default",{"is-required":j.fieldItem.required}])),C=i((()=>!1===j.fieldItem.editable));function F(){const e=y.get(j.fieldItem.type);return j.textFormatter(j.fieldItem,`${j.fieldItem.name}${e?`(${e})`:""}`)}return(t,i)=>(r(),d(l(c),o({secondary:!l(C),dashed:l(C)},l(x)(e.fieldItem),{onClick:f(g,["stop"]),class:l(h),"data-type":e.fieldItem.type}),{default:m((()=>[a(l(I),{class:n(l(k))},{default:m((()=>[s(u(F()),1)])),_:1},8,["class"]),e.fieldItem.required?p("v-if",!0):(r(),d(_,{key:0,"field-item":e.fieldItem},null,8,["field-item"]))])),_:1},16,["secondary","dashed","onClick","class","data-type"]))}}),[["__file","DefaultNode.vue"]]);export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isArray as e}from"lodash-es";import{EditAbleField as t,widgetWidthOptionConfig as l,isShowOptionConfig as i,isNotFoldOptionConfig as
|
|
1
|
+
import{isArray as e}from"lodash-es";import{EditAbleField as t,widgetWidthOptionConfig as l,isShowOptionConfig as i,isNotFoldOptionConfig as a,isEditOptionConfig as _,isNullOptionConfig as E}from"../constants/index.js";function n(){const n=new Map([[t.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[t.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT"})],[t.DEFAULT_VALUE,t=>e(null==t?void 0:t.options)&&t.options.length?{alias:"默认值",elem_width:6,html_type:"SELECT",option:null==t?void 0:t.options}:{alias:"默认值",elem_width:6,html_type:"INPUT",validate:{max_length:20}}],[t.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...l()})],[t.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",validate:{max_length:30}})],[t.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...i()})],[t.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...a()})],[t.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[t.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...E()})]]);function m(e,t){return t.map((t=>{var l,i;return{...null!=(i=null==(l=n.get(t))?void 0:l(e))?i:{},val_key:t}}))}return{generateFieldListByKeys:m,generateFieldListByFieldItem:function(e){const l=new Map([["LINE_BAR",[t.NAME,t.LAYOUT_WIDTH_ENUM,t.NOTES,t.DEFAULT_EXPAND,t.FOLD]],...["NEWLINE","COMPLEX","COMBINATION"].map((e=>[e,[t.NAME,t.LAYOUT_WIDTH_ENUM]]))]),i=[t.NAME,t.DEFAULT_VALUE,t.LAYOUT_WIDTH_ENUM,t.DESC,t.NOTES,t.EDITABLE,t.REQUIRED];return m(e,l.get(e.type)||i)}}}export{n as useConfigurationField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as o}from"../../../../shared/utils/index.js";import{FORM_CONFIG_GROUP as s}from"../constants/index.js";function
|
|
1
|
+
import{findAncestor as o}from"../../../../shared/utils/index.js";import{FORM_CONFIG_GROUP as s}from"../constants/index.js";function t(){let t,e=null;function i({target:o,item:s}){e=setTimeout((()=>{o.classList.add("is-choosing-area"),s.classList.add("is-choosing")}),200)}function a({from:o,to:s,target:t,item:i}){clearTimeout(e),[o,s,t].forEach((o=>{o.classList.remove("is-choosing-area")})),i.classList.remove("is-choosing")}function n({to:s,from:e,dragged:i}){return("LINE_BAR"!==i.dataset.type||!o(s,(o=>"LINE_BAR"===o.dataset.type)))&&(("true"!==i.dataset.required||!o(s,(o=>o.classList.contains("form-config__materialContent"))))&&(null==t||t.classList.remove("is-choosing-area"),t=s,s!==e&&e.classList.remove("is-choosing-area"),void s.classList.add("is-choosing-area")))}return{getCommonConfig:o=>({move:n,onChoose:i,onUnchoose:a,tag:"section",forceFallback:!1,animation:"150","item-key":"key",group:"COMBINATION"===(null==o?void 0:o.type)?o.key:s})}}export{t as useSortableConfig};
|
|
@@ -289,6 +289,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
289
289
|
}[]>;
|
|
290
290
|
onScroll: (scrollEvent: Event) => void;
|
|
291
291
|
triggerAutoHidden: (field: import("@formily/core/esm/types").GeneralField) => Promise<void>;
|
|
292
|
+
observeFormGraph: Record<string, import("@formily/core/esm/types").GeneralField>;
|
|
293
|
+
setGraph: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
294
|
+
removeGraph: (field: import("@formily/core/esm/types").GeneralField) => void;
|
|
292
295
|
formModel: import("@formily/core/esm/models/Form").Form<{
|
|
293
296
|
[x: string]: any;
|
|
294
297
|
}>;
|
|
@@ -413,7 +416,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
413
416
|
clearSpan: (uuid: string) => void;
|
|
414
417
|
exposeEvent: {
|
|
415
418
|
validate(path?: string): Promise<void>;
|
|
416
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
419
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
417
420
|
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
418
421
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core/esm/models/Field").Field<any, any, any, any>, import("@formily/core/esm/types").NonFunctionPropertyNames<{
|
|
419
422
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as s}from"../../shared/utils/index.js";import r from"./src/FormRenderWrapper.vue.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./src/hooks/useFormRequest.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useFormField}from"./src/hooks/useFormField.js";export{AsyncQueue,useAsyncQueue}from"./src/hooks/useAsyncQueue.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,keywordMatcher,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export*from"@formily/core";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,
|
|
1
|
+
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as s}from"../../shared/utils/index.js";import r from"./src/FormRenderWrapper.vue.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./src/hooks/useFormRequest.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useFormField}from"./src/hooks/useFormField.js";export{AsyncQueue,useAsyncQueue}from"./src/hooks/useAsyncQueue.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,keywordMatcher,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export*from"@formily/core";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const o=r;o.install=function(r){s(r,o,e+"FormRender")};export{o as default};
|
|
@@ -283,6 +283,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
283
283
|
}[]>;
|
|
284
284
|
onScroll: (scrollEvent: Event) => void;
|
|
285
285
|
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
286
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
287
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
288
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
286
289
|
formModel: import("@formily/core").Form<{
|
|
287
290
|
[x: string]: any;
|
|
288
291
|
}>;
|
|
@@ -407,7 +410,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
407
410
|
clearSpan: (uuid: string) => void;
|
|
408
411
|
exposeEvent: {
|
|
409
412
|
validate(path?: string): Promise<void>;
|
|
410
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
413
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
411
414
|
setFormValues(values: AnyObject, needSplitExtendKey?: boolean): void;
|
|
412
415
|
setFieldState(path: string, handler: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
413
416
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,openBlock as i,createBlock as l,unref as n,withCtx as m,createElementBlock as p,createVNode as u,isRef as d,Fragment as c,renderList as f,createCommentVNode as h,createElementVNode as y,normalizeStyle as j,withKeys as v,withModifiers as g,toDisplayString as b}from"vue";import{createForm as k,onFieldValueChange as F,onFieldMount as x,onFieldUnmount as C,onFieldReact as H,onFormMount as S}from"@formily/core";import{FormProvider as A,FormConsumer as R}from"@formily/vue";import{isNumber as _,cloneDeep as L}from"lodash-es";import{NForm as O,NTabs as w,NTabPane as B,NConfigProvider as V}from"naive-ui";import{InjectionFormGraph as I}from"./constants/index.js";import{useAutoHidden as N}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as D}from"./hooks/useComplexOptions.js";import{useFormDomEvent as q,useFormExposeEvent as U}from"./hooks/useFormEvent.js";import{useFormGraph as W}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as G}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeReactions as K}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as M}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as T}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as E}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as P}from"./hooks/useFormValidator.js";import"@vueuse/core";import"date-fns";import{useAnchor as J}from"./hooks/useAnchor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import Q from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as X}from"./utils/schema.js";const Y={key:0,style:{height:"54px"}},Z={style:{"white-space":"pre"}};var $=Q(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:Q,emit:$}){const ee=e,{nuiThemeOverrides:oe}=M();P();const te=o(),re=t((()=>_(ee.maxHeight)?ee.maxHeight+"px":ee.maxHeight)),{SchemaField:se,businessCollector:ae,formItemDepsCollector:ie,changeContextCollector:le,formUUID:ne}=z(ee,$),{anchorBarRef:me,currentAnchor:pe,generateAnchorList:ue,updateAnchorList:de,anchorIdList:ce,onScroll:fe}=J(ee,$,te,ie);G(ee).callLifeCycle("onSetup");const{trigger:he}=N(),{observeFormGraph:ye,setGraph:je,removeGraph:ve}=W();r(I,ye);const ge=k({initialValues:ee.initialData,effects(e){F("*",(o=>{const t=o.props.name.toString();ae.trigger(e,t),ie.trigger(t),$("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:le.getContext(t,o.value)}),be(t,o.value)})),x("*",je),C("*",ve),ee.linebarAutoHidden&&(H("*",he),S((e=>e.query("*").forEach(he)))),ee.anchor&&(H("*",de),S(ue))}}),{lowCodeReactionsHandler:be,triggerAllReactionsHandler:ke}=K(t((()=>ee.lowCodeReactions)),ge);s(ke);const{schemaAdaptor:Fe}=T(ae);let xe=ee.fieldList||[];const Ce=t((()=>ee.schema?ee.schema:ee.fieldList?(xe=E().traverse(L(ee.fieldList),ee.fieldVisitor),X(Fe(xe))):X({}))),{onKeydown:He}=q({formModel:ge,formRenderRef:te,props:ee}),{clearSpan:Se}=D();a((()=>Se(ne)));const Ae=U({formModel:ge,formRenderRef:te,formItemDepsCollector:ie,getFieldList:()=>xe,formUUID:ne});return Q({formModel:ge,validate:(e="*")=>Ae.validate(e),getFormValues:(e=!0)=>Ae.getFormValues(e),setFormValues:(e,o=!0)=>Ae.setFormValues(e,o),setFieldState(e,o){Ae.setFieldState(e,o)},resetFields(e="*"){Ae.resetFields(e)},queryWidget:async e=>Ae.queryWidget(e),async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(O),{class:"form-render","require-mark-placement":"left"},{default:m((()=>[e.anchor?(i(),p("section",Y,[u(n(w),{value:n(pe),"onUpdate:value":t[0]||(t[0]=e=>d(pe)?pe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:me},{default:m((()=>[(i(!0),p(c,null,f(n(ce),(e=>(i(),l(n(B),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):h("v-if",!0),u(n(V),{"theme-overrides":n(oe)},{default:m((()=>[y("section",{class:"form-render__wrapper",style:j({"--column":e.column,"--form-height":n(re)}),ref_key:"formRenderRef",ref:te,onScroll:t[1]||(t[1]=(...e)=>n(fe)&&n(fe)(...e)),onKeydownCapture:t[2]||(t[2]=v(g(((...e)=>n(He)&&n(He)(...e)),["prevent"]),["enter"]))},[u(n(A),{form:n(ge)},{default:m((()=>[u(n(se),{schema:n(Ce)},null,8,["schema"]),e.consumer?(i(),l(n(R),{key:0},{default:m((({form:e})=>[y("div",Z,b(JSON.stringify(e.values,null,2)),1)])),_:1})):h("v-if",!0)])),_:1},8,["form"])],36)])),_:1},8,["theme-overrides"])])),_:1}))}}),[["__file","FormRender.vue"]]);export{$ as default};
|
|
@@ -286,6 +286,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
286
286
|
}[]>;
|
|
287
287
|
onScroll: (scrollEvent: Event) => void;
|
|
288
288
|
triggerAutoHidden: (field: import("../../../../es/components/form-render").GeneralField) => Promise<void>;
|
|
289
|
+
observeFormGraph: Record<string, import("../../../../es/components/form-render").GeneralField>;
|
|
290
|
+
setGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
291
|
+
removeGraph: (field: import("../../../../es/components/form-render").GeneralField) => void;
|
|
289
292
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
290
293
|
[x: string]: any;
|
|
291
294
|
}>;
|
|
@@ -410,7 +413,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
410
413
|
clearSpan: (uuid: string) => void;
|
|
411
414
|
exposeEvent: {
|
|
412
415
|
validate(path?: string): Promise<void>;
|
|
413
|
-
getFormValues(needCombineExtendKey?: boolean
|
|
416
|
+
getFormValues(needCombineExtendKey?: boolean): any;
|
|
414
417
|
setFormValues(values: import("../../../shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
415
418
|
setFieldState(path: string, handler: (field: Partial<Pick<import("../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
416
419
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|