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
b3dcf86d
Commit
b3dcf86d
authored
Feb 07, 2020
by
高浩杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish 7.1 7.3 4.1 4.2
parent
1f0d0018
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
61 deletions
+131
-61
components/pc/select/selectCard.vue
+47
-25
pages/project/release/index.vue
+84
-36
No files found.
components/pc/select/selectCard.vue
View file @
b3dcf86d
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<div
class=
"select-container"
v-if=
"selectType === '1'"
style=
"height: 100px;"
>
<div
class=
"select-container"
v-if=
"selectType === '1'"
style=
"height: 100px;"
>
<div
class=
"select-container__input-box"
>
<div
class=
"select-container__input-box"
>
<div>
<div>
<!--@focus="handleShow"-->
<input
<input
type=
"text"
placeholder=
"添加标签"
type=
"text"
placeholder=
"回车搜索标签"
@
focus=
"handleShow"
@
blur=
"isShow=false"
@
blur=
"isShow=false"
@
keyup
.
enter=
"handleSearch"
@
keyup
.
enter=
"handleSearch"
v-model=
"value.tag"
v-model=
"value.tag"
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</div>
</div>
</transition>
</transition>
</div>
</div>
<button
@
click=
"
handlePush"
>
添加(
{{
result
.
length
}}
)
</button>
<button
@
click=
"
createTag"
>
创建标签
</button>
</div>
</div>
<div
class=
"select-container__label-list"
>
<div
class=
"select-container__label-list"
>
<label-wrap
<label-wrap
...
@@ -82,6 +82,7 @@ export default {
...
@@ -82,6 +82,7 @@ export default {
tag
:
'web'
tag
:
'web'
}],
}],
searchList
:
[],
searchList
:
[],
arr
:
[],
result
:
[],
result
:
[],
value
:
{
value
:
{
tagId
:
''
,
tagId
:
''
,
...
@@ -115,24 +116,30 @@ export default {
...
@@ -115,24 +116,30 @@ export default {
methods
:
{
methods
:
{
// 点击选中标签后 添加标签
// 点击选中标签后 添加标签
handleChange
(
tag
,
tagId
){
handleChange
(
tag
,
tagId
){
Object
.
assign
(
this
.
value
,
{
tagId
,
tag
})
Object
.
assign
(
this
.
value
,
{
tagId
,
tag
});
this
.
handleTags
();
this
.
isShow
=
false
;
this
.
isShow2
=
false
;
},
},
// 删除选中的标签
// 删除选中的标签
handleDelete
(
index
){
handleDelete
(
index
){
this
.
result
.
splice
(
index
,
1
);
this
.
result
.
splice
(
index
,
1
);
},
},
// 回车后,
将搜索到的第一个标签选中
// 回车后,
进行搜索
async
handleSearch
(){
async
handleSearch
(){
if
(
this
.
value
!==
''
)
{
this
.
isShow
=
true
;
this
.
isShow2
=
true
;
console
.
log
(
111
);
if
(
this
.
value
.
tag
!==
""
)
{
let
tagSearch
=
await
this
.
$axios
.
$get
(
config
.
api
.
get
.
Tag
.
search
,
{
let
tagSearch
=
await
this
.
$axios
.
$get
(
config
.
api
.
get
.
Tag
.
search
,
{
params
:
{
params
:
{
keywords
:
this
.
value
,
keywords
:
this
.
value
.
tag
,
page
:
1
,
page
:
1
,
size
:
12
size
:
12
}
}
});
});
console
.
log
(
tagSearch
);
console
.
log
(
tagSearch
);
this
.
isSearch
=
true
;
this
.
isSearch
=
true
;
// 用于 有无搜索结果
this
.
searchList
=
[];
this
.
searchList
=
[];
if
(
tagSearch
.
data
.
dataList
.
length
!==
0
)
{
if
(
tagSearch
.
data
.
dataList
.
length
!==
0
)
{
tagSearch
.
data
.
dataList
.
forEach
(
item
=>
{
tagSearch
.
data
.
dataList
.
forEach
(
item
=>
{
...
@@ -144,22 +151,12 @@ export default {
...
@@ -144,22 +151,12 @@ export default {
this
.
isSearch
=
false
;
this
.
isSearch
=
false
;
}
}
}
}
// if (this.searchList.length) {
// this.result.add(this.searchList[0]);
// this.value = '';
// this.isShow = false;
// this.isShow2 = false;
// setTimeout(()=>{
// this.isShow = true;
// this.isShow2 = true;
// }, 500)
// }
},
},
// 点击
确定
// 点击
标签 自动选择
handle
Push
(){
handle
Tags
(){
this
.
result
.
push
(
this
.
value
);
this
.
arr
.
push
(
this
.
value
);
let
map
=
new
Map
();
let
map
=
new
Map
();
for
(
let
item
of
this
.
result
)
{
for
(
let
item
of
this
.
arr
)
{
console
.
log
(
item
);
console
.
log
(
item
);
if
(
!
map
.
has
(
item
.
tag
))
{
if
(
!
map
.
has
(
item
.
tag
))
{
map
.
set
(
item
.
tag
,
item
)
map
.
set
(
item
.
tag
,
item
)
...
@@ -167,7 +164,7 @@ export default {
...
@@ -167,7 +164,7 @@ export default {
}
}
this
.
result
=
[...
map
.
values
()];
this
.
result
=
[...
map
.
values
()];
this
.
isShow
=
false
;
this
.
isShow
=
false
;
this
.
value
=
''
;
this
.
value
=
{}
;
this
.
$emit
(
'handleTag'
,
this
.
result
);
this
.
$emit
(
'handleTag'
,
this
.
result
);
},
},
handleChange2
(
e
){
handleChange2
(
e
){
...
@@ -176,6 +173,31 @@ export default {
...
@@ -176,6 +173,31 @@ export default {
this
.
isShow2
=
false
;
this
.
isShow2
=
false
;
this
.
$emit
(
'handleClass'
,
this
.
value
);
this
.
$emit
(
'handleClass'
,
this
.
value
);
},
},
createTag
()
{
this
.
$popupbox
({
title
:
'创建标签'
,
name
:
''
,
onSubmit
:
(
value
)
=>
{
this
.
$axios
.
$post
(
config
.
api
.
post
.
Tag
.
create
,
{
tagName
:
value
,
tagType
:
0
}).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'标签创建成功'
})
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
res
.
msg
})
}
})
}
})
},
handleShow
(){
handleShow
(){
this
.
isShow
=
true
;
this
.
isShow
=
true
;
this
.
isShow2
=
true
;
this
.
isShow2
=
true
;
...
@@ -187,7 +209,6 @@ export default {
...
@@ -187,7 +209,6 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.select-container
{
.select-container
{
.select-container__input-box{
.select-container__input-box{
width
:
350
*$
length
;
@extend
%flex-row-spb;
@extend
%flex-row-spb;
>
div
{
>
div
{
position
:
relative
;
position
:
relative
;
...
@@ -235,9 +256,10 @@ export default {
...
@@ -235,9 +256,10 @@ export default {
}
}
>
button
{
>
button
{
border
:
none
;
border
:
none
;
@include
fontStyle(14,19,500,#999,left);
background-color
:
#fff
;
background-color
:
#fff
;
margin-left
:
16
*$
length
;
@extend
%animate-transition;
@extend
%animate-transition;
@include
fontStyle(14,19,500,#999,left);
&:hover{
&:hover{
@extend
%cursorPointer;
@extend
%cursorPointer;
color
:
#00AAE6
;
color
:
#00AAE6
;
...
...
pages/project/release/index.vue
View file @
b3dcf86d
...
@@ -176,12 +176,24 @@ export default {
...
@@ -176,12 +176,24 @@ export default {
},
},
methods
:
{
methods
:
{
// 获取选项框得 值
// 获取选项框得 值
handleAgreement
(
val
)
{
this
.
agreement
=
val
},
handleAgreement
(
val
)
{
handleLanguage
(
val
)
{
this
.
language
=
val
},
this
.
agreement
=
val
handleSystem
(
val
)
{
this
.
system
=
val
},
},
handleAgreement2
(
val
)
{
this
.
agreement2
=
val
},
handleLanguage
(
val
)
{
handleProjectClass
(
val
)
{
this
.
projectClass
=
val
},
this
.
language
=
val
handleChildClass
(
val
)
{
this
.
childClass
=
val
},
},
handleSystem
(
val
)
{
this
.
system
=
val
},
handleAgreement2
(
val
)
{
this
.
agreement2
=
val
},
handleProjectClass
(
val
)
{
this
.
projectClass
=
val
},
handleChildClass
(
val
)
{
this
.
childClass
=
val
},
imgAdd
(
pos
,
file
)
{
imgAdd
(
pos
,
file
)
{
//添加图片,pos为位置
//添加图片,pos为位置
// 第一步.将图片上传到服务器.
// 第一步.将图片上传到服务器.
...
@@ -215,17 +227,34 @@ export default {
...
@@ -215,17 +227,34 @@ export default {
this
.
lastSaveTime
=
now
;
this
.
lastSaveTime
=
now
;
}
}
},
},
changeToUploadCover
(
e
){
changeToUploadCover
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
this
.
imgSrc
=
'http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg'
;
this
.
imgSrc
=
'http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg'
;
},
},
readScreen
(
boolean
,
str
){
// 预览
readScreen
(
boolean
,
str
)
{
// 预览
this
.
zIndex
=
8000
this
.
zIndex
=
8000
},
},
// 发布项目
// 发布项目
async
postProject
()
{
async
postProject
()
{
let
projectRes
;
let
projectRes
;
try
{
if
(
this
.
$route
.
query
.
id
)
{
// 修改执行这个接口
projectRes
=
await
this
.
$axios
.
$put
(
config
.
api
.
put
.
Project
.
revise
,
{
"author"
:
"string"
,
"categoryId"
:
1
,
"cover"
:
"string"
,
"devLang"
:
"string"
,
"docLink"
:
"string"
,
"homeLink"
:
"string"
,
"license"
:
"string"
,
"projectDescription"
:
"string"
,
"projectDetail"
:
"string"
,
"projectName"
:
"string"
,
"projectType"
:
"string"
,
"runtimePlatform"
:
"string"
,
"sourceLink"
:
"string"
})
}
else
{
projectRes
=
await
this
.
$axios
.
$post
(
config
.
api
.
post
.
Project
.
release
,
{
projectRes
=
await
this
.
$axios
.
$post
(
config
.
api
.
post
.
Project
.
release
,
{
"author"
:
"string"
,
"author"
:
"string"
,
"categoryId"
:
1
,
"categoryId"
:
1
,
...
@@ -241,8 +270,6 @@ export default {
...
@@ -241,8 +270,6 @@ export default {
"runtimePlatform"
:
"string"
,
"runtimePlatform"
:
"string"
,
"sourceLink"
:
"string"
"sourceLink"
:
"string"
})
})
}
catch
(
err
)
{
console
.
log
(
err
);
}
}
if
(
projectRes
.
code
===
0
)
{
if
(
projectRes
.
code
===
0
)
{
...
@@ -268,21 +295,27 @@ export default {
...
@@ -268,21 +295,27 @@ export default {
margin
:
24
*$
length
auto
32
*$
length
auto
;
margin
:
24
*$
length
auto
32
*$
length
auto
;
@extend
%flex-row-spb;
@extend
%flex-row-spb;
align-items
:
start
;
align-items
:
start
;
.blog-release-container__l
{
.blog-release-container__l
{
}
}
.blog-release-container__r
{
.blog-release-container__r
{
.blog-release
{
.blog-release
{
width
:
748
*$
length
;
width
:
748
*$
length
;
margin
:
0
auto
;
margin
:
0
auto
;
.blog-release__header
{
.blog-release__header
{
margin-top
:
40
*$
length
;
margin-top
:
40
*$
length
;
.header-content{
.header-content
{
@extend
%flex-row-spb;
@extend
%flex-row-spb;
margin-bottom
:
32
*$
length
;
margin-bottom
:
32
*$
length
;
span{
span
{
color
:
#FF7474
;
color
:
#FF7474
;
font-size
:
6
*$
length
;
font-size
:
6
*$
length
;
}
}
input
{
input
{
width
:
726
*$
length
;
width
:
726
*$
length
;
padding
:
14
*$
length
16
*$
length
;
padding
:
14
*$
length
16
*$
length
;
...
@@ -290,31 +323,38 @@ export default {
...
@@ -290,31 +323,38 @@ export default {
@include
border-radius(4*$length);
@include
border-radius(4*$length);
@include
fontStyle(14,
46,
500,
#666,
left);
@include
fontStyle(14,
46,
500,
#666,
left);
}
}
.select__wrap
{
.select__wrap
{
width
:
218
*$
length
;
width
:
218
*$
length
;
@extend
%flex-row-spb;
@extend
%flex-row-spb;
>
span
{
>
span
{
color
:
#FF7474
;
color
:
#FF7474
;
font-size
:
6
*$
length
;
font-size
:
6
*$
length
;
}
}
}
}
.header-content__left
{
.header-content__left
{
width
:
483
*$
length
;
width
:
483
*$
length
;
@extend
%flex-row-spb;
@extend
%flex-row-spb;
}
}
}
}
}
}
.blog-release__content
{
.blog-release__content
{
@extend
%flex-row-spb;
@extend
%flex-row-spb;
align-items
:
start
;
align-items
:
start
;
>
span
{
>
span
{
margin-top
:
18
*$
length
;
margin-top
:
18
*$
length
;
color
:
#FF7474
;
color
:
#FF7474
;
font-size
:
6
*$
length
;
font-size
:
6
*$
length
;
}
}
.editor-container
{
.editor-container
{
width
:
723
*$
length
;
width
:
723
*$
length
;
height
:
230
*$
length
;
height
:
230
*$
length
;
.editor
{
.editor
{
min-height
:
230
*$
length
;
min-height
:
230
*$
length
;
min-width
:
723
*$
length
;
min-width
:
723
*$
length
;
...
@@ -329,52 +369,60 @@ export default {
...
@@ -329,52 +369,60 @@ export default {
align-items
:
flex-end
;
align-items
:
flex-end
;
margin-top
:
32
*$
length
;
margin-top
:
32
*$
length
;
margin-left
:
20
*$
length
;
margin-left
:
20
*$
length
;
.footer__left{
position
:
relative
;
.footer__left
{
width
:
196
*$
length
;
position
:
relative
;
width
:
196
*$
length
;
background-color
:
#F4F8FA
;
background-color
:
#F4F8FA
;
@extend
%cursorPointer;
@extend
%cursorPointer;
@include
border-radius(4*$length);
@include
border-radius(4*$length);
@include
fontStyle(12,196,500,#666,center);
@include
fontStyle(12,
196,
500,
#666,
center);
&
input{
position
:
absolute
;
&
input
{
position
:
absolute
;
@extend
%cursorPointer;
@extend
%cursorPointer;
opacity
:
0
;
opacity
:
0
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
height
:
100%
;
height
:
100%
;
width
:
100%
;
width
:
100%
;
}
}
&
img
{
position
:
absolute
;
&
img
{
height
:
100%
;
position
:
absolute
;
width
:
100%
;
height
:
100%
;
top
:
0
;
width
:
100%
;
left
:
0
;
top
:
0
;
left
:
0
;
object-fit
:
contain
;
object-fit
:
contain
;
}
}
}
}
.footer__right
{
.footer__right
{
@extend
%flex-row-spb;
@extend
%flex-row-spb;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
>
p
{
>
p
{
margin-right
:
32
*$
length
;
margin-right
:
32
*$
length
;
@include
fontStyle(12,
16,500,#999,
left);
@include
fontStyle(12,
16,
500,
#999,
left);
}
}
>
button
{
>
button
{
width
:
100
*$
length
;
width
:
100
*$
length
;
background-color
:
#00AAE6
;
background-color
:
#00AAE6
;
border
:
none
;
border
:
none
;
@extend
%cursorPointer;
@extend
%cursorPointer;
@include
border-radius(4*$length);
@include
border-radius(4*$length);
@include
fontStyle(14,
40,500,#fff,
center);
@include
fontStyle(14,
40,
500,
#fff,
center);
}
}
.preview
{
.preview
{
color
:
#666
;
color
:
#666
;
background-color
:
#fff
;
background-color
:
#fff
;
margin-right
:
16
*$
length
;
margin-right
:
16
*$
length
;
@extend
%animate-transition;
@extend
%animate-transition;
&:hover{
&:hover
{
color
:
#fff
;
color
:
#fff
;
background-color
:
#00AAE6
;
background-color
:
#00AAE6
;
}
}
...
...
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