Commit de1428a6 by 前端

GLTabs组件样式调整

1 parent ceab47a4
......@@ -43,7 +43,7 @@
</GLDialog> -->
<hr />
<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>
<GLTable ref="liveRoomRef" :tableParams="tableParams" :tableData="tableData" max-height="250">
<span slot="shareImgUrl" slot-scope="scope">
......@@ -131,8 +131,13 @@
<GLFull>SDK发就算冷冻机房乐山大佛</GLFull>
<hr />
<!-- 测试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>
<hr />
<br />
<!-- 测试弹框组件 -->
<el-button plain @click="testDialog(1)">dialog(大)</el-button>
<el-button plain @click="testDialog2">dialog(中)</el-button>
......@@ -209,7 +214,7 @@
<el-button type="primary" size="small" @click="dialogShow = false">确定123</el-button>
</span> -->
</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'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow1">
<div>hello</div>
......@@ -217,45 +222,28 @@
<hr />
<!-- 测试iconfont字体 -->
<h3>广联iconfont字体调整</h3>
<i class="gl-icon-a-bianzu5 colorred"></i>
<i class="gl-icon-pause"></i>
<i class="gl-icon-icon-full-screen"></i>
<i class="gl-icon-a-bianzu5 colorred"></i>
<i class="gl-icon-pause"></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 />
<!-- 测试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>
</template>
<script>
......@@ -839,84 +827,89 @@ export default {
//测试table配置项
optionsList: [
{
label: '复选框A',
prop: 'liveStatus1',
checkItem: true,
},
{
label: '复选框b',
prop: 'liveStatus2',
label: '复选框A',
prop: 'liveStatus1',
checkItem: true
},
{
label: '复选框c',
// prop: 'liveStatus3',
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: '复选框b',
prop: 'liveStatus2'
},
{
label: '禁用',
prop: 'liveStatus4',
disabledCheck: true,
order: 1
{
label: '复选框c',
// prop: 'liveStatus3',
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: '选中禁用',
prop: 'liveStatus5',
checkItem: true,//是否勾选
disabledCheck: true, //禁用选择项
order: 2 //数值越大越靠前
{
label: '禁用',
prop: 'liveStatus4',
disabledCheck: true,
order: 1
},
{
label: '选中禁用',
prop: 'liveStatus5',
checkItem: true, //是否勾选
disabledCheck: true, //禁用选择项
order: 2 //数值越大越靠前
}
],
// 测试GLImage
url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
srcList: [
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
],
// 测试GLDrawer
drawer:false,
direction: 'rtl',
drawer1:false,
direction1: 'ttb',
gridData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
srcList: ['https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg', 'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'],
// 测试GLDrawer
drawer: false,
direction: 'rtl',
drawer1: false,
direction1: 'ttb',
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
]
}
},
mounted() {
......@@ -1137,8 +1130,8 @@ export default {
this.tabPaneList = []
for (let i = 0; i < 6; i++) {
this.tabPaneList.push({
label: 'tab' + i,
name: 'tab' + i
label: 'tab组件' + i,
name: 'tab组件我来啦我来啦' + i
})
}
},
......@@ -1235,26 +1228,23 @@ export default {
// console.log(val, '删除')
},
//测试table配置项
changeFn(checkList,checkAttrList){
changeFn(checkList, checkAttrList) {
// console.log('checkList,checkAttrList: ', checkList,checkAttrList);
},
end(list){
console.log('list: ', list);
end(list) {
console.log('list: ', list)
},
// 测试GLDrawer
handleClose(done){
handleClose(done) {
console.log('测试GLDrawer')
done();
done()
},
handleOk2() {
console.log('点击确定')
},
handleCancel2() {
console.log('点击取消')
},
}
}
}
</script>
......@@ -1270,10 +1260,9 @@ export default {
padding-bottom: 50px;
height: 2000px;
font-size: 14px;
background-color: #f0f1f7;
}
.colorred {
color: red;
}
</style>
<template>
<div class="gl-tab">
<div :class="['gl-tab', 'gl-tab-' + type]">
<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">
<span slot="label" style="padding: 0 10px">{{ item.label }}</span>
......@@ -22,6 +22,10 @@ export default {
tabPaneList: {
type: Array,
default: () => [{}]
},
type: {
type: String,
default: ''
}
},
......@@ -35,9 +39,7 @@ export default {
this.activeName = this.$refs.tab
},
methods: {
}
methods: {}
}
</script>
......@@ -71,4 +73,75 @@ export default {
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>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!