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 de1428a6
authored
Nov 08, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
GLTabs组件样式调整
1 parent
ceab47a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
190 additions
and
128 deletions
src/App.vue
src/packages/GLTabs/src/index.vue
src/App.vue
View file @
de1428a
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</GLDialog>
-->
</GLDialog>
-->
<hr
/>
<hr
/>
<h3>
el-table调整
</h3>
<h3>
el-table调整
</h3>
<i
class=
"gl-icon-circle-question"
></i>
<i
class=
"gl-icon-circle-question"
></i>
<GLTableOption
@
change=
"changeFn"
:optionsList=
"optionsList"
@
end=
"end"
></GLTableOption>
<GLTableOption
@
change=
"changeFn"
:optionsList=
"optionsList"
@
end=
"end"
></GLTableOption>
<GLTable
ref=
"liveRoomRef"
:tableParams=
"tableParams"
:tableData=
"tableData"
max-height=
"250"
>
<GLTable
ref=
"liveRoomRef"
:tableParams=
"tableParams"
:tableData=
"tableData"
max-height=
"250"
>
<span
slot=
"shareImgUrl"
slot-scope=
"scope"
>
<span
slot=
"shareImgUrl"
slot-scope=
"scope"
>
...
@@ -131,8 +131,13 @@
...
@@ -131,8 +131,13 @@
<GLFull>
SDK发就算冷冻机房乐山大佛
</GLFull>
<GLFull>
SDK发就算冷冻机房乐山大佛
</GLFull>
<hr
/>
<hr
/>
<!-- 测试GLTabs -->
<!-- 测试GLTabs -->
<GLTabs
v-model=
"activeName"
type=
"btn"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleTabChange"
></GLTabs>
<br
/>
<GLTabs
v-model=
"activeName"
type=
"card"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleTabChange"
></GLTabs>
<br
/>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleTabChange"
></GLTabs>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleTabChange"
></GLTabs>
<hr
/>
<br
/>
<!-- 测试弹框组件 -->
<!-- 测试弹框组件 -->
<el-button
plain
@
click=
"testDialog(1)"
>
dialog(大)
</el-button>
<el-button
plain
@
click=
"testDialog(1)"
>
dialog(大)
</el-button>
<el-button
plain
@
click=
"testDialog2"
>
dialog(中)
</el-button>
<el-button
plain
@
click=
"testDialog2"
>
dialog(中)
</el-button>
...
@@ -209,7 +214,7 @@
...
@@ -209,7 +214,7 @@
<el-button type="primary" size="small" @click="dialogShow = false">确定123</el-button>
<el-button type="primary" size="small" @click="dialogShow = false">确定123</el-button>
</span> -->
</span> -->
</GLDialog>
</GLDialog>
<GLDialog
:append-to-body=
"true"
:mode=
"mode"
title=
"提示中"
:hasFooter=
"hasFooter"
:type=
"'error'"
:content=
"'hello HelloWorld'"
@
onOk=
"handleOk"
@
onCancel=
"handleCancel"
:visible
.
sync=
"dialogShow2"
></GLDialog>
<GLDialog
:append-to-body=
"true"
:mode=
"mode"
title=
"提示中"
:hasFooter=
"hasFooter"
:type=
"'error'"
:content=
"'hello HelloWorld'"
@
onOk=
"handleOk"
@
onCancel=
"handleCancel"
:visible
.
sync=
"dialogShow2"
></GLDialog>
<GLDialog
title=
"提示123"
:mode=
"mode"
:hasFooter=
"hasFooter"
:type=
"'info'"
:content=
"'hello HelloWorld'"
@
onOk=
"handleOk"
@
onCancel=
"handleCancel"
:visible
.
sync=
"dialogShow1"
></GLDialog>
<GLDialog
title=
"提示123"
:mode=
"mode"
:hasFooter=
"hasFooter"
:type=
"'info'"
:content=
"'hello HelloWorld'"
@
onOk=
"handleOk"
@
onCancel=
"handleCancel"
:visible
.
sync=
"dialogShow1"
></GLDialog>
<!-- <GLDialog title="提示123" :mode="mode" :hasFooter="hasFooter" :type="'info'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow1">
<!-- <GLDialog title="提示123" :mode="mode" :hasFooter="hasFooter" :type="'info'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow1">
<div>hello</div>
<div>hello</div>
...
@@ -217,45 +222,28 @@
...
@@ -217,45 +222,28 @@
<hr
/>
<hr
/>
<!-- 测试iconfont字体 -->
<!-- 测试iconfont字体 -->
<h3>
广联iconfont字体调整
</h3>
<h3>
广联iconfont字体调整
</h3>
<i
class=
"gl-icon-a-bianzu5 colorred"
></i>
<i
class=
"gl-icon-a-bianzu5 colorred"
></i>
<i
class=
"gl-icon-pause"
></i>
<i
class=
"gl-icon-pause"
></i>
<i
class=
"gl-icon-icon-full-screen"
></i>
<i
class=
"gl-icon-icon-full-screen"
></i>
<hr
/>
<!-- 测试GLImage -->
<GLImage
style=
"width: 100px; height: 100px"
:src=
"url"
:preview-src-list=
"srcList"
:appendToBody=
"false"
></GLImage>
<hr
/>
<!-- 测试GLDrawer -->
<el-button
type=
"primary"
@
click=
"drawer = !drawer"
>
测试GLDrawer(左右)
</el-button>
<el-button
type=
"primary"
@
click=
"drawer1 = !drawer1"
>
测试GLDrawer(上下)
</el-button>
<GLDrawer
@
onOk=
"handleOk2"
@
onCancel=
"handleCancel2"
title=
"我是标题"
:visible
.
sync=
"drawer"
:direction=
"direction"
:before-close=
"handleClose"
>
<!-- <span>我来啦!</span> -->
<el-table
:data=
"gridData"
>
<el-table-column
property=
"date"
label=
"日期"
width=
"350"
></el-table-column>
<el-table-column
property=
"name"
label=
"姓名"
width=
"100"
></el-table-column>
<el-table-column
property=
"address"
width=
"100"
label=
"地址"
></el-table-column>
</el-table>
</GLDrawer>
<GLDrawer
@
onOk=
"handleOk2"
@
onCancel=
"handleCancel2"
title=
"我是标题"
:visible
.
sync=
"drawer1"
:direction=
"direction1"
:before-close=
"handleClose"
>
<span>
我来啦!
</span>
</GLDrawer>
<hr
/>
<hr
/>
<!-- 测试GLImage -->
<GLImage
style=
"width: 100px; height: 100px"
:src=
"url"
:preview-src-list=
"srcList"
:appendToBody=
"false"
></GLImage>
<hr
/>
<!-- 测试GLDrawer -->
<el-button
type=
"primary"
@
click=
"drawer = !drawer"
>
测试GLDrawer(左右)
</el-button>
<el-button
type=
"primary"
@
click=
"drawer1 = !drawer1"
>
测试GLDrawer(上下)
</el-button>
<GLDrawer
@
onOk=
"handleOk2"
@
onCancel=
"handleCancel2"
title=
"我是标题"
:visible
.
sync=
"drawer"
:direction=
"direction"
:before-close=
"handleClose"
>
<!-- <span>我来啦!</span> -->
<el-table
:data=
"gridData"
>
<el-table-column
property=
"date"
label=
"日期"
width=
"350"
></el-table-column>
<el-table-column
property=
"name"
label=
"姓名"
width=
"100"
></el-table-column>
<el-table-column
property=
"address"
width=
"100"
label=
"地址"
></el-table-column>
</el-table>
</GLDrawer>
<GLDrawer
@
onOk=
"handleOk2"
@
onCancel=
"handleCancel2"
title=
"我是标题"
:visible
.
sync=
"drawer1"
:direction=
"direction1"
:before-close=
"handleClose"
>
<span>
我来啦!
</span>
</GLDrawer>
<hr
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -839,84 +827,89 @@ export default {
...
@@ -839,84 +827,89 @@ export default {
//测试table配置项
//测试table配置项
optionsList
:
[
optionsList
:
[
{
{
label
:
'复选框A'
,
label
:
'复选框A'
,
prop
:
'liveStatus1'
,
prop
:
'liveStatus1'
,
checkItem
:
true
,
checkItem
:
true
},
{
label
:
'复选框b'
,
prop
:
'liveStatus2'
,
},
},
{
{
label
:
'复选框c'
,
label
:
'复选框b'
,
// prop: 'liveStatus3',
prop
:
'liveStatus2'
children
:[
{
label
:
'复选框c-1'
,
// prop: 'liveStatus3-1',
children
:[
{
label
:
'复选框c-1-1'
,
prop
:
'liveStatus3-1-1'
,
}
]
// checkItem: true,
},{
label
:
'复选框c-2'
,
prop
:
'liveStatus3-2'
,
},
]
},
},
{
{
label
:
'禁用'
,
label
:
'复选框c'
,
prop
:
'liveStatus4'
,
// prop: 'liveStatus3',
disabledCheck
:
true
,
children
:
[
order
:
1
{
label
:
'复选框c-1'
,
// prop: 'liveStatus3-1',
children
:
[
{
label
:
'复选框c-1-1'
,
prop
:
'liveStatus3-1-1'
}
]
// checkItem: true,
},
{
label
:
'复选框c-2'
,
prop
:
'liveStatus3-2'
}
]
},
},
{
{
label
:
'选中禁用'
,
label
:
'禁用'
,
prop
:
'liveStatus5'
,
prop
:
'liveStatus4'
,
checkItem
:
true
,
//是否勾选
disabledCheck
:
true
,
disabledCheck
:
true
,
//禁用选择项
order
:
1
order
:
2
//数值越大越靠前
},
},
{
label
:
'选中禁用'
,
prop
:
'liveStatus5'
,
checkItem
:
true
,
//是否勾选
disabledCheck
:
true
,
//禁用选择项
order
:
2
//数值越大越靠前
}
],
],
// 测试GLImage
// 测试GLImage
url
:
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
,
url
:
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
,
srcList
:
[
srcList
:
[
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
,
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
],
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
,
// 测试GLDrawer
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
drawer
:
false
,
],
direction
:
'rtl'
,
// 测试GLDrawer
drawer1
:
false
,
drawer
:
false
,
direction1
:
'ttb'
,
direction
:
'rtl'
,
gridData
:
[
drawer1
:
false
,
{
direction1
:
'ttb'
,
date
:
'2016-05-02'
,
gridData
:
[{
name
:
'王小虎'
,
date
:
'2016-05-02'
,
address
:
'上海市普陀区金沙江路 1518 弄'
name
:
'王小虎'
,
},
address
:
'上海市普陀区金沙江路 1518 弄'
{
},
{
date
:
'2016-05-04'
,
date
:
'2016-05-04'
,
name
:
'王小虎'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
address
:
'上海市普陀区金沙江路 1518 弄'
},
},
{
{
date
:
'2016-05-01'
,
date
:
'2016-05-01'
,
name
:
'王小虎'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
address
:
'上海市普陀区金沙江路 1518 弄'
},
{
},
date
:
'2016-05-03'
,
{
name
:
'王小虎'
,
date
:
'2016-05-03'
,
address
:
'上海市普陀区金沙江路 1518 弄'
name
:
'王小虎'
,
},
{
address
:
'上海市普陀区金沙江路 1518 弄'
date
:
'2016-05-01'
,
},
name
:
'王小虎'
,
{
address
:
'上海市普陀区金沙江路 1518 弄'
date
:
'2016-05-01'
,
},
{
name
:
'王小虎'
,
date
:
'2016-05-03'
,
address
:
'上海市普陀区金沙江路 1518 弄'
name
:
'王小虎'
,
},
address
:
'上海市普陀区金沙江路 1518 弄'
{
}],
date
:
'2016-05-03'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
}
]
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -1137,8 +1130,8 @@ export default {
...
@@ -1137,8 +1130,8 @@ export default {
this
.
tabPaneList
=
[]
this
.
tabPaneList
=
[]
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
this
.
tabPaneList
.
push
({
this
.
tabPaneList
.
push
({
label
:
'tab'
+
i
,
label
:
'tab
组件
'
+
i
,
name
:
'tab'
+
i
name
:
'tab
组件我来啦我来啦
'
+
i
})
})
}
}
},
},
...
@@ -1235,26 +1228,23 @@ export default {
...
@@ -1235,26 +1228,23 @@ export default {
// console.log(val, '删除')
// console.log(val, '删除')
},
},
//测试table配置项
//测试table配置项
changeFn
(
checkList
,
checkAttrList
)
{
changeFn
(
checkList
,
checkAttrList
)
{
// console.log('checkList,checkAttrList: ', checkList,checkAttrList);
// console.log('checkList,checkAttrList: ', checkList,checkAttrList);
},
},
end
(
list
){
end
(
list
)
{
console
.
log
(
'list: '
,
list
)
;
console
.
log
(
'list: '
,
list
)
},
},
// 测试GLDrawer
// 测试GLDrawer
handleClose
(
done
){
handleClose
(
done
)
{
console
.
log
(
'测试GLDrawer'
)
console
.
log
(
'测试GLDrawer'
)
done
()
;
done
()
},
},
handleOk2
()
{
handleOk2
()
{
console
.
log
(
'点击确定'
)
console
.
log
(
'点击确定'
)
},
},
handleCancel2
()
{
handleCancel2
()
{
console
.
log
(
'点击取消'
)
console
.
log
(
'点击取消'
)
},
}
}
}
}
}
</
script
>
</
script
>
...
@@ -1270,10 +1260,9 @@ export default {
...
@@ -1270,10 +1260,9 @@ export default {
padding-bottom
:
50px
;
padding-bottom
:
50px
;
height
:
2000px
;
height
:
2000px
;
font-size
:
14px
;
font-size
:
14px
;
background-color
:
#f0f1f7
;
}
}
.colorred
{
.colorred
{
color
:
red
;
color
:
red
;
}
}
</
style
>
</
style
>
src/packages/GLTabs/src/index.vue
View file @
de1428a
<
template
>
<
template
>
<div
class=
"gl-tab
"
>
<div
:class=
"['gl-tab', 'gl-tab-' + type]
"
>
<el-tabs
ref=
"tab"
v-bind=
"$attrs"
v-on=
"$listeners"
>
<el-tabs
ref=
"tab"
v-bind=
"$attrs"
v-on=
"$listeners"
>
<el-tab-pane
v-for=
"(item, index) in tabPaneList"
:key=
"index"
v-bind=
"item"
v-on=
"item.listeners"
>
<el-tab-pane
v-for=
"(item, index) in tabPaneList"
:key=
"index"
v-bind=
"item"
v-on=
"item.listeners"
>
<span
slot=
"label"
style=
"padding: 0 10px"
>
{{
item
.
label
}}
</span>
<span
slot=
"label"
style=
"padding: 0 10px"
>
{{
item
.
label
}}
</span>
...
@@ -22,6 +22,10 @@ export default {
...
@@ -22,6 +22,10 @@ export default {
tabPaneList
:
{
tabPaneList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[{}]
default
:
()
=>
[{}]
},
type
:
{
type
:
String
,
default
:
''
}
}
},
},
...
@@ -35,9 +39,7 @@ export default {
...
@@ -35,9 +39,7 @@ export default {
this
.
activeName
=
this
.
$refs
.
tab
this
.
activeName
=
this
.
$refs
.
tab
},
},
methods
:
{
methods
:
{}
}
}
}
</
script
>
</
script
>
...
@@ -71,4 +73,75 @@ export default {
...
@@ -71,4 +73,75 @@ export default {
background-color
:
$
color-primary
;
background-color
:
$
color-primary
;
}
}
}
}
.gl-tab-card
/
deep
/
.el-tabs
{
&__item
{
&.is-active,
&:hover
{
background
:
#ffffff
;
}
height
:
40px
!
important
;
font-size
:
14px
;
color
:
#666666
;
line-height
:
40px
;
background
:
#f8f8f8
;
border-radius
:
4px
4px
0
0
;
margin-right
:
1px
;
max-width
:
140px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
padding
:
0
10px
!
important
;
}
&
__active-bar
{
height
:
0px
;
background-color
:
transparent
;
}
.el-tabs__nav-wrap
::after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
2px
;
background-color
:
transparent
;
z-index
:
1
;
}
}
.gl-tab-btn
/
deep
/
.el-tabs
{
.el-tabs__nav
{
border-radius
:
4px
;
background
:
#F8F8F8
;
}
&
__item
{
&.is-active,
&:hover
{
background
:
#ffffff
;
height
:
32px
!important
;
margin
:
2px
;
border-radius
:
3px
;
line-height
:
32px
;
}
padding
:
0
6px
!
important
;
height
:
36px
!
important
;
font-size
:
14px
;
color
:
#666666
;
line-height
:
36px
;
}
&
__active-bar
{
height
:
0px
;
background-color
:
transparent
;
}
.el-tabs__nav-wrap
::after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
2px
;
background-color
:
transparent
;
z-index
:
1
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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