Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
c82ed3fc
Commit
c82ed3fc
authored
Oct 24, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: change icon-svg to svg-icon
parent
f99b97d9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
20 additions
and
20 deletions
+20
-20
index.vue
src/components/SvgIcon/index.vue
+1
-1
index.js
src/icons/index.js
+2
-2
index.vue
src/views/dashboard/admin/index.vue
+2
-2
tabPane.vue
src/views/example/tab/components/tabPane.vue
+1
-1
dragTable.vue
src/views/example/table/dragTable.vue
+2
-2
inlineEditTable.vue
src/views/example/table/inlineEditTable.vue
+1
-1
table.vue
src/views/example/table/table.vue
+1
-1
SidebarItem.vue
src/views/layout/components/SidebarItem.vue
+3
-3
index.vue
src/views/login/index.vue
+3
-3
socialsignin.vue
src/views/login/socialsignin.vue
+2
-2
index.vue
src/views/svg-icons/index.vue
+2
-2
No files found.
src/components/
Icon-svg
/index.vue
→
src/components/
SvgIcon
/index.vue
View file @
c82ed3fc
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'
icon-svg
'
,
name
:
'
svg-icon
'
,
props
:
{
props
:
{
iconClass
:
{
iconClass
:
{
type
:
String
,
type
:
String
,
...
...
src/icons/index.js
View file @
c82ed3fc
import
Vue
from
'vue'
import
Vue
from
'vue'
import
IconSvg
from
'@/components/Icon-svg
'
// svg组件
import
SvgIcon
from
'@/components/SvgIcon
'
// svg组件
import
generateIconsView
from
'@/views/svg-icons/generateIconsView.js'
// just for views/icons , you can delete it
import
generateIconsView
from
'@/views/svg-icons/generateIconsView.js'
// just for views/icons , you can delete it
// register globally
// register globally
Vue
.
component
(
'
icon-svg'
,
IconSvg
)
Vue
.
component
(
'
svg-icon'
,
SvgIcon
)
const
requireAll
=
requireContext
=>
requireContext
.
keys
().
map
(
requireContext
)
const
requireAll
=
requireContext
=>
requireContext
.
keys
().
map
(
requireContext
)
const
req
=
require
.
context
(
'./svg'
,
false
,
/
\.
svg$/
)
const
req
=
require
.
context
(
'./svg'
,
false
,
/
\.
svg$/
)
...
...
src/views/dashboard/admin/index.vue
View file @
c82ed3fc
...
@@ -34,12 +34,12 @@
...
@@ -34,12 +34,12 @@
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<count-to
class=
"info-item-num"
:startVal=
'0'
:endVal=
'statisticsData.article_count'
:duration=
'3400'
></count-to>
<count-to
class=
"info-item-num"
:startVal=
'0'
:endVal=
'statisticsData.article_count'
:duration=
'3400'
></count-to>
<span
class=
"info-item-text"
>
文章
</span>
<span
class=
"info-item-text"
>
文章
</span>
<
icon-svg
icon-class=
"trendChart1"
class=
"dashboard-editor-icon"
></icon-svg
>
<
svg-icon
icon-class=
"trendChart1"
class=
"dashboard-editor-icon"
></svg-icon
>
</div>
</div>
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<count-to
class=
"info-item-num"
:startVal=
'0'
:endVal=
'statisticsData.pageviews_count'
:duration=
'3600'
></count-to>
<count-to
class=
"info-item-num"
:startVal=
'0'
:endVal=
'statisticsData.pageviews_count'
:duration=
'3600'
></count-to>
<span
class=
"info-item-text"
>
浏览量
</span>
<span
class=
"info-item-text"
>
浏览量
</span>
<
icon-svg
icon-class=
"trendChart2"
class=
"dashboard-editor-icon"
></icon-svg
>
<
svg-icon
icon-class=
"trendChart2"
class=
"dashboard-editor-icon"
></svg-icon
>
</div>
</div>
</el-card>
</el-card>
</el-col>
</el-col>
...
...
src/views/example/tab/components/tabPane.vue
View file @
c82ed3fc
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
:
key
=
"n"
><
/icon-svg
>
<
svg
-
icon
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
:
key
=
"n"
><
/svg-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
...
src/views/example/table/dragTable.vue
View file @
c82ed3fc
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/icon-svg
>
<
svg
-
icon
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/svg-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<
el
-
table
-
column
align
=
"center"
label
=
"拖拽"
width
=
"95"
>
<
el
-
table
-
column
align
=
"center"
label
=
"拖拽"
width
=
"95"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
icon
-
svg
class
=
'drag-handler'
icon
-
class
=
"drag"
><
/icon-svg
>
<
svg
-
icon
class
=
'drag-handler'
icon
-
class
=
"drag"
><
/svg-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
...
src/views/example/table/inlineEditTable.vue
View file @
c82ed3fc
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
el
-
table
-
column
width
=
"100px"
label
=
"重要性"
>
<
el
-
table
-
column
width
=
"100px"
label
=
"重要性"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/icon-svg
>
<
svg
-
icon
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/svg-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
...
src/views/example/table/table.vue
View file @
c82ed3fc
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
el
-
table
-
column
width
=
"80px"
label
=
"重要性"
>
<
template
scope
=
"scope"
>
<
template
scope
=
"scope"
>
<
icon
-
svg
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/icon-svg
>
<
svg
-
icon
v
-
for
=
"n in +scope.row.importance"
icon
-
class
=
"star"
class
=
"meta-item__icon"
:
key
=
"n"
><
/svg-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
...
src/views/layout/components/SidebarItem.vue
View file @
c82ed3fc
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<router-link
v-if=
"!item.hidden&&item.noDropdown&&item.children.length>0"
:to=
"item.path+'/'+item.children[0].path"
>
<router-link
v-if=
"!item.hidden&&item.noDropdown&&item.children.length>0"
:to=
"item.path+'/'+item.children[0].path"
>
<el-menu-item
:index=
"item.path+'/'+item.children[0].path"
class=
'submenu-title-noDropdown'
>
<el-menu-item
:index=
"item.path+'/'+item.children[0].path"
class=
'submenu-title-noDropdown'
>
<
icon-svg
v-if=
'item.icon'
:icon-class=
"item.icon"
></icon-svg
><span>
{{
item
.
children
[
0
].
name
}}
</span>
<
svg-icon
v-if=
'item.icon'
:icon-class=
"item.icon"
></svg-icon
><span>
{{
item
.
children
[
0
].
name
}}
</span>
</el-menu-item>
</el-menu-item>
</router-link>
</router-link>
<el-submenu
:index=
"item.name"
v-if=
"!item.noDropdown&&!item.hidden"
>
<el-submenu
:index=
"item.name"
v-if=
"!item.noDropdown&&!item.hidden"
>
<template
slot=
"title"
>
<template
slot=
"title"
>
<
icon-svg
v-if=
'item.icon'
:icon-class=
"item.icon"
></icon-svg
><span>
{{
item
.
name
}}
</span>
<
svg-icon
v-if=
'item.icon'
:icon-class=
"item.icon"
></svg-icon
><span>
{{
item
.
name
}}
</span>
</
template
>
</
template
>
<
template
v-for=
"child in item.children"
v-if=
'!child.hidden'
>
<
template
v-for=
"child in item.children"
v-if=
'!child.hidden'
>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<router-link
v-else
:to=
"item.path+'/'+child.path"
>
<router-link
v-else
:to=
"item.path+'/'+child.path"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<el-menu-item
:index=
"item.path+'/'+child.path"
>
<
icon-svg
v-if=
'child.icon'
:icon-class=
"child.icon"
></icon-svg
><span>
{{
child
.
name
}}
</span>
<
svg-icon
v-if=
'child.icon'
:icon-class=
"child.icon"
></svg-icon
><span>
{{
child
.
name
}}
</span>
</el-menu-item>
</el-menu-item>
</router-link>
</router-link>
...
...
src/views/login/index.vue
View file @
c82ed3fc
...
@@ -5,18 +5,18 @@
...
@@ -5,18 +5,18 @@
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<span
class=
"svg-container svg-container_login"
>
<span
class=
"svg-container svg-container_login"
>
<
icon-svg
icon-class=
"user"
/>
<
svg-icon
icon-class=
"user"
/>
</span>
</span>
<el-input
name=
"username"
type=
"text"
v-model=
"loginForm.username"
autoComplete=
"on"
placeholder=
"邮箱"
/>
<el-input
name=
"username"
type=
"text"
v-model=
"loginForm.username"
autoComplete=
"on"
placeholder=
"邮箱"
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<span
class=
"svg-container"
>
<span
class=
"svg-container"
>
<
icon-svg
icon-class=
"password"
/>
<
svg-icon
icon-class=
"password"
/>
</span>
</span>
<el-input
name=
"password"
:type=
"pwdType"
@
keyup
.
enter
.
native=
"handleLogin"
v-model=
"loginForm.password"
autoComplete=
"on"
<el-input
name=
"password"
:type=
"pwdType"
@
keyup
.
enter
.
native=
"handleLogin"
v-model=
"loginForm.password"
autoComplete=
"on"
placeholder=
"密码"
/>
placeholder=
"密码"
/>
<span
class=
'show-pwd'
@
click=
'showPwd'
><
icon-svg
icon-class=
"eye"
/></span>
<span
class=
'show-pwd'
@
click=
'showPwd'
><
svg-icon
icon-class=
"eye"
/></span>
</el-form-item>
</el-form-item>
<el-button
type=
"primary"
style=
"width:100%;margin-bottom:30px;"
:loading=
"loading"
@
click
.
native
.
prevent=
"handleLogin"
>
登录
</el-button>
<el-button
type=
"primary"
style=
"width:100%;margin-bottom:30px;"
:loading=
"loading"
@
click
.
native
.
prevent=
"handleLogin"
>
登录
</el-button>
...
...
src/views/login/socialsignin.vue
View file @
c82ed3fc
<
template
>
<
template
>
<div
class=
"social-signup-container"
>
<div
class=
"social-signup-container"
>
<div
class=
"sign-btn"
@
click=
"wechatHandleClick('wechat')"
>
<div
class=
"sign-btn"
@
click=
"wechatHandleClick('wechat')"
>
<span
class=
"wx-svg-container"
><
icon-svg
icon-class=
"wechat"
class=
"icon"
></icon-svg
></span>
微信
<span
class=
"wx-svg-container"
><
svg-icon
icon-class=
"wechat"
class=
"icon"
></svg-icon
></span>
微信
</div>
</div>
<div
class=
"sign-btn"
@
click=
"tencentHandleClick('tencent')"
>
<div
class=
"sign-btn"
@
click=
"tencentHandleClick('tencent')"
>
<span
class=
"qq-svg-container"
><
icon-svg
icon-class=
"qq"
class=
"icon"
></icon-svg
></span>
QQ
<span
class=
"qq-svg-container"
><
svg-icon
icon-class=
"qq"
class=
"icon"
></svg-icon
></span>
QQ
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/svg-icons/index.vue
View file @
c82ed3fc
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<div
slot=
"content"
>
<div
slot=
"content"
>
{{
generateIconCode
(
item
)
}}
{{
generateIconCode
(
item
)
}}
</div>
</div>
<
icon-svg
:icon-class=
"item"
/>
<
svg-icon
:icon-class=
"item"
/>
</el-tooltip>
</el-tooltip>
<span>
{{
item
}}
</span>
<span>
{{
item
}}
</span>
</div>
</div>
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
},
},
methods
:
{
methods
:
{
generateIconCode
(
symbol
)
{
generateIconCode
(
symbol
)
{
return
`<
icon-svg
:icon-class="
${
symbol
}
" />`
return
`<
svg-icon
:icon-class="
${
symbol
}
" />`
},
},
handleClipboard
(
text
,
event
)
{
handleClipboard
(
text
,
event
)
{
clipboard
(
text
,
event
)
clipboard
(
text
,
event
)
...
...
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