Commit e4bdcf29 by luyt

add: 1低版本浏览器的hover竖线的兼容

2tip提示框调整
1 parent d62c16f5
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -1682,7 +1682,6 @@
"thread-loader": "^2.1.3",
"url-loader": "^2.2.0",
"vue-loader": "^15.9.2",
"vue-loader-v16": "npm:vue-loader@^16.1.0",
"vue-style-loader": "^4.1.2",
"webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0",
......@@ -1701,8 +1700,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
......@@ -1711,8 +1708,6 @@
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
......@@ -1722,8 +1717,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
......@@ -1731,23 +1724,17 @@
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
......@@ -1767,8 +1754,6 @@
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
......@@ -1777,8 +1762,6 @@
"version": "16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
......@@ -2694,8 +2677,7 @@
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz",
"integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=",
"dev": true
"integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg="
},
"binary-extensions": {
"version": "2.2.0",
......@@ -4919,8 +4901,7 @@
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz",
"integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=",
"dev": true
"integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang="
},
"encodeurl": {
"version": "1.0.2",
......@@ -6827,8 +6808,7 @@
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
"integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=",
"dev": true
"integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo="
},
"hash.js": {
"version": "1.1.7",
......@@ -7885,7 +7865,6 @@
"version": "2.2.0",
"resolved": "https://registry.nlark.com/json5/download/json5-2.2.0.tgz",
"integrity": "sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM=",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
......@@ -8586,8 +8565,7 @@
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.nlark.com/minimist/download/minimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=",
"dev": true
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI="
},
"minipass": {
"version": "3.1.5",
......
......@@ -66,7 +66,7 @@ export default {
visible: false,
tableParams: {
listName: 'list',
tableOption: true,
tableOption: false,
tableColumns: [
{
label: '最近开播',
......@@ -79,7 +79,19 @@ export default {
{
label: '直播间名称',
prop: 'name',
line: 1
line: 1,
// children:[
// {
// label: '直播间名称1',
// prop: 'name1',
// line: 1,
// },
// {
// label: '直播间名称2',
// prop: 'name2',
// line: 1,
// },
// ]
},
{
label: '房间号',
......@@ -114,11 +126,11 @@ export default {
label: '直播状态3',
prop: 'liveStatus3',
line: 1,
addHtml: 'shareImgUrl'
addHtml: 'shareImgUrl',
},
{
label: '直播状态4',
prop: 'liveStatus3',
prop: 'liveStatus4',
line: 1,
addHtml: 'shareImgUrl'
},
......@@ -145,24 +157,50 @@ export default {
tableData: [
{
name: '王小虎王小虎王小虎王',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
},
{
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
},
{
name: '王小虎',
name1:'123',
name2:'123',
},
{
name: '王小虎王小虎王小虎王',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
},
{
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
},
{
name: '王小虎',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
},
{
name: '王小虎王小虎王小虎王',
liveStatus3:'132',
liveStatus4:'789',
name1:'123',
name2:'123',
}
]
}
......
......@@ -34,8 +34,8 @@
import App from './App.vue'
// element ui组件
import '@/plugins/element.js'
// import '@/theme/theme.scss'
import '../dist/glsx-components.css'
import '@/theme/theme.scss'
// import '../dist/glsx-components.css'
//开发完成后,本地测试使用我们第二次封装的组件
import './index'
......
<template>
<div class="gl-sub-table">
<el-table v-bind="$attrs" v-on="$listeners">
<!-- 插槽 -->
<slot></slot>
</el-table>
</div>
<el-table v-bind="$attrs" v-on="$listeners">
<!-- 插槽 -->
<slot></slot>
</el-table>
</template>
<script>
export default {
name: "GlSubTable",
data () {
return {
};
},
name: 'GlSubTable',
data() {
return {}
}
// created () {
// console.log(this.$attrs)
// console.log(this.$listeners)
......
<template>
<div class="gl-sub-table-column">
<el-table-column v-bind="$attrs" v-on="$listeners">
<!-- 插槽 -->
<slot></slot>
</el-table-column>
</div>
<el-table-column v-bind="$attrs" v-on="$listeners">
<!-- 插槽 -->
<!-- <slot name="default" v-bind="scope"></slot> -->
<!-- <slot name="default" v-bind:scope="scope"></slot> -->
<template slot="header" slot-scope="scope">
<slot name="header" v-bind="scope">{{ scope.column.label }}</slot>
</template>
<template slot-scope="scope">
<slot v-bind="scope">{{ scope.row[$attrs.prop] }}</slot>
</template>
</el-table-column>
</template>
<script>
export default {
name: "GlsubTableColumn",
data () {
return {
};
name: 'GlsubTableColumn',
data() {
return {}
},
// created () {
// console.log('attrs',this.$attrs)
......@@ -20,5 +25,4 @@ export default {
}
</script>
<style lang="scss">
// .gl-sub-table-column {}
</style>
\ No newline at end of file
......@@ -4,11 +4,19 @@
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="item.formatter(scope.row)"></span>
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= 10 * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="item.formatter(scope.row)"></span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="scope.row[item.prop]"></span>
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= 10 * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="scope.row[item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="scope.row[item.prop]"></span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="scope.row[item.prop]"></span>
</template>
<!-- <template v-else-if="item.labelchildren">
<el-table-column v-for="(labelitem, labelindex) in tableColumns.labelchildren" :key="'labelindex'+labelindex">
<span>123456</span>
......@@ -29,7 +37,7 @@
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children"></sub-el-table-column>
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</template>
......@@ -42,6 +50,16 @@ export default {
data: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
// 获取列表接口
getListApi: {
type: Function,
default: null
}
},
computed: {
......
......@@ -342,11 +342,11 @@ $dackColor: #4f48e6;
}
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell {
background-color: #f4f3ff;
background-color: #f4f4fc;
}
.el-table__body tr.current-row > td.el-table__cell {
background-color: #f4f3ff;
background-color: #f4f4fc;
}
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
......@@ -357,7 +357,7 @@ $dackColor: #4f48e6;
.el-table__body tr.hover-row.el-table__row--striped.current-row > td.el-table__cell,
.el-table__body tr.hover-row.el-table__row--striped > td.el-table__cell,
.el-table__body tr.hover-row > td.el-table__cell {
background-color: #f4f3ff;
background-color: #f4f4fc;
}
/* 分页 */
......@@ -469,8 +469,8 @@ $dackColor: #4f48e6;
display: block;
}
.el-table--enable-row-hover .el-table__body tr:hover {
background: #f4f3ff !important;
background: #f4f4fc !important;
}
.el-table tbody tr:hover > td {
background: #f4f3ff !important;
background: #f4f4fc !important;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!