Commit 7bf38fb7 by yancanhua

feat: 自定义组件开发

1 parent 1efa3d6e
Pipeline #89 for 7bf38fb7 failed in 0 seconds
......@@ -113,7 +113,7 @@ function setSubmitData() {
remark: item.remark || '',
}
}
if (item.interactionType != 'button_select') {
if (item.interactionType != 'button_select' && item.interactionType != 'image_upload' && item.interactionType != 'video_upload') {
dataList.push(itemData);
}
});
......
......@@ -38,6 +38,9 @@ async function onFileChange(ev: Event) {
const url = (typeof res.aliyunAddress === "string" && res.aliyunAddress) || (typeof res.url === "string" && res.url) || "";
showToast("上传成功");
pickerValue.value.push(url);
console.log('pickerValue.value', pickerValue.value);
updateData();
} catch (e: unknown) {
const msg = e instanceof Error ? e.message : String(e);
......@@ -77,12 +80,12 @@ function updateData() {
<div v-if="(validationRules.maxCount || 3) > pickerValue.length" class="uploadBox" @click="pickFile">
<van-icon name="plus" size="24" color="#999999" class="plusBox" />
<div class="uploadTxt"> {{ item.interactionType == 'image_upload' ? '添加照片' : '添加视频' }}</div>
<div v-for="(item, index) in pickerValue" :key="index" class="uploadBox">
<div class="deleteBox" @click="handleDelete(item)">
<van-icon name="clear" size="20" color="#999999" />
</div>
<van-image width="96" height="96" style="border-radius: 8px;" :src="item" />
</div>
<div v-if="pickerValue.length" v-for="(item, index) in pickerValue" :key="index" class="uploadBox">
<div class="deleteBox" @click="handleDelete(item)">
<van-icon name="clear" size="20" color="#999999" />
</div>
<van-image width="96" height="96" style="border-radius: 8px;" :src="item" />
</div>
</div>
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!