fix: UI库样式优化

This commit is contained in:
dataeaseShu
2025-05-12 10:38:26 +08:00
committed by 王嘉豪
parent d45961f970
commit c8802e07f5
4 changed files with 30 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
<template>
<el-dialog
ref="previewPopDialog"
:custom-class="'preview_pop_custom'"
modal-class="preview_pop_custom"
:append-to-body="true"
:fullscreen="state.fullscreen"
v-model="state.dialogShow"

View File

@@ -119,19 +119,44 @@ const btnStyle = computed(() => {
return style
})
function rgbaTo16color(color) {
let val = color
.replace(/rgba?\(/, '')
.replace(/\)/, '')
.replace(/[\s+]/g, '')
.split(',')
let a = parseFloat(val[3] || 1),
r = Math.floor(a * parseInt(val[0]) + (1 - a) * 255),
g = Math.floor(a * parseInt(val[1]) + (1 - a) * 255),
b = Math.floor(a * parseInt(val[2]) + (1 - a) * 255)
return (
'#' +
('0' + r.toString(16)).slice(-2) +
('0' + g.toString(16)).slice(-2) +
('0' + b.toString(16)).slice(-2)
)
}
const btnHoverStyle = computed(() => {
let btnColor = customStyle.btnColor
if (customStyle.btnColor.startsWith('rgb')) {
btnColor = rgbaTo16color(customStyle.btnColor)
} else {
btnColor = customStyle.btnColor.substr(1)
}
return {
rawColor: customStyle.btnColor ?? '#3370ff',
hoverColor: customStyle.btnColor
? colorFunctions
.mix(new colorTree('ffffff'), new colorTree(customStyle.btnColor.substr(1)), {
.mix(new colorTree('ffffff'), new colorTree(btnColor), {
value: 15
})
.toRGB()
: '#5285FF',
activeColor: customStyle.btnColor
? colorFunctions
.mix(new colorTree('000000'), new colorTree(customStyle.btnColor.substr(1)), {
.mix(new colorTree('000000'), new colorTree(btnColor), {
value: 15
})
.toRGB()

View File

@@ -80,7 +80,7 @@ defineExpose({
<el-dialog
v-model="dialogVisible"
width="600"
custom-class="tree-field_dialog"
modal-class="tree-field_dialog"
:before-close="handleBeforeClose"
@mousedown.stop
@mousedup.stop

View File

@@ -2566,7 +2566,7 @@ const getIconNameCalc = (deType, extField, dimension = false) => {
ref="creatDsFolder"
></creat-ds-group>
<el-dialog
custom-class="calc-field-edit-dialog"
modal-class="calc-field-edit-dialog"
v-model="editCalcField"
width="1000px"
:title="calcTitle"