Commit ebdca807 by yanju

Merge branch 'yoona' into 'master'

博客问答标签必选取消 修改推荐标签样式

See merge request pigbigbig/beyond-clouds-front!74
parents ebb9a65c 1b5e4c39
......@@ -219,6 +219,7 @@ export default {
this.list.push({
tagId: item.tagId,
tag: item.tagName,
referenceCount: item.referenceCount,
tagType: item.tagType
})
})
......
<template>
<div class="tag-box">
<p v-if="!isHot" @click="handleClick">{{item.tag}}</p>
<div v-if="isHot" @click="handleClick" :style="{backgroundColor: bgColor}">{{item.tag}}</div>
<div v-if="isHot" @click="handleClick">{{item.tag}}{{item.referenceCount}}</div>
</div>
</template>
......@@ -21,17 +21,6 @@ export default {
console.log(this.item);
this.$emit('select', this.item.tag, this.item.tagId);
}
},
created() {
if (this.isHot) {
if (this.index % 2 === 0) {
this.bgColor = '#38d3e9'
} else if (this.index % 3 === 0) {
this.bgColor = '#FF7474'
} else {
this.bgColor = '#75D098'
}
}
}
}
</script>
......@@ -41,12 +30,12 @@ export default {
display: inline-block;
> div {
display: inline-block;
margin: 5*$length 7*$length;
padding: 5*$length 7*$length;
margin: 2*$length 5*$length 8*$length 8*$length;
padding: 2*$length 9*$length;
@extend %cursorPointer;
@include border-radius(4*$length);
background-color: orange;
@include fontStyle(14, 20, 500, #fff, center);
@include border-radius(2*$length);
background-color: #F4F8FA;
@include fontStyle(12, 22, 500, #999, center);
}
> p {
width: 275*$length;
......
......@@ -187,9 +187,9 @@
//参数判断
dataPostQuestion(){
console.log(this.tagList);
console.log(Array.from(this.tagList));
console.log(this.questionTitle.slice(this.questionTitle.length-1,this.questionTitle.length));
// console.log(this.tagList);
// console.log(Array.from(this.tagList));
// console.log(this.questionTitle.slice(this.questionTitle.length-1,this.questionTitle.length));
if(this.questionTitle===''
){
this.$refs.questionTitle.focus();
......@@ -207,16 +207,16 @@
});
return false;
}
if(Array.from(this.tagList).length===0){
//this.$refs.tagIds.focus();
this.$refs.tagIds.handleShow();
this.$refs.tagIds.$refs.tag.focus();
this.$message({
message: "请添加或创建您的问题标签",
type: 'warning'
});
return false;
}
// if(Array.from(this.tagList).length===0){
// //this.$refs.tagIds.focus();
// this.$refs.tagIds.handleShow();
// this.$refs.tagIds.$refs.tag.focus();
// this.$message({
// message: "请添加或创建您的问题标签",
// type: 'warning'
// });
// return false;
// }
if(this.blogClass===''){
this.$refs.blogClass.handleShow();
this.$refs.blogClass.$refs.select.focus();
......
......@@ -336,19 +336,19 @@ export default {
});
return false;
}
if (Array.from(this.tagList).length === 0) {
this.$refs.tagIds.handleShow();
this.$refs.tagIds.$refs.tag.focus();
this.$message({
message: "请添加或创建您的博客标签",
type: 'warning'
});
return false;
}
// if (Array.from(this.tagList).length === 0) {
// this.$refs.tagIds.handleShow();
// this.$refs.tagIds.$refs.tag.focus();
// this.$message({
// message: "请添加或创建您的博客标签",
// type: 'warning'
// });
// return false;
// }
if (this.originLink !== '') {
let reg = /^(?=^.{3,255}$)((http|https|ftp)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/)?(?:\/(.+)\/?$)?(\/\w+\.\w+)*([\?&]\w+=\w*|[\u4e00-\u9fa5]+)*$/;
if (this.originLink === "无" || reg.test(this.originLink)) {
this.dataPostSaveUserInfo();
this.dataPostBlog();
return false;
} else if (!reg.test(this.originLink)) {
this.$refs.originLink.focus();
......@@ -360,11 +360,11 @@ export default {
}
} else {
this.originLink = '无';
this.dataPostSaveUserInfo()
this.dataPostBlog()
}
},
dataPostSaveUserInfo() {
dataPostBlog() {
if (this.$route.query.id) {
this.$axios.$put(config.api.put.Blog.revise + this.$route.query.id, {
allowComment: this.allowComment,//评论权限
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment