Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
1b5e4c39
Commit
1b5e4c39
authored
Feb 14, 2020
by
高浩杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
博客问答标签必选取消 修改推荐标签样式
parent
ebb9a65c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
42 deletions
+32
-42
components/pc/select/selectCard.vue
+1
-0
components/pc/select/selectContent.vue
+6
-17
pages/answer/release/index.vue
+13
-13
pages/blog/release/index.vue
+12
-12
No files found.
components/pc/select/selectCard.vue
View file @
1b5e4c39
...
@@ -219,6 +219,7 @@ export default {
...
@@ -219,6 +219,7 @@ export default {
this
.
list
.
push
({
this
.
list
.
push
({
tagId
:
item
.
tagId
,
tagId
:
item
.
tagId
,
tag
:
item
.
tagName
,
tag
:
item
.
tagName
,
referenceCount
:
item
.
referenceCount
,
tagType
:
item
.
tagType
tagType
:
item
.
tagType
})
})
})
})
...
...
components/pc/select/selectContent.vue
View file @
1b5e4c39
<
template
>
<
template
>
<div
class=
"tag-box"
>
<div
class=
"tag-box"
>
<p
v-if=
"!isHot"
@
click=
"handleClick"
>
{{
item
.
tag
}}
</p>
<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>
</div>
</
template
>
</
template
>
...
@@ -21,17 +21,6 @@ export default {
...
@@ -21,17 +21,6 @@ export default {
console
.
log
(
this
.
item
);
console
.
log
(
this
.
item
);
this
.
$emit
(
'select'
,
this
.
item
.
tag
,
this
.
item
.
tagId
);
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
>
</
script
>
...
@@ -41,12 +30,12 @@ export default {
...
@@ -41,12 +30,12 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
>
div
{
>
div
{
display
:
inline-block
;
display
:
inline-block
;
margin
:
5
*$
length
7
*$
length
;
margin
:
2
*$
length
5
*$
length
8
*$
length
8
*$
length
;
padding
:
5
*$
length
7
*$
length
;
padding
:
2
*$
length
9
*$
length
;
@extend
%cursorPointer;
@extend
%cursorPointer;
@include
border-radius(
4
*$length);
@include
border-radius(
2
*$length);
background-color
:
orange
;
background-color
:
#F4F8FA
;
@include
fontStyle(1
4,
20,
500,
#fff
,
center);
@include
fontStyle(1
2,
22,
500,
#999
,
center);
}
}
>
p
{
>
p
{
width
:
275
*$
length
;
width
:
275
*$
length
;
...
...
pages/answer/release/index.vue
View file @
1b5e4c39
...
@@ -187,9 +187,9 @@
...
@@ -187,9 +187,9 @@
//参数判断
//参数判断
dataPostQuestion
(){
dataPostQuestion
(){
console
.
log
(
this
.
tagList
);
//
console.log(this.tagList);
console
.
log
(
Array
.
from
(
this
.
tagList
));
//
console.log(Array.from(this.tagList));
console
.
log
(
this
.
questionTitle
.
slice
(
this
.
questionTitle
.
length
-
1
,
this
.
questionTitle
.
length
));
//
console.log(this.questionTitle.slice(this.questionTitle.length-1,this.questionTitle.length));
if
(
this
.
questionTitle
===
''
if
(
this
.
questionTitle
===
''
){
){
this
.
$refs
.
questionTitle
.
focus
();
this
.
$refs
.
questionTitle
.
focus
();
...
@@ -207,16 +207,16 @@
...
@@ -207,16 +207,16 @@
});
});
return
false
;
return
false
;
}
}
if
(
Array
.
from
(
this
.
tagList
).
length
===
0
){
//
if(Array.from(this.tagList).length===0){
//this.$refs.tagIds.focus();
//
//this.$refs.tagIds.focus();
this
.
$refs
.
tagIds
.
handleShow
();
//
this.$refs.tagIds.handleShow();
this
.
$refs
.
tagIds
.
$refs
.
tag
.
focus
();
//
this.$refs.tagIds.$refs.tag.focus();
this
.
$message
({
//
this.$message({
message
:
"请添加或创建您的问题标签"
,
//
message: "请添加或创建您的问题标签",
type
:
'warning'
//
type: 'warning'
});
//
});
return
false
;
//
return false;
}
//
}
if
(
this
.
blogClass
===
''
){
if
(
this
.
blogClass
===
''
){
this
.
$refs
.
blogClass
.
handleShow
();
this
.
$refs
.
blogClass
.
handleShow
();
this
.
$refs
.
blogClass
.
$refs
.
select
.
focus
();
this
.
$refs
.
blogClass
.
$refs
.
select
.
focus
();
...
...
pages/blog/release/index.vue
View file @
1b5e4c39
...
@@ -336,19 +336,19 @@ export default {
...
@@ -336,19 +336,19 @@ export default {
});
});
return
false
;
return
false
;
}
}
if
(
Array
.
from
(
this
.
tagList
).
length
===
0
)
{
//
if (Array.from(this.tagList).length === 0) {
this
.
$refs
.
tagIds
.
handleShow
();
//
this.$refs.tagIds.handleShow();
this
.
$refs
.
tagIds
.
$refs
.
tag
.
focus
();
//
this.$refs.tagIds.$refs.tag.focus();
this
.
$message
({
//
this.$message({
message
:
"请添加或创建您的博客标签"
,
//
message: "请添加或创建您的博客标签",
type
:
'warning'
//
type: 'warning'
});
//
});
return
false
;
//
return false;
}
//
}
if
(
this
.
originLink
!==
''
)
{
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
*|
[\u
4e00-
\u
9fa5
]
+
)
*$/
;
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
*|
[\u
4e00-
\u
9fa5
]
+
)
*$/
;
if
(
this
.
originLink
===
"无"
||
reg
.
test
(
this
.
originLink
))
{
if
(
this
.
originLink
===
"无"
||
reg
.
test
(
this
.
originLink
))
{
this
.
dataPost
SaveUserInfo
();
this
.
dataPost
Blog
();
return
false
;
return
false
;
}
else
if
(
!
reg
.
test
(
this
.
originLink
))
{
}
else
if
(
!
reg
.
test
(
this
.
originLink
))
{
this
.
$refs
.
originLink
.
focus
();
this
.
$refs
.
originLink
.
focus
();
...
@@ -360,11 +360,11 @@ export default {
...
@@ -360,11 +360,11 @@ export default {
}
}
}
else
{
}
else
{
this
.
originLink
=
'无'
;
this
.
originLink
=
'无'
;
this
.
dataPost
SaveUserInfo
()
this
.
dataPost
Blog
()
}
}
},
},
dataPost
SaveUserInfo
()
{
dataPost
Blog
()
{
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
$axios
.
$put
(
config
.
api
.
put
.
Blog
.
revise
+
this
.
$route
.
query
.
id
,
{
this
.
$axios
.
$put
(
config
.
api
.
put
.
Blog
.
revise
+
this
.
$route
.
query
.
id
,
{
allowComment
:
this
.
allowComment
,
//评论权限
allowComment
:
this
.
allowComment
,
//评论权限
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment