|
|
@@ -31,7 +31,7 @@
|
|
|
<div
|
|
|
id="work-tag-input-placeholder"
|
|
|
class="work-tag-input-placeholder"
|
|
|
- @click.stop="isShowTagList = true"
|
|
|
+ @click.stop="isShowTagList = !isShowTagList"
|
|
|
>
|
|
|
添加标签
|
|
|
<i
|
|
|
@@ -40,7 +40,11 @@
|
|
|
></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="work-tag-select-container" v-show="isShowTagList">
|
|
|
+ <div
|
|
|
+ class="work-tag-select-container"
|
|
|
+ @click.stop=""
|
|
|
+ v-show="isShowTagList"
|
|
|
+ >
|
|
|
<div
|
|
|
v-for="(rowsItem, index) in tagArr"
|
|
|
:key="index"
|
|
|
@@ -53,7 +57,7 @@
|
|
|
:class="{
|
|
|
cur: dynamicTags.indexOf(item) > -1
|
|
|
}"
|
|
|
- @click="addTags(item)"
|
|
|
+ @click.stop="addTags(item)"
|
|
|
>{{ item }}</span
|
|
|
>
|
|
|
</div>
|
|
|
@@ -201,7 +205,7 @@
|
|
|
type="primary"
|
|
|
@click="publish"
|
|
|
class="btn-save"
|
|
|
- v-bind:disabled="isPublishing"
|
|
|
+ v-bind:disabled="isPublishing || !canNext"
|
|
|
>{{ submitText }}</el-button
|
|
|
>
|
|
|
<!-- <el-button @click="cancel">取消</el-button>-->
|
|
|
@@ -324,6 +328,13 @@ export default {
|
|
|
}
|
|
|
|
|
|
return res;
|
|
|
+ },
|
|
|
+ canNext() {
|
|
|
+ const condition = this.dynamicTags.length > 0;
|
|
|
+ const condition2 = this.workName !== "";
|
|
|
+ const condition3 = this.content !== "";
|
|
|
+ const condition4 = this.workImages.length > 1;
|
|
|
+ return condition && condition2 && condition3 && condition4;
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
|
@@ -559,6 +570,9 @@ export default {
|
|
|
* @return {{msg: string, success: boolean}}
|
|
|
*/
|
|
|
publishValidCheck() {
|
|
|
+ if (this.dynamicTags.length === 0) {
|
|
|
+ return { success: false, msg: "请请输入(项目类型、标签)" };
|
|
|
+ }
|
|
|
if (!this.workName) {
|
|
|
return { success: false, msg: "请输入作品名称" };
|
|
|
}
|
|
|
@@ -937,7 +951,7 @@ export default {
|
|
|
.btn-save {
|
|
|
width: 140px;
|
|
|
height: 48px;
|
|
|
- background: #96c6ff;
|
|
|
+ // background: #96c6ff;
|
|
|
border-radius: 24px;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
@@ -1130,25 +1144,18 @@ export default {
|
|
|
.work-tag-input-placeholder {
|
|
|
width: 244px;
|
|
|
height: 40px;
|
|
|
- background: #ffffff;
|
|
|
+ background: #308eff;
|
|
|
border-radius: 4px;
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
+ text-align: center;
|
|
|
|
|
|
font-size: 15px;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
- color: #c0c4cc;
|
|
|
+ color: #fff;
|
|
|
line-height: 40px;
|
|
|
text-indent: 14px;
|
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
|
- position: relative;
|
|
|
- .el-icon-arrow-down {
|
|
|
- position: absolute;
|
|
|
- right: 16px;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- }
|
|
|
}
|
|
|
.work-el-textarea {
|
|
|
position: relative;
|