|
@@ -1,8 +1,8 @@
|
|
|
<!--
|
|
|
* @Author: PoJun
|
|
|
* @Date: 2023-10-09 15:51:12
|
|
|
- * @LastEditors: PoJun
|
|
|
- * @LastEditTime: 2024-04-28 14:17:11
|
|
|
+ * @LastEditors: XuanJi
|
|
|
+ * @LastEditTime: 2024-05-21 01:54:24
|
|
|
* @Message: 表单
|
|
|
-->
|
|
|
<template>
|
|
@@ -24,7 +24,7 @@
|
|
|
:value="item.sv"
|
|
|
:placeholder="item.canEdit ? (item.placeholder ? item.placeholder : '请输入') : '暂无'"
|
|
|
@input="inputChange($event, item)"
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:suffixIcon="item.canEdit ? 'edit-pen' : ''"
|
|
@@ -49,7 +49,7 @@
|
|
|
border="none"
|
|
|
@input="inputChange($event, item)"
|
|
|
:autoHeight="true"
|
|
|
- :textStyle="{ fontSize: '14px', textAlign: 'right' }"
|
|
|
+ :textStyle="{ fontSize: '14px', textAlign: labelPosition == 'top' ? 'left' : 'right' }"
|
|
|
:readonly="!item.canEdit"
|
|
|
:disabled="!item.canEdit"
|
|
|
></uv-textarea>
|
|
@@ -67,7 +67,7 @@
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
<uv-input
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:value="item.sv"
|
|
@@ -90,7 +90,7 @@
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
<uv-input
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:value="item.sv"
|
|
@@ -113,7 +113,7 @@
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
<uv-input
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:value="item.sv"
|
|
@@ -136,7 +136,7 @@
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
<uv-input
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:value="item.sv"
|
|
@@ -157,12 +157,15 @@
|
|
|
:customStyle="item.customStyle"
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
- <view v-if="item.rv" class="uv-flex-1 uv-flex uv-row-right">
|
|
|
+ <view
|
|
|
+ v-if="item.rv"
|
|
|
+ :class="{ 'row-left': labelPosition == 'top', 'row-right': labelPosition == 'left' }"
|
|
|
+ >
|
|
|
<uv-qrcode :loading="false" ref="qrcodeDom" size="120px" :value="getQrcodeUrl(item)"></uv-qrcode>
|
|
|
</view>
|
|
|
<uv-input
|
|
|
v-else
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
placeholder="暂无"
|
|
@@ -180,7 +183,7 @@
|
|
|
:customStyle="item.customStyle"
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
- <view class="uv-flex uv-flex-1 uv-row-right">
|
|
|
+ <view :class="{ 'row-left': labelPosition == 'top', 'row-right': labelPosition == 'left' }">
|
|
|
<uv-switch
|
|
|
:disabled="!item.canEdit"
|
|
|
v-model="item.rv"
|
|
@@ -196,7 +199,7 @@
|
|
|
<uv-upload
|
|
|
:fileList="getFileList(item.sv)"
|
|
|
:name="item.code"
|
|
|
- :maxCount="item.maxCount"
|
|
|
+ :maxCount="!item.canEdit ? item.sv.split(',').length : item.maxCount"
|
|
|
@afterRead="afterRead($event, item)"
|
|
|
@delete="deletePic($event, item)"
|
|
|
:uploadText="item.uploadText"
|
|
@@ -216,11 +219,14 @@
|
|
|
:customStyle="item.customStyle"
|
|
|
:labelWidth="item.labelWidth ? item.labelWidth : 150"
|
|
|
>
|
|
|
- <view class="pj-upload uv-flex uv-flex-1 uv-row-right">
|
|
|
+ <view
|
|
|
+ class="pj-upload"
|
|
|
+ :class="{ 'row-left': labelPosition == 'top', 'row-right': labelPosition == 'left' }"
|
|
|
+ >
|
|
|
<uv-upload
|
|
|
:fileList="getFileList(item.sv)"
|
|
|
:name="item.code"
|
|
|
- :maxCount="item.maxCount"
|
|
|
+ :maxCount="!item.canEdit ? item.sv.split(',').length : item.maxCount"
|
|
|
@afterRead="afterRead($event, item)"
|
|
|
@delete="deletePic($event, item)"
|
|
|
:width="item.width"
|
|
@@ -244,7 +250,7 @@
|
|
|
@click="item.canEdit && openProductsPicker(item)"
|
|
|
>
|
|
|
<uv-input
|
|
|
- inputAlign="right"
|
|
|
+ :inputAlign="labelPosition == 'top' ? 'left' : 'right'"
|
|
|
fontSize="14px"
|
|
|
border="none"
|
|
|
:value="getShowNames(item.rv)"
|
|
@@ -679,4 +685,11 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.row-left {
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+.row-right {
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+</style>
|