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
b581ade8
Commit
b581ade8
authored
Mar 12, 2018
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issues 17
parent
8fe3e5e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
request.js
src/utils/request.js
+1
-1
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+8
-2
index.vue
src/views/haomo/components/tables/index.vue
+2
-1
No files found.
src/utils/request.js
View file @
b581ade8
...
@@ -13,7 +13,7 @@ const service = axios.create({
...
@@ -13,7 +13,7 @@ const service = axios.create({
service
.
interceptors
.
request
.
use
(
config
=>
{
service
.
interceptors
.
request
.
use
(
config
=>
{
// Do something before request is sent
// Do something before request is sent
if
(
store
.
getters
.
token
)
{
if
(
store
.
getters
.
token
)
{
config
.
headers
[
'X-Token'
]
=
getToken
()
// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
config
.
headers
[
'X-
Auth-
Token'
]
=
getToken
()
// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
}
}
return
config
return
config
},
error
=>
{
},
error
=>
{
...
...
src/views/haomo/components/tables/HmComplexTable.vue
View file @
b581ade8
...
@@ -32,10 +32,10 @@
...
@@ -32,10 +32,10 @@
<span>
{{
scope
.
row
[
column
.
codeCamel
]
}}
</span>
<span>
{{
scope
.
row
[
column
.
codeCamel
]
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
v-if=
"isShowEditDataButton || isShowDeleteButton"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"openDialog('editData',scope.row)"
v-if=
"isShowEditDataButton"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"openDialog('editData',scope.row)"
v-if=
"isShowEditDataButton"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"deleteData(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"deleteData(scope.row)"
type=
"text"
v-if=
"isShowDeleteButton"
size=
"small"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -215,6 +215,7 @@
...
@@ -215,6 +215,7 @@
isShowNewButton
:
false
,
// 是否显示新建
isShowNewButton
:
false
,
// 是否显示新建
isShowEditDataButton
:
false
,
// 是否显示编辑
isShowEditDataButton
:
false
,
// 是否显示编辑
isShowDeleteButton
:
false
,
// 是否显示删除
isShowExport
:
false
,
// 是否显示导出按钮
isShowExport
:
false
,
// 是否显示导出按钮
formSchema
:
{},
// form弹窗的Schema定义
formSchema
:
{},
// form弹窗的Schema定义
showUserColumns
:
[],
// form弹窗的Columns定义
showUserColumns
:
[],
// form弹窗的Columns定义
...
@@ -328,6 +329,9 @@
...
@@ -328,6 +329,9 @@
if
(
self
.
options
.
showExport
)
{
// 判断是否显示刷新按钮
if
(
self
.
options
.
showExport
)
{
// 判断是否显示刷新按钮
self
.
isShowExport
=
self
.
options
.
showExport
self
.
isShowExport
=
self
.
options
.
showExport
}
}
if
(
self
.
options
.
showDeleteButton
)
{
// 判断是否显示刷新按钮
self
.
isShowDeleteButton
=
self
.
options
.
showDeleteButton
}
console
.
log
(
request
.
defaults
)
console
.
log
(
request
.
defaults
)
console
.
log
(
`request.defaults.baseURL:
${
request
.
defaults
.
baseURL
}
`
)
console
.
log
(
`request.defaults.baseURL:
${
request
.
defaults
.
baseURL
}
`
)
},
},
...
@@ -386,11 +390,13 @@
...
@@ -386,11 +390,13 @@
formConfirm
()
{
formConfirm
()
{
this
.
options
.
newData
.
formConfirm
()
this
.
options
.
newData
.
formConfirm
()
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
self
.
getList
()
},
},
// 表单的取消
// 表单的取消
formCancel
()
{
formCancel
()
{
this
.
options
.
newData
.
formCancel
()
this
.
options
.
newData
.
formCancel
()
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
self
.
getList
()
},
},
// 删除过滤条件为空的filter
// 删除过滤条件为空的filter
deleteFilter
(
filters
)
{
deleteFilter
(
filters
)
{
...
...
src/views/haomo/components/tables/index.vue
View file @
b581ade8
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
}
}
},
},
showRefresh
:
true
,
showRefresh
:
true
,
showExport
:
true
showExport
:
true
,
showDeleteButton
:
true
}
}
},
},
methods
:
{}
methods
:
{}
...
...
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