Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
圆滚滚核心
vue-element-admin
提交
55fa5acb
V
vue-element-admin
项目概览
圆滚滚核心
/
vue-element-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
55fa5acb
编写于
4月 02, 2019
作者:
P
Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf: optimize the code of el-table slot-scope
上级
a8c6e11e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
46 addition
and
46 deletion
+46
-46
src/components/ErrorLog/index.vue
src/components/ErrorLog/index.vue
+4
-4
src/views/dashboard/admin/components/TransactionTable.vue
src/views/dashboard/admin/components/TransactionTable.vue
+3
-3
src/views/example/list.vue
src/views/example/list.vue
+6
-6
src/views/tab/components/tabPane.vue
src/views/tab/components/tabPane.vue
+6
-6
src/views/table/complexTable.vue
src/views/table/complexTable.vue
+13
-13
src/views/table/dragTable.vue
src/views/table/dragTable.vue
+3
-3
src/views/table/inlineEditTable.vue
src/views/table/inlineEditTable.vue
+11
-11
未找到文件。
src/components/ErrorLog/index.vue
浏览文件 @
55fa5acb
...
...
@@ -9,25 +9,25 @@
<el-dialog
:visible.sync=
"dialogTableVisible"
title=
"Error Log"
width=
"80%"
>
<el-table
:data=
"errorLogs"
border
>
<el-table-column
label=
"Message"
>
<template
slot-scope=
"
scope
"
>
<template
slot-scope=
"
{row}
">
<div>
<span
class=
"message-title"
>
Msg:
</span>
<el-tag
type=
"danger"
>
{{
scope
.
row
.
err
.
message
}}
{{
row
.
err
.
message
}}
</el-tag>
</div>
<br>
<div>
<span
class=
"message-title"
style=
"padding-right: 10px;"
>
Info:
</span>
<el-tag
type=
"warning"
>
{{
scope
.
row
.
vm
.
$vnode
.
tag
}}
error in
{{
scope
.
row
.
info
}}
{{
row
.
vm
.
$vnode
.
tag
}}
error in
{{
row
.
info
}}
</el-tag>
</div>
<br>
<div>
<span
class=
"message-title"
style=
"padding-right: 16px;"
>
Url:
</span>
<el-tag
type=
"success"
>
{{
scope
.
row
.
url
}}
{{
row
.
url
}}
</el-tag>
</div>
</
template
>
...
...
src/views/dashboard/admin/components/TransactionTable.vue
浏览文件 @
55fa5acb
...
...
@@ -11,9 +11,9 @@
</
template
>
</el-table-column>
<el-table-column
label=
"Status"
width=
"100"
align=
"center"
>
<
template
slot-scope=
"
scope
"
>
<el-tag
:type=
"
scope.
row.status | statusFilter"
>
{{
scope
.
row
.
status
}}
<
template
slot-scope=
"
{row}
"
>
<el-tag
:type=
"row.status | statusFilter"
>
{{
row
.
status
}}
</el-tag>
</
template
>
</el-table-column>
...
...
src/views/example/list.vue
浏览文件 @
55fa5acb
...
...
@@ -26,17 +26,17 @@
<
/el-table-column
>
<
el
-
table
-
column
class
-
name
=
"
status-col
"
label
=
"
Status
"
width
=
"
110
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
:
type
=
"
scope.
row.status | statusFilter
"
>
{{
scope
.
row
.
status
}}
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
tag
:
type
=
"
row.status | statusFilter
"
>
{{
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
min
-
width
=
"
300px
"
label
=
"
Title
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
router
-
link
:
to
=
"
'/example/edit/'+
scope.
row.id
"
class
=
"
link-type
"
>
<
span
>
{{
scope
.
row
.
title
}}
<
/span
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
router
-
link
:
to
=
"
'/example/edit/'+row.id
"
class
=
"
link-type
"
>
<
span
>
{{
row
.
title
}}
<
/span
>
<
/router-link
>
<
/template
>
<
/el-table-column
>
...
...
src/views/tab/components/tabPane.vue
浏览文件 @
55fa5acb
...
...
@@ -19,9 +19,9 @@
<
/el-table-column
>
<
el
-
table
-
column
min
-
width
=
"
300px
"
label
=
"
Title
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
>
{{
scope
.
row
.
title
}}
<
/span
>
<
el
-
tag
>
{{
scope
.
row
.
type
}}
<
/el-tag
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
span
>
{{
row
.
title
}}
<
/span
>
<
el
-
tag
>
{{
row
.
type
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
...
...
@@ -44,9 +44,9 @@
<
/el-table-column
>
<
el
-
table
-
column
class
-
name
=
"
status-col
"
label
=
"
Status
"
width
=
"
110
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
:
type
=
"
scope.
row.status | statusFilter
"
>
{{
scope
.
row
.
status
}}
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
tag
:
type
=
"
row.status | statusFilter
"
>
{{
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
...
...
src/views/table/complexTable.vue
浏览文件 @
55fa5acb
...
...
@@ -46,9 +46,9 @@
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('table.title')
"
min
-
width
=
"
150px
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
link-type
"
@
click
=
"
handleUpdate(
scope.row)
"
>
{{
scope
.
row
.
title
}}
<
/span
>
<
el
-
tag
>
{{
scope
.
row
.
type
|
typeFilter
}}
<
/el-tag
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
span
class
=
"
link-type
"
@
click
=
"
handleUpdate(
row)
"
>
{{
row
.
title
}}
<
/span
>
<
el
-
tag
>
{{
row
.
type
|
typeFilter
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('table.author')
"
width
=
"
110px
"
align
=
"
center
"
>
...
...
@@ -67,30 +67,30 @@
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('table.readings')
"
align
=
"
center
"
width
=
"
95
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
v
-
if
=
"
scope.row.pageviews
"
class
=
"
link-type
"
@
click
=
"
handleFetchPv(scope.row.pageviews)
"
>
{{
scope
.
row
.
pageviews
}}
<
/span
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
span
v
-
if
=
"
row.pageviews
"
class
=
"
link-type
"
@
click
=
"
handleFetchPv(row.pageviews)
"
>
{{
row
.
pageviews
}}
<
/span
>
<
span
v
-
else
>
0
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('table.status')
"
class
-
name
=
"
status-col
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
:
type
=
"
scope.
row.status | statusFilter
"
>
{{
scope
.
row
.
status
}}
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
tag
:
type
=
"
row.status | statusFilter
"
>
{{
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('table.actions')
"
align
=
"
center
"
width
=
"
230
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleUpdate(
scope.
row)
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
button
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleUpdate(row)
"
>
{{
$t
(
'
table.edit
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.status!='published'
"
size
=
"
mini
"
type
=
"
success
"
@
click
=
"
handleModifyStatus(scope.
row,'published')
"
>
<
el
-
button
v
-
if
=
"
row.status!='published'
"
size
=
"
mini
"
type
=
"
success
"
@
click
=
"
handleModifyStatus(
row,'published')
"
>
{{
$t
(
'
table.publish
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.status!='draft'
"
size
=
"
mini
"
@
click
=
"
handleModifyStatus(scope.
row,'draft')
"
>
<
el
-
button
v
-
if
=
"
row.status!='draft'
"
size
=
"
mini
"
@
click
=
"
handleModifyStatus(
row,'draft')
"
>
{{
$t
(
'
table.draft
'
)
}}
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.status!='deleted'
"
size
=
"
mini
"
type
=
"
danger
"
@
click
=
"
handleModifyStatus(scope.
row,'deleted')
"
>
<
el
-
button
v
-
if
=
"
row.status!='deleted'
"
size
=
"
mini
"
type
=
"
danger
"
@
click
=
"
handleModifyStatus(
row,'deleted')
"
>
{{
$t
(
'
table.delete
'
)
}}
<
/el-button
>
<
/template
>
...
...
src/views/table/dragTable.vue
浏览文件 @
55fa5acb
...
...
@@ -39,9 +39,9 @@
<
/el-table-column
>
<
el
-
table
-
column
class
-
name
=
"
status-col
"
label
=
"
Status
"
width
=
"
110
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
:
type
=
"
scope.
row.status | statusFilter
"
>
{{
scope
.
row
.
status
}}
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
tag
:
type
=
"
row.status | statusFilter
"
>
{{
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
...
...
src/views/table/inlineEditTable.vue
浏览文件 @
55fa5acb
...
...
@@ -26,31 +26,31 @@
<
/el-table-column
>
<
el
-
table
-
column
class
-
name
=
"
status-col
"
label
=
"
Status
"
width
=
"
110
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
tag
:
type
=
"
scope.
row.status | statusFilter
"
>
{{
scope
.
row
.
status
}}
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
tag
:
type
=
"
row.status | statusFilter
"
>
{{
row
.
status
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
min
-
width
=
"
300px
"
label
=
"
Title
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
v
-
if
=
"
scope.
row.edit
"
>
<
el
-
input
v
-
model
=
"
scope.
row.title
"
class
=
"
edit-input
"
size
=
"
small
"
/>
<
el
-
button
class
=
"
cancel-btn
"
size
=
"
small
"
icon
=
"
el-icon-refresh
"
type
=
"
warning
"
@
click
=
"
cancelEdit(
scope.
row)
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
template
v
-
if
=
"
row.edit
"
>
<
el
-
input
v
-
model
=
"
row.title
"
class
=
"
edit-input
"
size
=
"
small
"
/>
<
el
-
button
class
=
"
cancel-btn
"
size
=
"
small
"
icon
=
"
el-icon-refresh
"
type
=
"
warning
"
@
click
=
"
cancelEdit(row)
"
>
cancel
<
/el-button
>
<
/template
>
<
span
v
-
else
>
{{
scope
.
row
.
title
}}
<
/span
>
<
span
v
-
else
>
{{
row
.
title
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
Actions
"
width
=
"
120
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
v
-
if
=
"
scope.row.edit
"
type
=
"
success
"
size
=
"
small
"
icon
=
"
el-icon-circle-check-outline
"
@
click
=
"
confirmEdit(scope.
row)
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
el
-
button
v
-
if
=
"
row.edit
"
type
=
"
success
"
size
=
"
small
"
icon
=
"
el-icon-circle-check-outline
"
@
click
=
"
confirmEdit(
row)
"
>
Ok
<
/el-button
>
<
el
-
button
v
-
else
type
=
"
primary
"
size
=
"
small
"
icon
=
"
el-icon-edit
"
@
click
=
"
scope.row.edit=!scope.
row.edit
"
>
<
el
-
button
v
-
else
type
=
"
primary
"
size
=
"
small
"
icon
=
"
el-icon-edit
"
@
click
=
"
row.edit=!
row.edit
"
>
Edit
<
/el-button
>
<
/template
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录