Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
e4f9a851
提交
e4f9a851
编写于
12月 10, 2018
作者:
gjyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
result
上级
5844cb68
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
235 行增加
和
17 行删除
+235
-17
webpack.prod.conf.js
build/webpack.prod.conf.js
+2
-2
group-title.vue
src/components/business/group-title.vue
+30
-0
no-more-item.vue
src/components/business/no-more-item.vue
+22
-0
search-header.vue
src/components/business/search-header.vue
+8
-3
search-label.vue
src/components/business/search-label.vue
+1
-1
show-all-item.vue
src/components/business/show-all-item.vue
+32
-0
split-line.vue
src/components/business/split-line.vue
+2
-7
router.js
src/router/router.js
+1
-1
result.vue
src/views/result.vue
+127
-0
search-index.vue
src/views/search-index.vue
+10
-3
未找到文件。
build/webpack.prod.conf.js
浏览文件 @
e4f9a851
...
@@ -18,8 +18,8 @@ var webpackConfig = merge(baseWebpackConfig, {
...
@@ -18,8 +18,8 @@ var webpackConfig = merge(baseWebpackConfig, {
//devtool: config.build.productionSourceMap ? '#source-map' : false,
//devtool: config.build.productionSourceMap ? '#source-map' : false,
output
:
{
output
:
{
path
:
config
.
build
.
assetsRoot
,
path
:
config
.
build
.
assetsRoot
,
filename
:
utils
.
assetsPath
(
'js/[name].js'
),
filename
:
utils
.
assetsPath
(
'js/[name].js
?chunkhash=[chunkhash]
'
),
chunkFilename
:
utils
.
assetsPath
(
'js/[name].[chunkhash].min.js'
)
chunkFilename
:
utils
.
assetsPath
(
'js/[name].[chunkhash].min.js
?chunkhash=[chunkhash]
'
)
},
},
vue
:
{
vue
:
{
loaders
:
utils
.
cssLoaders
({
loaders
:
utils
.
cssLoaders
({
...
...
src/components/business/group-title.vue
0 → 100644
浏览文件 @
e4f9a851
<
template
>
<section>
<span>
{{
groupTitle
}}
(
{{
groupNum
}}
)
</span>
</section>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
}
},
props
:
{
groupTitle
:
{
type
:
String
,
default
:
'课程'
},
groupNum
:
{
type
:
Number
,
default
:
0
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
// @import '../../style/global.scss';
</
style
>
src/components/business/no-more-item.vue
0 → 100644
浏览文件 @
e4f9a851
<
template
>
<section>
<span>
-
</span>
<span>
{{
noMoreText
}}
</span>
<span>
-
</span>
</section>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
noMoreText
:
'已经到底了'
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
// @import '../../style/global.scss';
</
style
>
src/components/business/search-header.vue
浏览文件 @
e4f9a851
<
template
>
<
template
>
<article
class=
"search-wrapper"
>
<article
class=
"search-wrapper"
>
<section
class=
"search-wrapper-input"
>
<section
class=
"search-wrapper-input"
>
<
img
src=
'../../images/search-grey.png'
>
<
form
action=
""
@
submit
.
stop=
"search"
>
<form
action=
""
@
submit=
"search"
>
<img
src=
'../../images/search-grey.png'
>
<input
type=
"search"
v-model=
"searchText"
/>
<input
type=
"search"
v-model=
"searchText"
/>
</form>
</form>
</section>
</section>
...
@@ -19,9 +19,12 @@ export default {
...
@@ -19,9 +19,12 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 取消
cancel
()
{
cancel
()
{
console
.
log
(
'in cancel'
)
this
.
searchText
=
''
this
.
searchText
=
''
},
},
// 搜索
search
()
{
search
()
{
this
.
$emit
(
'search'
,
this
.
searchText
)
this
.
$emit
(
'search'
,
this
.
searchText
)
}
}
...
@@ -29,7 +32,6 @@ export default {
...
@@ -29,7 +32,6 @@ export default {
}
}
</
script
>
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
@import
'../../style/mixin.scss'
;
// @import '../../style/global.scss';
// @import '../../style/global.scss';
...
@@ -65,6 +67,9 @@ export default {
...
@@ -65,6 +67,9 @@ export default {
font-size
:
px2rem
(
13px
);
font-size
:
px2rem
(
13px
);
font-weight
:
400
;
font-weight
:
400
;
background
:
rgba
(
245
,
246
,
246
,
1
);
background
:
rgba
(
245
,
246
,
246
,
1
);
&
[
type
=
"search"
]
::-webkit-search-cancel-button
{
display
:
none
;
}
}
}
}
}
&
-cancle
{
&
-cancle
{
...
...
src/components/business/search-label.vue
浏览文件 @
e4f9a851
<
template
>
<
template
>
<article
v-if=
"allLabels
&&allLabels.length>
0"
class=
"search-tag search-label"
>
<article
v-if=
"allLabels
&& allLabels.length >
0"
class=
"search-tag search-label"
>
<!--
<section
:style=
"
{'text-align': direction}" class="search-tag-title">
<!--
<section
:style=
"
{'text-align': direction}" class="search-tag-title">
{{
title
}}
{{
title
}}
</section>
-->
</section>
-->
...
...
src/components/business/show-all-item.vue
0 → 100644
浏览文件 @
e4f9a851
<
template
>
<section
>
<span></span>
<span
@
click=
"showAllItem"
>
{{
noMoreText
}}
</span>
</section>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
noMoreText
:
'查看全部'
}
},
props
:
{
showIndex
:
{
type
:
Number
,
default
:
0
}
},
methods
:
{
showAllItem
()
{
this
.
$emit
(
'showAllItem'
,
this
.
showIndex
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
// @import '../../style/global.scss';
</
style
>
src/components/business/split-line.vue
浏览文件 @
e4f9a851
<
template
>
<
template
>
<section
:style=
"
{'line-width':lineWidth,
'border-color': borderColor, 'border-style': borderStyle, 'border-width': borderWidth}">
<section
style=
"border-bottom: 0"
:style=
"
{
'border-color': borderColor, 'border-style': borderStyle, 'border-width': borderWidth}">
</section>
</section>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
lineWidth
:
{
type
:
String
,
default
:
'px2rem(375px)'
},
borderWidth
:
{
borderWidth
:
{
type
:
String
,
type
:
String
,
default
:
'
1
px'
default
:
'
0.5
px'
},
},
borderStyle
:
{
borderStyle
:
{
type
:
String
,
type
:
String
,
...
@@ -26,7 +22,6 @@ export default {
...
@@ -26,7 +22,6 @@ export default {
}
}
</
script
>
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
@import
'../../style/mixin.scss'
;
// @import '../../style/global.scss';
// @import '../../style/global.scss';
...
...
src/router/router.js
浏览文件 @
e4f9a851
...
@@ -2,7 +2,7 @@ import App from '../App'
...
@@ -2,7 +2,7 @@ import App from '../App'
const
index
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/index'
)),
'index'
)
const
index
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/index'
)),
'index'
)
const
search
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/search-index'
)),
'search'
)
const
search
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/search-index'
)),
'search'
)
const
result
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/
search-index
'
)),
'result'
)
const
result
=
r
=>
require
.
ensure
([],
()
=>
r
(
require
(
'../views/
result
'
)),
'result'
)
export
default
[{
export
default
[{
path
:
'/'
,
path
:
'/'
,
...
...
src/views/result.vue
0 → 100644
浏览文件 @
e4f9a851
<
template
>
<section>
<SearchHeader
@
search=
"search"
/>
<SplitLine/>
<!-- 没有结果页面 -->
<section
v-show=
"!hasResult"
>
<!--
<NoResultPage/>
<RecommendCourse/>
-->
</section>
<!-- 有结果页面 -->
<section
v-show=
"hasResult"
>
<mt-navbar
v-model=
"selected"
:fixed=
"false"
>
<mt-tab-item
id=
"0"
>
综合
</mt-tab-item>
<mt-tab-item
id=
"1"
>
课程
</mt-tab-item>
<mt-tab-item
id=
"2"
>
五分钟医学
</mt-tab-item>
<mt-tab-item
id=
"3"
>
讲师
</mt-tab-item>
<mt-tab-item
id=
"4"
>
健康漫画
</mt-tab-item>
</mt-navbar>
<!-- tab-container -->
<mt-tab-container
v-model=
"selected"
>
<mt-tab-container-item
id=
"0"
>
<!-- 课程 -->
<SplitLine
borderWidth=
"3px"
/>
<!-- 五分钟医学 -->
<SplitLine
borderWidth=
"3px"
/>
<!-- 讲师 -->
<SplitLine
borderWidth=
"3px"
/>
<!-- 健康漫画 -->
<ShowAllItem/>
<NoMoreItem/>
<GroupTitle/>
</mt-tab-container-item>
<mt-tab-container-item
id=
"1"
>
bbbb
</mt-tab-container-item>
<mt-tab-container-item
id=
"2"
>
cccc
</mt-tab-container-item>
<mt-tab-container-item
id=
"3"
>
dddd
</mt-tab-container-item>
<mt-tab-container-item
id=
"4"
>
eee
</mt-tab-container-item>
</mt-tab-container>
</section>
</section>
</
template
>
<
script
>
import
SearchHeader
from
'../components/business/search-header'
;
import
SplitLine
from
'../components/business/split-line'
;
import
NoMoreItem
from
'../components/business/no-more-item'
;
import
ShowAllItem
from
'../components/business/show-all-item'
;
import
GroupTitle
from
'../components/business/group-title'
;
import
{
Navbar
,
TabItem
}
from
'mint-ui'
;
export
default
{
data
()
{
return
{
hasResult
:
true
,
searchText
:
''
,
selected
:
'0'
}
},
components
:
{
SearchHeader
,
SplitLine
,
Navbar
,
TabItem
,
NoMoreItem
,
ShowAllItem
,
GroupTitle
},
watch
:
{
selected
(
val
)
{
this
.
showIndex
(
val
)
}
},
created
(){
this
.
searchText
=
this
.
$route
.
query
.
searchText
||
''
},
mounted
(){
this
.
search
()
},
methods
:
{
// 搜索
search
()
{
console
.
log
(
'in result search: '
+
this
.
searchText
)
},
showIndex
(
index
)
{
console
.
log
(
index
)
}
},
}
</
script
>
<
style
lang=
"scss"
>
@import
'../style/mixin.scss'
;
.mint-tab-item-label
{
color
:
inherit
;
font-size
:
px2rem
(
14px
);
line-height
:
1
;
}
.mint-navbar
{
background-color
:
#fff
;
display
:
-
webkit-box
;
display
:
-
ms-flexbox
;
display
:
flex
;
text-align
:
center
;
border-bottom
:
px2rem
(
1px
)
solid
#f0f0f0
!
important
;
}
.mint-navbar
.mint-tab-item.is-selected
{
border-bottom
:
px2rem
(
2px
)
solid
#449284
;
color
:
#449284
;
margin-bottom
:
px2rem
(
-1px
);
}
.mint-navbar
.mint-tab-item
{
padding
:
px2rem
(
19px
)
0
px2rem
(
11px
);
font-size
:
px2rem
(
14px
);
}
</
style
>
<
style
lang=
"scss"
scoped
>
@import
'../style/mixin.scss'
;
@import
'../style/global.scss'
;
</
style
>
src/views/search-index.vue
浏览文件 @
e4f9a851
<
template
>
<
template
>
<div>
<div>
<SearchHeader
@
search=
"search"
/>
<SearchHeader
@
search=
"search"
/>
<SplitLine/>
<SplitLine
/>
<!--
<HistorySearch/>
-->
<HisttoryLabels
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
<HisttoryLabels
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
<HotLabels
title=
"热门搜索"
:showDelete=
"false"
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
<HotLabels
title=
"热门搜索"
:showDelete=
"false"
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
</div>
</div>
...
@@ -29,15 +28,23 @@ export default {
...
@@ -29,15 +28,23 @@ export default {
HotLabels
HotLabels
},
},
created
(){
created
(){
},
},
mounted
(){
mounted
(){
},
},
methods
:
{
methods
:
{
// 跳转到结果页面,并
search
(
searchText
)
{
search
(
searchText
)
{
console
.
log
(
searchText
)
console
.
log
(
searchText
)
if
(
!
searchText
)
return
;
this
.
$router
.
push
({
path
:
'/result'
,
query
:
{
searchText
:
searchText
}
})
}
}
},
},
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录