Merge pull request #290 from jamebal/dev

style: 优化文件列表list视图拖拽样式
This commit is contained in:
jmal 2024-09-24 15:33:50 +08:00 committed by GitHub
commit a6fd8b66c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 5 deletions

View File

@ -1578,7 +1578,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// list 视图 // list 视图
const fileListTableWidth = this.$refs.fileListTableContainer.offsetWidth const fileListTableWidth = this.$refs.fileListTableContainer.offsetWidth
this.tableHeadNameWidth = fileListTableWidth - (80 + 200 + 250) - 50 this.tableHeadNameWidth = fileListTableWidth - (80 + 200 + 250) - 90
}) })
// 使列表可拖拽 // 使列表可拖拽
@ -2036,15 +2036,22 @@ export default {
dragingDiv.firstChild.style.textAlign = 'center' dragingDiv.firstChild.style.textAlign = 'center'
let tds = Array.prototype.slice.call(dragingDiv.childNodes) let tds = Array.prototype.slice.call(dragingDiv.childNodes)
tds.forEach((node, index) => { tds.forEach((node, index) => {
if (index === 0) {
node.firstChild.style.margin = '0 20px'
}
if (index === 1) {
node.firstChild.style.width = '280px'
node.firstChild.style.marginRight = '20px'
}
if (index === 2) { if (index === 2) {
node.style.borderRadius = '0 3px 3px 0' node.style.borderRadius = '0 5px 5px 0'
node.style.borderRight = '1px solid #409eff' node.style.borderRight = '1px solid #409eff'
node.firstChild.style.height = '44px' node.firstChild.style.height = '44px'
node.firstChild.style.lineHeight = '44px' node.firstChild.style.lineHeight = '44px'
node.firstChild.style.width = '80px' node.firstChild.style.width = '80px'
return true return true
} }
if (index !== 0 && index !== 1) { if (index === 3) {
dragingDiv.removeChild(node) dragingDiv.removeChild(node)
} }
}) })
@ -4586,7 +4593,7 @@ export default {
} }
>>> .el-table { >>> .el-table {
padding-left: 20px; padding-left: 40px;
th.gutter { th.gutter {
display: table-cell !important; display: table-cell !important;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<table-list <table-list
ref="tableList" v-if="dataList.length > 0"
:less-client-height="245" :less-client-height="245"
:tableData="dataList" :tableData="dataList"
:loading="loading" :loading="loading"