diff --git a/bi-ui/src/assets/css/element-plus-dark.scss b/bi-ui/src/assets/css/element-plus-dark.scss new file mode 100644 index 0000000..affec8a --- /dev/null +++ b/bi-ui/src/assets/css/element-plus-dark.scss @@ -0,0 +1,5 @@ + :root, + html, + html.dark { + @include varELColor($el-colors, -$w-step); + } \ No newline at end of file diff --git a/bi-ui/src/assets/css/element-plus.scss b/bi-ui/src/assets/css/element-plus.scss new file mode 100644 index 0000000..2619507 --- /dev/null +++ b/bi-ui/src/assets/css/element-plus.scss @@ -0,0 +1,3 @@ + :root,html { + @include varELColor($el-colors, $w-step); + } \ No newline at end of file diff --git a/bi-ui/src/assets/css/global.scss b/bi-ui/src/assets/css/global.scss index 932bc33..473805f 100644 --- a/bi-ui/src/assets/css/global.scss +++ b/bi-ui/src/assets/css/global.scss @@ -37,8 +37,8 @@ $w-z-index: 100; $w-z-index-top: 1000; $colors: ( - "main": #2781bf, - "text": #333, + "main": hsl(185, 80%, 50%), + "text": hsl(185, 80%, 5%), "bg": #F8F8F8, "primary": #3c9cff, "warn": #eaa339, @@ -61,6 +61,16 @@ $dark-colors: ( "danger": map.get($colors, "danger") ); +$el-colors: ( + "primary":"main", + "warn": "warn", + "success": "success", + "info": "info", + "error": "error", + "danger": "danger" +); + + @mixin varColor($map, $step) { @@ -68,21 +78,33 @@ $dark-colors: ( $s: color.channel($value, "saturation", $space: hsl); $h: color.channel($value, "hue", $space: hsl); $l: color.channel($value, "lightness", $space: hsl); - --w-#{$name}:#{$value}; - --w-#{$name}-h:#{$h}; - --w-#{$name}-s:#{$s}; - --w-#{$name}-l:#{$l}; - --w-#{$name}-light:#{hsl($h,$s,$l + $step)}; - --w-#{$name}-light-1:#{hsl($h,$s,$l + ($step * 2))}; - --w-#{$name}-light-2:#{hsl($h,$s,$l + ($step * 3))}; - --w-#{$name}-light-3:#{hsl($h,$s,$l + ($step * 4))}; - --w-#{$name}-light-4:#{hsl($h,$s,$l + ($step * 5))}; - --w-#{$name}-light-5:#{hsl($h,$s,$l + ($step * 6))}; - --w-#{$name}-dark:#{hsl($h,$s,$l - $step)}; - --w-#{$name}-dark-1:#{hsl($h,$s,$l - ($step * 2))}; - --w-#{$name}-dark-2:#{hsl($h,$s,$l - ($step * 3))}; - --w-#{$name}-dark-3:#{hsl($h,$s,$l - ($step * 4))}; - --w-#{$name}-dark-4:#{hsl($h,$s,$l - ($step * 5))}; - --w-#{$name}-dark-5:#{hsl($h,$s,$l - ($step * 6))}; + --w-#{$name}-h: #{$h}; + --w-#{$name}-s: #{$s}; + --w-#{$name}-l: #{$l}; + --w-#{$name}: hsl(var(--w-#{$name}-h), var(--w-#{$name}-s), var(--w-#{$name}-l)); + // 生成浅色系列颜色变量 + @for $n from 1 through 6 { + @if $n == 1 { + --w-#{$name}-light: hsl(var(--w-#{$name}-h), var(--w-#{$name}-s), calc(var(--w-#{$name}-l) + #{$n} * var(--w-step) * 1%)); + --w-#{$name}-dark: hsl(var(--w-#{$name}-h), var(--w-#{$name}-s), calc(var(--w-#{$name}-l) - #{$n} * var(--w-step) * 1%)); + } @else { + --w-#{$name}-light-#{$n - 1}: hsl(var(--w-#{$name}-h), var(--w-#{$name}-s), calc(var(--w-#{$name}-l) + #{$n} * var(--w-step) * 1%)); + --w-#{$name}-dark-#{$n - 1}: hsl(var(--w-#{$name}-h), var(--w-#{$name}-s), calc(var(--w-#{$name}-l) - #{$n} * var(--w-step) * 1%)); + } + } + + } +} + + +@mixin varELColor($map, $step) { + @each $name , $value in $map { + + --el-color-#{$name}: hsl(var(--w-#{$value}-h), var(--w-#{$value}-s), var(--w-#{$value}-l)); + + @for $n from 1 through 9 { + --el-color-#{$name}-light-#{$n}: hsl(var(--w-#{$value}-h), var(--w-#{$value}-s), calc(var(--w-#{$value}-l) + #{$n} * var(--w-step) * 1%)); + --el-color-#{$name}-dark-#{$n}: hsl(var(--w-#{$value}-h), var(--w-#{$value}-s), calc(var(--w-#{$value}-l) - #{$n} * var(--w-step) * 1%)); + } } } \ No newline at end of file diff --git a/bi-ui/src/assets/css/main.scss b/bi-ui/src/assets/css/main.scss index e0537fe..c716563 100644 --- a/bi-ui/src/assets/css/main.scss +++ b/bi-ui/src/assets/css/main.scss @@ -89,6 +89,8 @@ border-radius: 10em; border: .25em solid currentColor; background-color: #FFF; + + z-index: 1; transform: rotate(-25deg); padding: 0; @@ -258,6 +260,7 @@ &::before { content: ''; + display: inline-block; font-size: var(--btn-size, inherit); width: 1em; height: 1em; diff --git a/bi-ui/src/components/global/WColorHsl.vue b/bi-ui/src/components/global/WColorHsl.vue new file mode 100644 index 0000000..b2b1e03 --- /dev/null +++ b/bi-ui/src/components/global/WColorHsl.vue @@ -0,0 +1,83 @@ + + + + \ No newline at end of file diff --git a/bi-ui/src/components/global/WColorLoop.vue b/bi-ui/src/components/global/WColorLoop.vue new file mode 100644 index 0000000..4330552 --- /dev/null +++ b/bi-ui/src/components/global/WColorLoop.vue @@ -0,0 +1,89 @@ + + + + \ No newline at end of file diff --git a/bi-ui/src/components/global/WDragZoom.vue b/bi-ui/src/components/global/WDragZoom.vue new file mode 100644 index 0000000..475e5ba --- /dev/null +++ b/bi-ui/src/components/global/WDragZoom.vue @@ -0,0 +1,109 @@ + + + + \ No newline at end of file diff --git a/bi-ui/src/components/global/WEcharts.vue b/bi-ui/src/components/global/WEcharts.vue index 0aae861..f917597 100644 --- a/bi-ui/src/components/global/WEcharts.vue +++ b/bi-ui/src/components/global/WEcharts.vue @@ -70,7 +70,7 @@ const getDefaultOption = () => ({ }, xAxis: { type: 'category', - boundaryGap: false, + boundaryGap: true, // data: [], axisLine: { lineStyle: { diff --git a/bi-ui/src/components/global/WEffectNoise.vue b/bi-ui/src/components/global/WEffectNoise.vue index 3115efd..6a25ffc 100644 --- a/bi-ui/src/components/global/WEffectNoise.vue +++ b/bi-ui/src/components/global/WEffectNoise.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/bi-ui/src/components/global/WMove.vue b/bi-ui/src/components/global/WMove.vue index 59be651..d179f97 100644 --- a/bi-ui/src/components/global/WMove.vue +++ b/bi-ui/src/components/global/WMove.vue @@ -6,12 +6,12 @@ 'z-index': zIndex }"> 可移动内容 -
{{ xy.x }}:{{ xy.y }}
- +
{{ xy.x }}:{{ xy.y }}
+ \ No newline at end of file diff --git a/bi-ui/src/components/global/WTagSelect.vue b/bi-ui/src/components/global/WTagSelect.vue index 38030d1..450af89 100644 --- a/bi-ui/src/components/global/WTagSelect.vue +++ b/bi-ui/src/components/global/WTagSelect.vue @@ -1,5 +1,5 @@ @@ -12,6 +12,7 @@ const dictStore = useDictStore(); const modelValue = defineModel({type: Number}); + const props = defineProps({ name: { type: String, @@ -43,4 +44,4 @@ const emit = defineEmits(['change']) \ No newline at end of file + diff --git a/bi-ui/src/components/global/WTheme.vue b/bi-ui/src/components/global/WTheme.vue index c570649..b60fd12 100644 --- a/bi-ui/src/components/global/WTheme.vue +++ b/bi-ui/src/components/global/WTheme.vue @@ -1,5 +1,5 @@