Merge branch 'feature-template2' into uat
This commit is contained in:
@@ -4,7 +4,9 @@
|
|||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<div>{{ title }}</div>
|
<div>{{ title }}</div>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<a-button v-if="list.length < 20" type="primary" @click="addNew">{{ addText }}</a-button>
|
<a-button v-if="list.length < 20" class="custom-button" type="primary" @click="addNew">{{
|
||||||
|
addText
|
||||||
|
}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 包装列表 -->
|
<!-- 包装列表 -->
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
@@ -50,11 +52,7 @@
|
|||||||
<div class="p-right">
|
<div class="p-right">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="l-title">产品名称:</span>
|
<span class="l-title">产品名称:</span>
|
||||||
<a-input
|
<a-input v-model:value="item.packName" :maxlength="30" placeholder="请输入产品名称">
|
||||||
v-model:value="item.packName"
|
|
||||||
:maxlength="30"
|
|
||||||
placeholder="请输入产品名称"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<span class="suffix">
|
<span class="suffix">
|
||||||
{{ `${item.packName.length}/30` }}
|
{{ `${item.packName.length}/30` }}
|
||||||
@@ -64,11 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="l-title">包装类型:</span>
|
<span class="l-title">包装类型:</span>
|
||||||
<a-input
|
<a-input v-model:value="item.packType" :maxlength="30" placeholder="请输入包装类型">
|
||||||
v-model:value="item.packType"
|
|
||||||
:maxlength="30"
|
|
||||||
placeholder="请输入包装类型"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<span class="suffix">
|
<span class="suffix">
|
||||||
{{ `${item.packName.length}/30` }}
|
{{ `${item.packName.length}/30` }}
|
||||||
@@ -182,6 +176,7 @@ export default defineComponent({
|
|||||||
if (status !== "uploading") {
|
if (status !== "uploading") {
|
||||||
item.packImg = decodeURIComponent(info.file.response.url);
|
item.packImg = decodeURIComponent(info.file.response.url);
|
||||||
uploadLoading.value = false;
|
uploadLoading.value = false;
|
||||||
|
validateImg(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === "done") {
|
if (status === "done") {
|
||||||
@@ -229,6 +224,14 @@ export default defineComponent({
|
|||||||
item.text = "";
|
item.text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 图片上传校验
|
||||||
|
function validateImg(item, index) {
|
||||||
|
if (item.text === "请上传产品图片" && item.packImg) {
|
||||||
|
item.status = false;
|
||||||
|
item.text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
visible,
|
visible,
|
||||||
previewImg,
|
previewImg,
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ export default defineComponent({
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
.ant-dropdown-link-disable {
|
.ant-dropdown-link-disable {
|
||||||
opacity: 50%;
|
color: rgba(112, 185, 54, .5);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user