Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vipSupplier
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
王淑敏
vipSupplier
Commits
a3bf52df
Commit
a3bf52df
authored
Oct 03, 2020
by
chuzhixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除不常用组件
parent
32ef0ae2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
221 deletions
+2
-221
mock/controller/router.js
+1
-22
src/router/index.js
+1
-22
src/views/vab/markdown/index.vue
+0
-68
src/views/vab/table/inlineEditTable.vue
+0
-109
No files found.
mock/controller/router.js
View file @
a3bf52df
...
@@ -93,27 +93,12 @@ const data = [
...
@@ -93,27 +93,12 @@ const data = [
},
},
{
{
path
:
"table"
,
path
:
"table"
,
component
:
"EmptyLayout"
,
component
:
"@/views/vab/table/index"
,
redirect
:
"noRedirect"
,
name
:
"Table"
,
name
:
"Table"
,
meta
:
{
meta
:
{
title
:
"表格"
,
title
:
"表格"
,
permissions
:
[
"admin"
],
permissions
:
[
"admin"
],
},
},
children
:
[
{
path
:
"comprehensiveTable"
,
name
:
"ComprehensiveTable"
,
component
:
"@/views/vab/table/index"
,
meta
:
{
title
:
"综合表格"
},
},
{
path
:
"inlineEditTable"
,
name
:
"InlineEditTable"
,
component
:
"@/views/vab/table/inlineEditTable"
,
meta
:
{
title
:
"行内编辑"
},
},
],
},
},
{
{
path
:
"map"
,
path
:
"map"
,
...
@@ -241,12 +226,6 @@ const data = [
...
@@ -241,12 +226,6 @@ const data = [
meta
:
{
title
:
"图像拖拽比对"
,
permissions
:
[
"admin"
]
},
meta
:
{
title
:
"图像拖拽比对"
,
permissions
:
[
"admin"
]
},
},
},
{
{
path
:
"markdown"
,
name
:
"Markdown"
,
component
:
"@/views/vab/markdown/index"
,
meta
:
{
title
:
"markdown阅读器"
,
permissions
:
[
"admin"
]
},
},
{
path
:
"smallComponents"
,
path
:
"smallComponents"
,
name
:
"SmallComponents"
,
name
:
"SmallComponents"
,
component
:
"@/views/vab/smallComponents/index"
,
component
:
"@/views/vab/smallComponents/index"
,
...
...
src/router/index.js
View file @
a3bf52df
...
@@ -131,27 +131,12 @@ export const asyncRoutes = [
...
@@ -131,27 +131,12 @@ export const asyncRoutes = [
},
},
{
{
path
:
"table"
,
path
:
"table"
,
component
:
EmptyLayout
,
component
:
()
=>
import
(
"@/views/vab/table/index"
),
redirect
:
"noRedirect"
,
name
:
"Table"
,
name
:
"Table"
,
meta
:
{
meta
:
{
title
:
"表格"
,
title
:
"表格"
,
permissions
:
[
"admin"
],
permissions
:
[
"admin"
],
},
},
children
:
[
{
path
:
"comprehensiveTable"
,
name
:
"ComprehensiveTable"
,
component
:
()
=>
import
(
"@/views/vab/table/index"
),
meta
:
{
title
:
"综合表格"
},
},
{
path
:
"inlineEditTable"
,
name
:
"InlineEditTable"
,
component
:
()
=>
import
(
"@/views/vab/table/inlineEditTable"
),
meta
:
{
title
:
"行内编辑"
},
},
],
},
},
{
{
path
:
"map"
,
path
:
"map"
,
...
@@ -288,12 +273,6 @@ export const asyncRoutes = [
...
@@ -288,12 +273,6 @@ export const asyncRoutes = [
meta
:
{
title
:
"图像拖拽比对"
,
permissions
:
[
"admin"
]
},
meta
:
{
title
:
"图像拖拽比对"
,
permissions
:
[
"admin"
]
},
},
},
{
{
path
:
"markdown"
,
name
:
"Markdown"
,
component
:
()
=>
import
(
"@/views/vab/markdown/index"
),
meta
:
{
title
:
"markdown阅读器"
,
permissions
:
[
"admin"
]
},
},
{
path
:
"smallComponents"
,
path
:
"smallComponents"
,
name
:
"SmallComponents"
,
name
:
"SmallComponents"
,
component
:
()
=>
import
(
"@/views/vab/smallComponents/index"
),
component
:
()
=>
import
(
"@/views/vab/smallComponents/index"
),
...
...
src/views/vab/markdown/index.vue
deleted
100644 → 0
View file @
32ef0ae2
<
template
>
<div
class=
"markdown-container markdown-body"
>
<el-select
v-model=
"value"
placeholder=
"请选择"
@
change=
"handleChange"
>
<el-option
v-for=
"(item, index) in options"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
<div
v-html=
"prettierList"
></div>
</div>
</
template
>
<
script
>
import
marked
from
"marked"
;
import
"github-markdown-css/github-markdown.css"
;
import
{
getList
}
from
"@/api/markdown"
;
export
default
{
name
:
"Markdown"
,
data
()
{
return
{
listLoading
:
true
,
elementLoadingText
:
"正在加载..."
,
options
:
[
{
value
:
"0"
,
label
:
"Prettier"
,
},
],
value
:
"0"
,
prettierList
:
null
,
};
},
created
()
{
this
.
fetchData
();
},
mounted
()
{},
methods
:
{
handleChange
(
val
)
{
this
.
value
=
val
;
this
.
fetchData
();
},
async
fetchData
()
{
this
.
listLoading
=
true
;
switch
(
this
.
value
)
{
case
"0"
:
const
{
data
}
=
await
getList
();
this
.
prettierList
=
marked
(
data
||
""
,
{
renderer
:
new
marked
.
Renderer
(),
gfm
:
true
,
tables
:
true
,
breaks
:
false
,
pedantic
:
false
,
sanitize
:
false
,
smartLists
:
true
,
smartypants
:
false
,
});
break
;
}
setTimeout
(()
=>
{
this
.
listLoading
=
false
;
},
500
);
},
},
};
</
script
>
src/views/vab/table/inlineEditTable.vue
deleted
100644 → 0
View file @
32ef0ae2
<
template
>
<div
class=
"app-container"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
:element-loading-text=
"elementLoadingText"
>
<el-table-column
show-overflow-tooltip
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
show-overflow-tooltip
label=
"序号"
width=
"95"
>
<template
#
default=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
min-width=
"300px"
label=
"标题"
>
<
template
#
default=
"{ row }"
>
<template
v-if=
"row.edit"
>
<el-input
v-model=
"row.title"
style=
"width: 300px"
/>
<el-button
class=
"cancel-btn"
type=
"warning"
@
click=
"cancelEdit(row)"
>
取消
</el-button>
</
template
>
<span
v-else
>
{{ row.title }}
</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
label=
"作者"
prop=
"author"
></el-table-column>
<el-table-column
show-overflow-tooltip
align=
"center"
label=
"操作"
width=
"200"
>
<
template
#
default=
"{ row }"
>
<el-button
v-if=
"row.edit"
type=
"success"
size=
"small"
@
click=
"confirmEdit(row)"
>
保存
</el-button>
<el-button
v-else
type=
"primary"
size=
"small"
icon=
"el-icon-edit"
@
click=
"row.edit = !row.edit"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
{
getList
}
from
"@/api/table"
;
export
default
{
name
:
"InlineEditTable"
,
data
()
{
return
{
list
:
null
,
listLoading
:
true
,
elementLoadingText
:
"正在加载..."
,
queryForm
:
{
pageNo
:
1
,
pageSize
:
20
,
title
:
""
,
},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
async
getList
()
{
this
.
listLoading
=
true
;
const
{
data
}
=
await
getList
(
this
.
queryForm
);
this
.
list
=
data
.
map
((
v
)
=>
{
this
.
$set
(
v
,
"edit"
,
false
);
v
.
originalTitle
=
v
.
title
;
return
v
;
});
this
.
listLoading
=
false
;
},
cancelEdit
(
row
)
{
row
.
title
=
row
.
originalTitle
;
row
.
edit
=
false
;
},
confirmEdit
(
row
)
{
row
.
edit
=
false
;
row
.
originalTitle
=
row
.
title
;
},
},
};
</
script
>
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