cnhis-design-vue 3.1.31-beta.3 → 3.1.31-beta.5
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/bpmn-workflow/src/BpmnWorkflow.d.ts +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 +7 -5
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -5
- package/es/components/button-print/src/components/{edit.js → EditFormat.js} +3 -3
- package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +3 -2
- package/es/components/button-print/src/components/IdentityVerification.js +2 -2
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -5
- package/es/components/button-print/src/components/Preview.js +6 -0
- package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
- package/es/components/button-print/src/components/Preview.vue_vue_type_script_setup_true_lang.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 +64 -22
- package/es/components/button-print/src/utils/print.d.ts +4 -1
- package/es/components/button-print/src/utils/print.js +11 -2
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/iho-table/index.d.ts +124 -66
- package/es/components/iho-table/src/IhoTable.js +2 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +124 -66
- 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 +2 -2
- 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.js +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +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/index.js +9 -11
- 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.js +2 -1
- 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/index.js +8 -11
- 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/keyboard/index.d.ts +113 -63
- package/es/components/keyboard/src/Keyboard.js +108 -252
- package/es/components/keyboard/src/Keyboard.vue.d.ts +115 -65
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
- package/es/components/keyboard/src/components/NumberPanel.js +206 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
- package/es/components/scale-view/index.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
- package/es/components/search-cascader/src/components/SearchMenu.js +5 -5
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- 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/README.md
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
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. 注意
|
|
65
|
-
|
|
66
|
-
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// main.ts
|
|
70
|
-
import { createApp } from 'vue';
|
|
71
|
-
import App from './App.vue';
|
|
72
|
-
|
|
73
|
-
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
-
// 或者
|
|
75
|
-
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
-
|
|
77
|
-
const app = createApp(App);
|
|
78
|
-
app.use(CGrid);
|
|
79
|
-
// 或者
|
|
80
|
-
app.use(CBigTable);
|
|
81
|
-
app.mount('#app');
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 4.FAQ
|
|
85
|
-
|
|
86
|
-
### 4.1 项目打包后样式丢失
|
|
87
|
-
|
|
88
|
-
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
// vite.config.ts
|
|
92
|
-
import { defineConfig } from 'vite';
|
|
93
|
-
|
|
94
|
-
export default defineConfig({
|
|
95
|
-
rollupOptions: {
|
|
96
|
-
// ..otherOptions
|
|
97
|
-
output: {
|
|
98
|
-
dir: './dist',
|
|
99
|
-
manualChunks(id: string) {
|
|
100
|
-
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
-
return 'vendor';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4.2 找不到文件
|
|
110
|
-
|
|
111
|
-
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
// vite.config.ts
|
|
115
|
-
const config = {
|
|
116
|
-
// ...otherOptions
|
|
117
|
-
resolve: {
|
|
118
|
-
// ...otherOptions
|
|
119
|
-
// 如果没有配置, 则不用考虑
|
|
120
|
-
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
```
|
|
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. 注意
|
|
65
|
+
|
|
66
|
+
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// main.ts
|
|
70
|
+
import { createApp } from 'vue';
|
|
71
|
+
import App from './App.vue';
|
|
72
|
+
|
|
73
|
+
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
+
// 或者
|
|
75
|
+
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
+
|
|
77
|
+
const app = createApp(App);
|
|
78
|
+
app.use(CGrid);
|
|
79
|
+
// 或者
|
|
80
|
+
app.use(CBigTable);
|
|
81
|
+
app.mount('#app');
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 4.FAQ
|
|
85
|
+
|
|
86
|
+
### 4.1 项目打包后样式丢失
|
|
87
|
+
|
|
88
|
+
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// vite.config.ts
|
|
92
|
+
import { defineConfig } from 'vite';
|
|
93
|
+
|
|
94
|
+
export default defineConfig({
|
|
95
|
+
rollupOptions: {
|
|
96
|
+
// ..otherOptions
|
|
97
|
+
output: {
|
|
98
|
+
dir: './dist',
|
|
99
|
+
manualChunks(id: string) {
|
|
100
|
+
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
+
return 'vendor';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4.2 找不到文件
|
|
110
|
+
|
|
111
|
+
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
// vite.config.ts
|
|
115
|
+
const config = {
|
|
116
|
+
// ...otherOptions
|
|
117
|
+
resolve: {
|
|
118
|
+
// ...otherOptions
|
|
119
|
+
// 如果没有配置, 则不用考虑
|
|
120
|
+
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -383,8 +383,8 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
383
383
|
'--n-feedback-text-color-warning': string;
|
|
384
384
|
'--n-feedback-text-color-error': string;
|
|
385
385
|
}> | undefined;
|
|
386
|
-
themeClass: import("vue").Ref<string
|
|
387
|
-
onRender: () => void;
|
|
386
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
387
|
+
onRender: (() => void) | undefined;
|
|
388
388
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
389
389
|
restoreValidation: () => void;
|
|
390
390
|
path?: string | undefined;
|
|
@@ -408,6 +408,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
408
408
|
key: string;
|
|
409
409
|
render: () => import("vue").VNodeChild;
|
|
410
410
|
}[]>;
|
|
411
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
411
412
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
412
413
|
readonly label: StringConstructor;
|
|
413
414
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -539,7 +540,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
539
540
|
readonly ignorePathChange: boolean;
|
|
540
541
|
}>;
|
|
541
542
|
NInput: any;
|
|
542
|
-
|
|
543
|
+
EditFormat: import("vue").DefineComponent<{}, {
|
|
543
544
|
PROTOCOL: string;
|
|
544
545
|
HOST: string;
|
|
545
546
|
SAVEIREPORT: string;
|
|
@@ -733,8 +734,8 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
733
734
|
'--n-feedback-text-color-warning': string;
|
|
734
735
|
'--n-feedback-text-color-error': string;
|
|
735
736
|
}> | undefined;
|
|
736
|
-
themeClass: import("vue").Ref<string
|
|
737
|
-
onRender: () => void;
|
|
737
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
738
|
+
onRender: (() => void) | undefined;
|
|
738
739
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
739
740
|
restoreValidation: () => void;
|
|
740
741
|
path?: string | undefined;
|
|
@@ -758,6 +759,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
758
759
|
key: string;
|
|
759
760
|
render: () => import("vue").VNodeChild;
|
|
760
761
|
}[]>;
|
|
762
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
761
763
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
762
764
|
readonly label: StringConstructor;
|
|
763
765
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -387,8 +387,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
387
387
|
'--n-feedback-text-color-warning': string;
|
|
388
388
|
'--n-feedback-text-color-error': string;
|
|
389
389
|
}> | undefined;
|
|
390
|
-
themeClass: import("vue").Ref<string
|
|
391
|
-
onRender: () => void;
|
|
390
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
391
|
+
onRender: (() => void) | undefined;
|
|
392
392
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
393
393
|
restoreValidation: () => void;
|
|
394
394
|
path?: string | undefined;
|
|
@@ -412,6 +412,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
412
412
|
key: string;
|
|
413
413
|
render: () => import("vue").VNodeChild;
|
|
414
414
|
}[]>;
|
|
415
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
415
416
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
416
417
|
readonly label: StringConstructor;
|
|
417
418
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -543,7 +544,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
543
544
|
readonly ignorePathChange: boolean;
|
|
544
545
|
}>;
|
|
545
546
|
NInput: any;
|
|
546
|
-
|
|
547
|
+
EditFormat: import("vue").DefineComponent<{}, {
|
|
547
548
|
PROTOCOL: string;
|
|
548
549
|
HOST: string;
|
|
549
550
|
SAVEIREPORT: string;
|
|
@@ -737,8 +738,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
737
738
|
'--n-feedback-text-color-warning': string;
|
|
738
739
|
'--n-feedback-text-color-error': string;
|
|
739
740
|
}> | undefined;
|
|
740
|
-
themeClass: import("vue").Ref<string
|
|
741
|
-
onRender: () => void;
|
|
741
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
742
|
+
onRender: (() => void) | undefined;
|
|
742
743
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
743
744
|
restoreValidation: () => void;
|
|
744
745
|
path?: string | undefined;
|
|
@@ -762,6 +763,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
762
763
|
key: string;
|
|
763
764
|
render: () => import("vue").VNodeChild;
|
|
764
765
|
}[]>;
|
|
766
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
765
767
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
766
768
|
readonly label: StringConstructor;
|
|
767
769
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -6,7 +6,7 @@ import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
|
6
6
|
|
|
7
7
|
const _hoisted_1 = { style: { "margin-bottom": "12px" } };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "
|
|
9
|
+
__name: "EditFormat",
|
|
10
10
|
setup(__props, { expose }) {
|
|
11
11
|
const PROTOCOL = window.location.protocol;
|
|
12
12
|
const HOST = window.location.host;
|
|
@@ -148,6 +148,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
var
|
|
151
|
+
var EditFormat = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "EditFormat.vue"]]);
|
|
152
152
|
|
|
153
|
-
export {
|
|
153
|
+
export { EditFormat as default };
|
|
@@ -195,8 +195,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
195
195
|
'--n-feedback-text-color-warning': string;
|
|
196
196
|
'--n-feedback-text-color-error': string;
|
|
197
197
|
}> | undefined;
|
|
198
|
-
themeClass: import("vue").Ref<string
|
|
199
|
-
onRender: () => void;
|
|
198
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
199
|
+
onRender: (() => void) | undefined;
|
|
200
200
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
201
201
|
restoreValidation: () => void;
|
|
202
202
|
path?: string | undefined;
|
|
@@ -220,6 +220,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
220
220
|
key: string;
|
|
221
221
|
render: () => import("vue").VNodeChild;
|
|
222
222
|
}[]>;
|
|
223
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
223
224
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
224
225
|
readonly label: StringConstructor;
|
|
225
226
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, watch, openBlock, createBlock, unref, normalizeStyle, withCtx, createElementVNode, mergeProps, createVNode, createTextVNode } from 'vue';
|
|
2
2
|
import { useMessage, NModal, NForm, NFormItem, NInput, NButton } from 'naive-ui';
|
|
3
|
-
import
|
|
3
|
+
import EditFormat from './EditFormat.js';
|
|
4
4
|
import '../utils/print.js';
|
|
5
5
|
import { isIReport } from '../utils/browserPrint.js';
|
|
6
6
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
@@ -113,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
}, {
|
|
114
114
|
default: withCtx(() => [
|
|
115
115
|
createElementVNode("div", _hoisted_1, [
|
|
116
|
-
showEditForm.value ? (openBlock(), createBlock(
|
|
116
|
+
showEditForm.value ? (openBlock(), createBlock(EditFormat, mergeProps({
|
|
117
117
|
key: 0,
|
|
118
118
|
ref_key: "editFormRef",
|
|
119
119
|
ref: editFormRef
|
|
@@ -202,8 +202,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
202
202
|
'--n-feedback-text-color-warning': string;
|
|
203
203
|
'--n-feedback-text-color-error': string;
|
|
204
204
|
}> | undefined;
|
|
205
|
-
themeClass: import("vue").Ref<string
|
|
206
|
-
onRender: () => void;
|
|
205
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
206
|
+
onRender: (() => void) | undefined;
|
|
207
207
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
208
208
|
restoreValidation: () => void;
|
|
209
209
|
path?: string | undefined;
|
|
@@ -227,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
227
|
key: string;
|
|
228
228
|
render: () => import("vue").VNodeChild;
|
|
229
229
|
}[]>;
|
|
230
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
230
231
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
231
232
|
readonly label: StringConstructor;
|
|
232
233
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -358,7 +359,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
358
359
|
readonly ignorePathChange: boolean;
|
|
359
360
|
}>;
|
|
360
361
|
NInput: any;
|
|
361
|
-
|
|
362
|
+
EditFormat: import("vue").DefineComponent<{}, {
|
|
362
363
|
PROTOCOL: string;
|
|
363
364
|
HOST: string;
|
|
364
365
|
SAVEIREPORT: string;
|
|
@@ -552,8 +553,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
552
553
|
'--n-feedback-text-color-warning': string;
|
|
553
554
|
'--n-feedback-text-color-error': string;
|
|
554
555
|
}> | undefined;
|
|
555
|
-
themeClass: import("vue").Ref<string
|
|
556
|
-
onRender: () => void;
|
|
556
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
557
|
+
onRender: (() => void) | undefined;
|
|
557
558
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
558
559
|
restoreValidation: () => void;
|
|
559
560
|
path?: string | undefined;
|
|
@@ -577,6 +578,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
577
578
|
key: string;
|
|
578
579
|
render: () => import("vue").VNodeChild;
|
|
579
580
|
}[]>;
|
|
581
|
+
reverseColSpace: import("vue").ComputedRef<boolean>;
|
|
580
582
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
581
583
|
readonly label: StringConstructor;
|
|
582
584
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import _sfc_main from './Preview.vue_vue_type_script_setup_true_lang.js';
|
|
2
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
3
|
+
|
|
4
|
+
var Preview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "Preview.vue"]]);
|
|
5
|
+
|
|
6
|
+
export { Preview as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
visible: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
src: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
visible: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
src: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
}>> & {
|
|
19
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>>;
|
|
21
|
+
emit: (event: "update:visible", ...args: any[]) => void;
|
|
22
|
+
isNormalSize: import("vue").Ref<boolean>;
|
|
23
|
+
style: import("vue").ComputedRef<string>;
|
|
24
|
+
titleRender: () => JSX.Element;
|
|
25
|
+
changeSize: () => void;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
NModal: any;
|
|
28
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
visible: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
src: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
}>> & {
|
|
37
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
visible: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
export default _default;
|
package/es/components/button-print/src/components/Preview.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, unref, normalizeStyle, withCtx, createElementVNode, createVNode, Fragment, createTextVNode } from 'vue';
|
|
2
|
+
import { NModal, NIcon } from 'naive-ui';
|
|
3
|
+
import { SquareOutline, CopyOutline } from '@vicons/ionicons5';
|
|
4
|
+
|
|
5
|
+
const _hoisted_1 = ["src"];
|
|
6
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "Preview",
|
|
8
|
+
props: {
|
|
9
|
+
visible: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
src: {
|
|
14
|
+
type: String
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:visible"],
|
|
18
|
+
setup(__props, {
|
|
19
|
+
emit
|
|
20
|
+
}) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const isNormalSize = ref(true);
|
|
23
|
+
const style = computed(() => {
|
|
24
|
+
const size = isNormalSize.value ? 80 : 100;
|
|
25
|
+
return `width: ${size}vw; height: ${size}vh`;
|
|
26
|
+
});
|
|
27
|
+
function titleRender() {
|
|
28
|
+
return createVNode(Fragment, null, [createVNode("div", null, [createTextVNode("\u9884\u89C8")]), createVNode(NIcon, {
|
|
29
|
+
"style": {
|
|
30
|
+
margin: "0 0 0 auto",
|
|
31
|
+
transform: isNormalSize.value ? "none" : "rotate(90deg)"
|
|
32
|
+
},
|
|
33
|
+
"onClick": changeSize,
|
|
34
|
+
"component": isNormalSize.value ? SquareOutline : CopyOutline
|
|
35
|
+
}, null)]);
|
|
36
|
+
}
|
|
37
|
+
function changeSize() {
|
|
38
|
+
isNormalSize.value = !isNormalSize.value;
|
|
39
|
+
}
|
|
40
|
+
function onClose() {
|
|
41
|
+
props.src && window.URL.revokeObjectURL(props.src);
|
|
42
|
+
emit("update:visible", false);
|
|
43
|
+
}
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createBlock(unref(NModal), {
|
|
46
|
+
preset: "dialog",
|
|
47
|
+
show: __props.visible,
|
|
48
|
+
"show-icon": false,
|
|
49
|
+
style: normalizeStyle(unref(style)),
|
|
50
|
+
class: "c-button-preview-modal",
|
|
51
|
+
title: titleRender,
|
|
52
|
+
onClose,
|
|
53
|
+
onMaskClick: onClose
|
|
54
|
+
}, {
|
|
55
|
+
default: withCtx(() => [createElementVNode("iframe", {
|
|
56
|
+
src: __props.src,
|
|
57
|
+
frameborder: "0",
|
|
58
|
+
width: "100%",
|
|
59
|
+
height: "97%"
|
|
60
|
+
}, null, 8, _hoisted_1)]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["show", "style"]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export { _sfc_main as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function useBrowserPrint(data: Blob, mode?: string): void;
|
|
1
|
+
export declare function useBrowserPrint(data: Blob, mode?: string): string | void;
|
|
2
2
|
export declare function isIReport(formatId: string): boolean;
|
|
@@ -4,5 +4,9 @@ export declare class IdentityVerificationDialog {
|
|
|
4
4
|
rendered: boolean;
|
|
5
5
|
static createMsg(message: string): string;
|
|
6
6
|
show(instance: ComponentInternalInstance, title: string, api: Func, formatId?: string, templateId?: string): Promise<string>;
|
|
7
|
-
|
|
7
|
+
}
|
|
8
|
+
export declare class PreviewDialog {
|
|
9
|
+
rendered: boolean;
|
|
10
|
+
static createMsg(message: string): string;
|
|
11
|
+
show(instance: ComponentInternalInstance, src: string): Promise<string>;
|
|
8
12
|
}
|