zhytech-ui 1.2.10 → 1.2.12

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 CHANGED
@@ -62,16 +62,44 @@ setTheme("dark");
62
62
  ```ts
63
63
  import type { batchAddComponentParam, dynamicFormData, uploadOption } from "zhytech-ui";
64
64
  ```
65
+
66
+ ### 依赖安装说明
67
+
68
+ **重要:在使用此组件库前,请确保安装以下必需依赖:**
69
+
70
+ ```bash
71
+ npm install vue@^3.4.37 element-plus@2.6.1 @vueuse/core@^10.4.1 axios@^1.4.0 dayjs@^1.11.13
72
+ ```
73
+
74
+ **可选依赖(根据使用的组件功能选择安装):**
75
+ - 文件预览功能:`npm install @js-preview/docx@^1.6.4 @js-preview/excel@^1.7.14 pptx-preview@^1.0.1 vue-pdf-embed@^2.1.3 xgplayer@^3.0.23`
76
+ - 富文本编辑器:`npm install @wangeditor/editor@5.1.23 @wangeditor/editor-for-vue@5.1.12`
77
+ - 拖拽排序功能:`npm install sortablejs@^1.15.0`
78
+ - 拼图验证码功能:`npm install vue3-puzzle-vcode@^1.1.7`
79
+
80
+ **如果安装时出现peerDependencies冲突警告,请检查依赖版本或使用:**
81
+ ```bash
82
+ npm install --legacy-peer-deps
83
+ ```
84
+
65
85
  > #### 注意:
66
86
 
67
87
  1)、此组件库提供的所有组件在使用时均需要添加**zhy**前缀,如:zhy-form-designer
68
88
 
69
- 2)、此组件css样式依赖scss开发,使用者项目还需要添加scss依赖。
70
-
71
- 3)、在使用zhy-file-preview组件预览pdf组件时,如果出现乱码问题,需要将zhytech-ui\dist\pdfjs-list文件夹复制到项目的public文件夹下
89
+ 2)、在使用zhy-file-preview组件预览pdf组件时,如果出现乱码问题,需要将zhytech-ui\dist\pdfjs-list文件夹复制到项目的public文件夹下
72
90
 
73
91
  > #### 版本更新清单:
74
92
 
93
+ **V 1.2.12**
94
+ ```html
95
+ 1.zhy-file-preview组件添加 dynamicGetFile参数,用于动态获取文件内容
96
+ ```
97
+
98
+ **V 1.2.11**
99
+ ```html
100
+ 1.修复文件预览PDF文件时,低版本浏览器显示异常
101
+ ```
102
+
75
103
  **V 1.2.10**
76
104
  ```html
77
105
  1.修复zhy-dynamic-renderer组件中答题卡判断是否答对逻辑错误
@@ -1,7 +1,11 @@
1
1
  /**
2
- * @description: 文档管理中文件上传参数类型
2
+ * @description: 文件参数类型
3
3
  */
4
4
  export interface fileView {
5
+ /**
6
+ * 文件ID
7
+ */
8
+ fileID?: string;
5
9
  /**
6
10
  * 文件名称
7
11
  */
@@ -204,7 +208,7 @@ export interface pdfOptionType {
204
208
  /**
205
209
  * 当前页码,默认1
206
210
  */
207
- currentPage?: Number;
211
+ currentPage?: number;
208
212
  /**
209
213
  * 分页切换回调函数
210
214
  */
@@ -234,5 +238,9 @@ export interface filePreviewOption {
234
238
  * pdf预览配置项
235
239
  */
236
240
  pdfOption?: pdfOptionType;
241
+ /**
242
+ * @description: 动态获取文件函数,用于动态获取文件内容
243
+ */
244
+ dynamicGetFile?: Function;
237
245
  }
238
246
  export {};