Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsx-components
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6f853f29
authored
Apr 02, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
table button more 参数优化
1 parent
31275b8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
src/packages/GlTableButton/src/index.vue
src/packages/GlTableButton/src/index.vue
View file @
6f853f2
...
@@ -9,6 +9,10 @@ export default {
...
@@ -9,6 +9,10 @@ export default {
buttonItem
:
{
buttonItem
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({})
default
:
()
=>
({})
},
buttonNum
:
{
type
:
Number
,
default
:
3
}
}
},
},
data
()
{
data
()
{
...
@@ -40,7 +44,7 @@ export default {
...
@@ -40,7 +44,7 @@ export default {
*/
*/
const
handleVNode
=
(
component
,
hasSelect
=
false
)
=>
{
const
handleVNode
=
(
component
,
hasSelect
=
false
)
=>
{
let
comp
=
''
let
comp
=
''
if
(
component
.
type
===
'el-button'
)
{
if
(
component
.
type
===
'el-button'
||
!
component
.
type
)
{
//el-button
//el-button
if
(
hasSelect
)
{
if
(
hasSelect
)
{
return
(
comp
=
(
return
(
comp
=
(
...
@@ -115,10 +119,10 @@ export default {
...
@@ -115,10 +119,10 @@ export default {
let
preButtonsComp
let
preButtonsComp
let
selectComp
let
selectComp
let
renderComp
let
renderComp
if
(
len
>
3
)
{
if
(
len
>
this
.
buttonNum
)
{
//有更多的情况
//有更多的情况
let
preButtons
=
componentList
.
slice
(
0
,
2
)
let
preButtons
=
componentList
.
slice
(
0
,
this
.
buttonNum
-
1
)
let
postButtons
=
componentList
.
slice
(
2
)
let
postButtons
=
componentList
.
slice
(
this
.
buttonNum
-
1
)
preButtonsComp
=
preButtons
.
map
(
item
=>
handleVNode
(
item
))
preButtonsComp
=
preButtons
.
map
(
item
=>
handleVNode
(
item
))
selectComp
=
(
selectComp
=
(
...
@@ -148,8 +152,8 @@ export default {
...
@@ -148,8 +152,8 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.gl-table-button
{
.gl-table-button
{
//
todo
放到组件库后,这行注释掉
//
//
todo
放到组件库后,这行注释掉
$
color-primary
:
var
(
--primaryColor
,
#5850ff
);
//
$
color-primary
:
var
(
--primaryColor
,
#5850ff
);
.gl-dropdown
{
.gl-dropdown
{
margin-left
:
10px
;
margin-left
:
10px
;
color
:
$
color-primary
;
color
:
$
color-primary
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment