Merge branch 'feature-template2' into uat

This commit is contained in:
steven
2022-11-30 15:00:51 +08:00
2 changed files with 15 additions and 12 deletions

View File

@@ -4,7 +4,9 @@
<!-- 标题 -->
<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 class="card-list">
@@ -50,11 +52,7 @@
<div class="p-right">
<div class="label">
<span class="l-title">产品名称</span>
<a-input
v-model:value="item.packName"
:maxlength="30"
placeholder="请输入产品名称"
>
<a-input v-model:value="item.packName" :maxlength="30" placeholder="请输入产品名称">
<template #suffix>
<span class="suffix">
{{ `${item.packName.length}/30` }}
@@ -64,11 +62,7 @@
</div>
<div class="label">
<span class="l-title">包装类型</span>
<a-input
v-model:value="item.packType"
:maxlength="30"
placeholder="请输入包装类型"
>
<a-input v-model:value="item.packType" :maxlength="30" placeholder="请输入包装类型">
<template #suffix>
<span class="suffix">
{{ `${item.packName.length}/30` }}
@@ -182,6 +176,7 @@ export default defineComponent({
if (status !== "uploading") {
item.packImg = decodeURIComponent(info.file.response.url);
uploadLoading.value = false;
validateImg(item)
}
if (status === "done") {
@@ -229,6 +224,14 @@ export default defineComponent({
item.text = "";
}
// 图片上传校验
function validateImg(item, index) {
if (item.text === "请上传产品图片" && item.packImg) {
item.status = false;
item.text = "";
}
}
return {
visible,
previewImg,

View File

@@ -738,7 +738,7 @@ export default defineComponent({
padding: 0 !important;
}
.ant-dropdown-link-disable {
opacity: 50%;
color: rgba(112, 185, 54, .5);
cursor: not-allowed;
}
</style>