zhytech-ui-mobile 1.1.5 → 1.1.7
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 +29 -0
- package/dist/zhytech-ui-mobile.es.js +20 -10
- package/dist/zhytech-ui-mobile.umd.js +2 -2
- package/package.json +1 -1
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,17 @@ setTheme("dark");
|
|
|
61
79
|
|
|
62
80
|
> #### 版本更新清单:
|
|
63
81
|
|
|
82
|
+
**V 1.1.7**
|
|
83
|
+
```html
|
|
84
|
+
1.调整zhyFormRenderer组件的单选、多选组件支持分数显示,在getData方法中返回分数
|
|
85
|
+
2.调整zhyFormRenderer组件的getData新增valueContent属性,和PC端组件保持一致
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**V 1.1.6**
|
|
89
|
+
```html
|
|
90
|
+
1.zhyFilePreview组件新增extensionName属性,用于指定文件类型
|
|
91
|
+
```
|
|
92
|
+
|
|
64
93
|
**V 1.1.5**
|
|
65
94
|
```html
|
|
66
95
|
1.修复zhyFilePreview组件,两个视频文件切换时,视频没有切换
|
|
@@ -16616,7 +16616,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
16616
16616
|
shape: "square"
|
|
16617
16617
|
}, {
|
|
16618
16618
|
default: withCtx(() => [
|
|
16619
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
16619
|
+
createTextVNode(toDisplayString(`${item.pointsPosition === "left" && item.points ? `(${item.points})` : ""}`) + " " + toDisplayString(item.label) + " " + toDisplayString(`${item.pointsPosition === "right" && item.points ? `(${item.points})` : ""}`), 1)
|
|
16620
16620
|
]),
|
|
16621
16621
|
_: 2
|
|
16622
16622
|
}, 1032, ["modelValue"]),
|
|
@@ -17299,7 +17299,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
17299
17299
|
onClick: ($event) => clearCheck($event, item.value)
|
|
17300
17300
|
}, {
|
|
17301
17301
|
default: withCtx(() => [
|
|
17302
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
17302
|
+
createTextVNode(toDisplayString(`${item.pointsPosition === "left" && item.points ? `(${item.points})` : ""}`) + " " + toDisplayString(item.label) + " " + toDisplayString(`${item.pointsPosition === "right" && item.points ? `(${item.points})` : ""}`), 1)
|
|
17303
17303
|
]),
|
|
17304
17304
|
_: 2
|
|
17305
17305
|
}, 1032, ["value", "onClick"]),
|
|
@@ -25807,9 +25807,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
25807
25807
|
return { resultData: newResultData, fileList: newFileList };
|
|
25808
25808
|
};
|
|
25809
25809
|
const setDataByComponentType = (resultData, fileList, componentID, data2, component, groupID, pageID) => {
|
|
25810
|
-
var _a2, _b2, _c2;
|
|
25810
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
25811
25811
|
switch (component.type) {
|
|
25812
25812
|
case "radio":
|
|
25813
|
+
const radioOption = (_b2 = (_a2 = component.props) == null ? void 0 : _a2.options) == null ? void 0 : _b2.find((option) => option.value === data2[componentID]);
|
|
25813
25814
|
resultData.push({
|
|
25814
25815
|
sourceType: component.itemSourceType,
|
|
25815
25816
|
pageID,
|
|
@@ -25817,11 +25818,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
25817
25818
|
parentID: componentID,
|
|
25818
25819
|
id: data2[componentID],
|
|
25819
25820
|
// 可能包含手动录入的备注,通过拼接获取到录入的备注
|
|
25820
|
-
value: data2[`${componentID}||${data2[componentID]}`] ?? ""
|
|
25821
|
+
value: data2[`${componentID}||${data2[componentID]}`] ?? "",
|
|
25822
|
+
valueContent: (radioOption == null ? void 0 : radioOption.label) ?? ""
|
|
25821
25823
|
});
|
|
25822
25824
|
break;
|
|
25823
25825
|
case "checkbox":
|
|
25824
|
-
(
|
|
25826
|
+
(_c2 = data2[componentID]) == null ? void 0 : _c2.forEach((value) => {
|
|
25827
|
+
var _a3, _b3;
|
|
25828
|
+
const checkboxOption = (_b3 = (_a3 = component.props) == null ? void 0 : _a3.options) == null ? void 0 : _b3.find((option) => option.value === value);
|
|
25825
25829
|
resultData.push({
|
|
25826
25830
|
sourceType: component.itemSourceType,
|
|
25827
25831
|
pageID,
|
|
@@ -25829,13 +25833,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
25829
25833
|
parentID: componentID,
|
|
25830
25834
|
id: value,
|
|
25831
25835
|
// 可能包含手动录入的备注,通过拼接获取到录入的备注
|
|
25832
|
-
value: data2[`${componentID}||${value}`] ?? ""
|
|
25836
|
+
value: data2[`${componentID}||${value}`] ?? "",
|
|
25837
|
+
valueContent: (checkboxOption == null ? void 0 : checkboxOption.label) ?? "",
|
|
25838
|
+
points: (checkboxOption == null ? void 0 : checkboxOption.points) ?? ""
|
|
25833
25839
|
});
|
|
25834
25840
|
});
|
|
25835
25841
|
break;
|
|
25836
25842
|
case "upload":
|
|
25837
25843
|
case "uploadImage":
|
|
25838
|
-
if (!((
|
|
25844
|
+
if (!((_d2 = props.uploadOptions) == null ? void 0 : _d2.autoUpload) && ((_e2 = data2[componentID]) == null ? void 0 : _e2.length)) {
|
|
25839
25845
|
let addFileList = [];
|
|
25840
25846
|
let fileIDs = [];
|
|
25841
25847
|
data2[componentID].forEach((file2) => {
|
|
@@ -93907,6 +93913,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93907
93913
|
type: String,
|
|
93908
93914
|
required: true
|
|
93909
93915
|
},
|
|
93916
|
+
extensionName: {
|
|
93917
|
+
type: String,
|
|
93918
|
+
default: ""
|
|
93919
|
+
},
|
|
93910
93920
|
/**
|
|
93911
93921
|
* 文件预览选项
|
|
93912
93922
|
*/
|
|
@@ -93922,11 +93932,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93922
93932
|
setup(__props) {
|
|
93923
93933
|
const { getFileType } = useUtils();
|
|
93924
93934
|
const props = __props;
|
|
93925
|
-
const { url, option } = toRefs(props);
|
|
93926
|
-
const fileType = computed(() => getFileType(url.value));
|
|
93935
|
+
const { url, extensionName, option } = toRefs(props);
|
|
93936
|
+
const fileType = computed(() => getFileType(extensionName.value || url.value));
|
|
93927
93937
|
const isFullscreen = ref(false);
|
|
93928
93938
|
const show = ref(true);
|
|
93929
|
-
watch([() => url.value, () => option.value], (
|
|
93939
|
+
watch([() => url.value, () => option.value], () => {
|
|
93930
93940
|
show.value = false;
|
|
93931
93941
|
nextTick(() => {
|
|
93932
93942
|
show.value = true;
|