From 31fc97decc6277d7bbae97de77b22d79af05b867 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sun, 28 Apr 2024 16:16:12 +0800 Subject: [PATCH] fix style --- packages/custom/src/panel.js | 8 ++++---- packages/table/src/table.js | 2 +- styles/base/common.scss | 8 ++++---- styles/button.scss | 4 ++-- styles/custom.scss | 8 ++++---- styles/helpers/mixin.scss | 2 +- styles/input.scss | 2 +- styles/modal.scss | 4 ++-- styles/select.scss | 2 +- styles/table.scss | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/custom/src/panel.js b/packages/custom/src/panel.js index a7aceaba2..8f593cb67 100644 --- a/packages/custom/src/panel.js +++ b/packages/custom/src/panel.js @@ -538,7 +538,7 @@ export default { if (prevDropTrEl) { // 判断是否有拖动 if (prevDropTrEl !== trEl) { - const dragOffset = prevDropTrEl.getAttribute('dragoffset') + const dragOffset = prevDropTrEl.getAttribute('drag-pos') const colid = trEl.getAttribute('colid') const column = $xetable.getColumnById(colid) if (!column) { @@ -557,12 +557,12 @@ export default { customColumnList.splice(tcIndex + (dragOffset === 'bottom' ? 1 : 0), 0, column) } prevDropTrEl.draggable = false - prevDropTrEl.removeAttribute('dragoffset') + prevDropTrEl.removeAttribute('drag-pos') removeClass(prevDropTrEl, 'active--drag-target') } this.dragColumn = null trEl.draggable = false - trEl.removeAttribute('dragoffset') + trEl.removeAttribute('drag-pos') if (dragHintEl) { dragHintEl.style.display = '' } @@ -587,7 +587,7 @@ export default { const offsetY = evnt.clientY - trEl.getBoundingClientRect().y const dragOffset = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom' addClass(trEl, 'active--drag-target') - trEl.setAttribute('dragoffset', dragOffset) + trEl.setAttribute('drag-pos', dragOffset) this.prevDropTrEl = trEl } updateDropHint(this, evnt) diff --git a/packages/table/src/table.js b/packages/table/src/table.js index 1c80d3287..f93e17152 100644 --- a/packages/table/src/table.js +++ b/packages/table/src/table.js @@ -1054,7 +1054,7 @@ export default { const { leftList, rightList } = columnStore return h('div', { class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, { - [`vaild-msg--${validOpts.msgMode}`]: !!editRules, + [`valid-msg--${validOpts.msgMode}`]: !!editRules, 'vxe-editable': !!editConfig, 'old-cell-valid': editRules && GlobalConfig.cellVaildMode === 'obsolete', 'cell--highlight': highlightCell, diff --git a/styles/base/common.scss b/styles/base/common.scss index b003b23c9..88a9e9830 100644 --- a/styles/base/common.scss +++ b/styles/base/common.scss @@ -65,23 +65,23 @@ .vxe-filter--btn { &:before, &:after { - @include animatTransition(border); + @include createAnimationTransition(border); } } .vxe-input--wrapper { .vxe-input { - @include animatTransition(border); + @include createAnimationTransition(border); } } .vxe-table--expand-btn, .vxe-tree--node-btn { - @include animatTransition(transform); + @include createAnimationTransition(transform); } .vxe-checkbox, .vxe-radio { > input { &:checked+span { - @include animatTransition(background-color); + @include createAnimationTransition(background-color); } } } diff --git a/styles/button.scss b/styles/button.scss index 43b040c31..a2b5a2cb0 100644 --- a/styles/button.scss +++ b/styles/button.scss @@ -66,7 +66,7 @@ $btnThemeList: ( white-space: nowrap; user-select: none; appearance: none; - @include animatTransition(border, .2s); + @include createAnimationTransition(border, .2s); &:not(.is--disabled) { color: $vxe-font-color; cursor: pointer; @@ -306,7 +306,7 @@ $btnThemeList: ( display: inline-block; font-size: 12px; margin-left: 4px; - @include animatTransition(transform, .2s); + @include createAnimationTransition(transform, .2s); } .vxe-button--dropdown-panel { diff --git a/styles/custom.scss b/styles/custom.scss index deb7e192e..9535452ca 100644 --- a/styles/custom.scss +++ b/styles/custom.scss @@ -205,7 +205,7 @@ .vxe-table-custom-popup--row { &.active--drag-target { - &[dragoffset="top"] { + &[drag-pos="top"] { .vxe-table-custom-popup--column-item { &::after { display: block; @@ -213,7 +213,7 @@ } } } - &[dragoffset="bottom"] { + &[drag-pos="bottom"] { .vxe-table-custom-popup--column-item { &::after { display: block; @@ -223,7 +223,7 @@ } } &:first-child { - &[dragoffset="top"] { + &[drag-pos="top"] { .vxe-table-custom-popup--column-item { &::after { top: 0; @@ -232,7 +232,7 @@ } } &:last-child { - &[dragoffset="bottom"] { + &[drag-pos="bottom"] { .vxe-table-custom-popup--column-item { &::after { bottom: 0; diff --git a/styles/helpers/mixin.scss b/styles/helpers/mixin.scss index cdd3ca85d..670243a4f 100644 --- a/styles/helpers/mixin.scss +++ b/styles/helpers/mixin.scss @@ -1,4 +1,4 @@ -@mixin animatTransition ($property, $duration: .1s, $func: ease-in-out) { +@mixin createAnimationTransition ($property, $duration: .1s, $func: ease-in-out) { transition: $property $duration $func; } diff --git a/styles/input.scss b/styles/input.scss index d9c70fb12..b3b50b6b0 100644 --- a/styles/input.scss +++ b/styles/input.scss @@ -272,7 +272,7 @@ $iconWidth: 1.6em; align-items: center; justify-content: center; .vxe-input--panel-icon { - @include animatTransition(transform, .2s); + @include createAnimationTransition(transform, .2s); } } diff --git a/styles/modal.scss b/styles/modal.scss index a02690f61..652a1f196 100644 --- a/styles/modal.scss +++ b/styles/modal.scss @@ -82,13 +82,13 @@ &.is--animat { &.is--mask { &:before { - @include animatTransition(background-color, .2s); + @include createAnimationTransition(background-color, .2s); } } &.type--message { .vxe-modal--box { &:not(.is--drag) { - @include animatTransition(all, .4s, ease-out); + @include createAnimationTransition(all, .4s, ease-out); } } } diff --git a/styles/select.scss b/styles/select.scss index 36a316f82..07c67475a 100644 --- a/styles/select.scss +++ b/styles/select.scss @@ -30,7 +30,7 @@ width: 100%; .vxe-input--suffix-icon { display: inline-block; - @include animatTransition(transform, .2s); + @include createAnimationTransition(transform, .2s); } } &.is--active { diff --git a/styles/table.scss b/styles/table.scss index 6d9a96fe6..002e04f75 100644 --- a/styles/table.scss +++ b/styles/table.scss @@ -1211,7 +1211,7 @@ } } - &.vaild-msg--single { + &.valid-msg--single { .vxe-body--row { &:last-child { .vxe-cell--valid-error-hint { @@ -1225,7 +1225,7 @@ } } } - &.vaild-msg--full { + &.valid-msg--full { .vxe-body--row { &:last-child { .vxe-cell--valid-error-hint {