Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
胡锦波
/
org-manager-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4ff1d9a6
authored
Apr 13, 2022
by
胡锦波
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1. init button 处理
parent
a68ed486
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
16 deletions
src/installer/index.ts
src/views/components/components/mg-button.vue
src/views/pages/employ-management/address-book/employ-list.vue
src/installer/index.ts
View file @
4ff1d9a6
...
@@ -50,7 +50,8 @@ import {
...
@@ -50,7 +50,8 @@ import {
import
Vue
,
{
VueConstructor
}
from
'vue'
;
import
Vue
,
{
VueConstructor
}
from
'vue'
;
import
'./lodash'
;
import
'./lodash'
;
import
'element-ui/lib/theme-chalk/index.css'
;
import
'element-ui/lib/theme-chalk/index.css'
;
import
Button
from
"@/core-ui/component/element-ui/button.vue"
;
import
MgButton
from
"@/views/components/components/mg-button.vue"
;
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
scrollbar
=
require
(
'element-ui/lib/scrollbar'
);
const
scrollbar
=
require
(
'element-ui/lib/scrollbar'
);
...
@@ -80,8 +81,7 @@ locale.el.pagination.pageClassifier = '';
...
@@ -80,8 +81,7 @@ locale.el.pagination.pageClassifier = '';
Vue
.
component
(
'el-autocomplete'
,
Autocomplete
);
Vue
.
component
(
'el-autocomplete'
,
Autocomplete
);
Vue
.
component
(
'el-scrollbar'
,
scrollbar
.
default
);
Vue
.
component
(
'el-scrollbar'
,
scrollbar
.
default
);
Vue
.
component
(
'com-button'
,
Button
);
Vue
.
component
(
'mg-button'
,
MgButton
);
Vue
.
use
(
Avatar
);
Vue
.
use
(
Avatar
);
Vue
.
use
(
Pagination
);
Vue
.
use
(
Pagination
);
...
...
src/views/components/components/mg-button.vue
0 → 100644
View file @
4ff1d9a6
<
template
>
<Button
v-bind=
"$attrs"
v-on=
"$listeners"
:size=
"size"
>
<slot></slot>
</Button>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
}
from
"vue-property-decorator"
;
import
Button
from
"@/core-ui/component/element-ui/button.vue"
;
/**
* 支持的 size 值,默认值为 default
*/
const
BUTTON_SIZES
=
[
"extra-large"
,
"large"
,
"default"
,
"medium"
,
"small"
];
@
Component
({
components
:
{
Button
}
})
export
default
class
MgButton
extends
Vue
{
@
Prop
({
required
:
false
,
default
:
"medium"
,
validator
:
(
v
)
=>
!
v
||
BUTTON_SIZES
.
indexOf
(
v
)
>
-
1
,
})
private
size
!
:
string
;
}
</
script
>
<
style
lang=
"less"
scoped
>
@import
"~@/css/variables.less"
;
</
style
>
src/views/pages/employ-management/address-book/employ-list.vue
View file @
4ff1d9a6
...
@@ -24,21 +24,15 @@
...
@@ -24,21 +24,15 @@
<div
<div
class=
"list_title d-flex align-items-center justify-content-end"
class=
"list_title d-flex align-items-center justify-content-end"
>
>
<
com-button
size=
"medium"
type=
"primary"
@
click=
"addMemberBtn"
>
<
mg-button
type=
"primary"
@
click=
"addMemberBtn"
>
添加员工
添加员工
</com-button>
</mg-button>
<com-button
size=
"medium"
@
click=
"exportMembers"
>
<mg-button
@
click=
"exportMembers"
>
批量导入
</mg-button>
批量导入
<mg-button
@
click=
"outFile"
>
批量导出
</mg-button>
</com-button>
<mg-button
@
click=
"handleDelete('disable')"
>
<com-button
size=
"medium"
@
click=
"outFile"
>
批量导出
</com-button>
<com-button
size=
"medium"
@
click=
"handleDelete('disable')"
>
禁用员工
禁用员工
</com-button>
</mg-button>
<com-button
size=
"medium"
@
click=
"handleDelete('del')"
>
<mg-button
@
click=
"handleDelete('del')"
>
删除员工
</mg-button>
删除员工
</com-button>
</div>
</div>
<div
class=
"table-container flex-fill d-flex flex-column"
>
<div
class=
"table-container flex-fill d-flex flex-column"
>
<el-table
<el-table
...
...
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