zhytech-ui-mobile 1.1.5 → 1.1.6

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
@@ -51,6 +51,24 @@ setTheme("dark");
51
51
  ```ts
52
52
  import type { batchAddComponentParam, dynamicFormData, uploadOption } from "zhytech-ui-mobile";
53
53
  ```
54
+
55
+ ### 依赖安装说明
56
+
57
+ **重要:在使用此组件库前,请确保安装以下必需依赖:**
58
+
59
+ ```bash
60
+ npm install vue@^3.3.11 @vueuse/core@^10.11.1 dayjs@^1.11.18
61
+ ```
62
+
63
+ **可选依赖(根据使用的组件功能选择安装):**
64
+ - 文件预览功能:`npm install @js-preview/docx@^1.6.4 @js-preview/excel@^1.7.14 pptx-preview@^1.0.1 pdfjs-dist@^2.16.105 xgplayer@^3.0.23`
65
+ - 验证码功能:`npm install vue3-puzzle-vcode@^1.1.7`
66
+
67
+ **如果安装时出现peerDependencies冲突警告,请检查依赖版本或使用:**
68
+ ```bash
69
+ npm install --legacy-peer-deps
70
+ ```
71
+
54
72
  > #### 注意:
55
73
 
56
74
  1)、此组件库提供的所有组件在使用时均需要添加**zhy**前缀,如:zhy-form-renderer
@@ -61,6 +79,11 @@ setTheme("dark");
61
79
 
62
80
  > #### 版本更新清单:
63
81
 
82
+ **V 1.1.6**
83
+ ```html
84
+ 1.zhyFilePreview组件新增extensionName属性,用于指定文件类型
85
+ ```
86
+
64
87
  **V 1.1.5**
65
88
  ```html
66
89
  1.修复zhyFilePreview组件,两个视频文件切换时,视频没有切换
@@ -93907,6 +93907,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93907
93907
  type: String,
93908
93908
  required: true
93909
93909
  },
93910
+ extensionName: {
93911
+ type: String,
93912
+ default: ""
93913
+ },
93910
93914
  /**
93911
93915
  * 文件预览选项
93912
93916
  */
@@ -93922,11 +93926,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93922
93926
  setup(__props) {
93923
93927
  const { getFileType } = useUtils();
93924
93928
  const props = __props;
93925
- const { url, option } = toRefs(props);
93926
- const fileType = computed(() => getFileType(url.value));
93929
+ const { url, extensionName, option } = toRefs(props);
93930
+ const fileType = computed(() => getFileType(extensionName.value || url.value));
93927
93931
  const isFullscreen = ref(false);
93928
93932
  const show = ref(true);
93929
- watch([() => url.value, () => option.value], ([newUrl, newOption]) => {
93933
+ watch([() => url.value, () => option.value], () => {
93930
93934
  show.value = false;
93931
93935
  nextTick(() => {
93932
93936
  show.value = true;