Преглед на файлове

已经反馈样式修改,图片上传优化

黄琪勇 преди 11 месеца
родител
ревизия
3eec774f6a

+ 21 - 3
src/page-instrument/custom-plugins/helper-model/recommendation/index.module.less

@@ -67,6 +67,18 @@
                 width: 0;
                 display: none;
             }
+            .rowCon{
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                .tit{
+                    margin-right: 2px;
+                    font-family: PingFangSC, PingFang SC;
+                    font-weight: 500;
+                    font-size: 13px;
+                    color: #B6C4D2;
+                }
+            }
             .dropdownMenu{
                 width: 138px;
                 position: relative;
@@ -75,6 +87,7 @@
                         height: 30px;
                         background: #FFFFFF;
                         border-radius: 15px;
+                        box-shadow: initial;
                         .van-dropdown-menu__item{
                             padding: 0 12px;
                         }
@@ -91,10 +104,12 @@
                         }
                     }
                     .recommendationDropdownItem{
-                        top: 112px !important;
-                        left: 24px;
-                        width: 152px;
+                        top: 106px !important;
+                        left: 14px;
+                        width: 172px;
                         .van-dropdown-item__content{
+                            margin: 6px 0 0 10px;
+                            width: 152px;
                             max-height:162px;
                             padding: 0 10px;
                             background: #FFFFFF;
@@ -160,6 +175,9 @@
                 :global{
                     .van-uploader__preview{
                         margin: 0 8px 0 0;
+                        &:nth-child(5){
+                            margin-right: 0;
+                        }
                         .van-uploader__preview-image{
                             width: 56px;
                             height: 56px;

+ 13 - 4
src/page-instrument/custom-plugins/helper-model/recommendation/index.tsx

@@ -105,6 +105,12 @@ export default defineComponent({
 		onMounted(() => {
 			getTypeList();
 		});
+		function beforeRead(file:any[]){
+			if(file.length > 5){
+				showToast(`最多只能选择5张图片`);
+			}
+			return true
+		}
 		return () => (
 			<div class={[styles.recommendation,styles[state.modeType]]}>
 				<div class={styles.head}>
@@ -113,9 +119,12 @@ export default defineComponent({
 				</div>
 				<div class={styles.content}>
                     <div class={styles.conBox}>
-						<DropdownMenu class={[styles.dropdownMenu, currItem.value && styles.currItem]} overlay={false}>
-							<DropdownItem class={['recommendationDropdownItem']} title={ currItem.value?currItem.value.name:"请选择反馈类型"} v-model={recommenData.suggestId} options={suggestionTypeList.value}/>
-						</DropdownMenu>
+						<div class={styles.rowCon}>
+							<DropdownMenu class={[styles.dropdownMenu, currItem.value && styles.currItem]} overlay={false}>
+								<DropdownItem class={['recommendationDropdownItem']} title={ currItem.value?currItem.value.name:"请选择反馈类型"} v-model={recommenData.suggestId} options={suggestionTypeList.value}/>
+							</DropdownMenu>
+							<div class={styles.tit}>{`${recommenData.message.length}/200`}</div>
+						</div>
 						<Field
 							class={styles.field}
 							v-model={recommenData.message}
@@ -124,7 +133,7 @@ export default defineComponent({
 							maxlength={200}
 							placeholder="请详细描述您遇到的问题,以便我们尽快为您解决"
 						/>
-						<Uploader accept=".jpg,jpeg,.png" class={styles.uploader} max-size={maxSize * 1024 * 1024} onOversize={onOversize} v-model={fileList.value} after-read={afterRead} multiple max-count={4}>
+						<Uploader accept=".jpg,jpeg,.png" class={styles.uploader} max-size={maxSize * 1024 * 1024} onOversize={onOversize} v-model={fileList.value} beforeRead={beforeRead} after-read={afterRead} multiple max-count={5}>
 							<div class={styles.uploaderbox}>
 								<img class={styles.img} src={headImg("photo.png")}></img>
 								<div>上传图片</div>