mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
perf: 优化主题颜色UI
This commit is contained in:
parent
0d726846fc
commit
c74b3957a6
@ -17,12 +17,9 @@
|
|||||||
v-for="colorItem in fetchShowColors(value.color)"
|
v-for="colorItem in fetchShowColors(value.color)"
|
||||||
:key="colorItem"
|
:key="colorItem"
|
||||||
:style="{ backgroundColor: colorItem }"
|
:style="{ backgroundColor: colorItem }"
|
||||||
></span>
|
></span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="theme-bottom" :style="{ backgroundImage: chartColorsshow[key] }"></div>
|
||||||
class="theme-bottom"
|
|
||||||
:style="{ backgroundImage: chartColorsshow[key] }"
|
|
||||||
></div>
|
|
||||||
</n-card>
|
</n-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -31,12 +28,7 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import {
|
import { chartColors, chartColorsName, chartColorsshow, ChartColorsNameType } from '@/settings/chartThemes/index'
|
||||||
chartColors,
|
|
||||||
chartColorsName,
|
|
||||||
chartColorsshow,
|
|
||||||
ChartColorsNameType
|
|
||||||
} from '@/settings/chartThemes/index'
|
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
@ -69,6 +61,8 @@ const selectTheme = (theme: ChartColorsNameType) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
$radius: 10px;
|
||||||
|
|
||||||
@include go(chart-theme-color) {
|
@include go(chart-theme-color) {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
.card-box {
|
.card-box {
|
||||||
@ -76,14 +70,8 @@ const selectTheme = (theme: ChartColorsNameType) => {
|
|||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@include fetch-bg-color('background-color4-shallow');
|
@include fetch-bg-color('background-color4-shallow');
|
||||||
border-radius: 23px;
|
border-radius: $radius;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@include deep() {
|
|
||||||
.n-card__content {
|
|
||||||
padding-top: 5px;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.selected {
|
&.selected {
|
||||||
border: 1px solid v-bind('themeColor');
|
border: 1px solid v-bind('themeColor');
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0);
|
border-bottom: 1px solid rgba(0, 0, 0, 0);
|
||||||
@ -93,12 +81,13 @@ const selectTheme = (theme: ChartColorsNameType) => {
|
|||||||
}
|
}
|
||||||
.go-flex-items-center {
|
.go-flex-items-center {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
margin-top: -4px;
|
||||||
}
|
}
|
||||||
.theme-color-item {
|
.theme-color-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-radius: 50%;
|
border-radius: $radius;
|
||||||
}
|
}
|
||||||
.theme-bottom {
|
.theme-bottom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</n-icon>
|
</n-icon>
|
||||||
<n-text @click="handleFocus">
|
<n-text @click="handleFocus">
|
||||||
工作空间 -
|
工作空间 -
|
||||||
<n-button v-show="!focus" secondary round size="tiny">
|
<n-button v-show="!focus" secondary size="tiny">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
{{ comTitle }}
|
{{ comTitle }}
|
||||||
</span>
|
</span>
|
||||||
@ -19,7 +19,6 @@
|
|||||||
type="text"
|
type="text"
|
||||||
maxlength="16"
|
maxlength="16"
|
||||||
show-count
|
show-count
|
||||||
round
|
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
v-model:value.trim="title"
|
v-model:value.trim="title"
|
||||||
@keyup.enter="handleBlur"
|
@keyup.enter="handleBlur"
|
||||||
@ -74,6 +73,8 @@ const handleBlur = () => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.title {
|
.title {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user