You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.4 KiB
106 lines
2.4 KiB
<script lang="ts" setup>
|
|
import { dateZhCN, zhCN, NModalProvider } from "naive-ui";
|
|
import { computed, onMounted, nextTick, inject } from "vue";
|
|
import { AppProvider } from "@/components/Application";
|
|
import { lighten } from "@/utils/index";
|
|
import mouseTrapBind from "@/hooks/event/mouseTrapBind";
|
|
const mousetrap = inject("mousetrap") as any;
|
|
onMounted(() => {
|
|
mouseTrapBind(mousetrap);
|
|
});
|
|
|
|
const getThemeOverrides = computed(() => {
|
|
const theme = "#1980FF";
|
|
const lightenStr = lighten(theme, 6);
|
|
|
|
return {
|
|
common: {
|
|
primaryColor: theme,
|
|
primaryColorHover: lightenStr,
|
|
primaryColorPressed: lightenStr,
|
|
primaryColorSuppl: theme,
|
|
},
|
|
Switch: {
|
|
railColorActive: "#07C984",
|
|
},
|
|
Input: {
|
|
borderHover: "0px",
|
|
borderFocus: "0px",
|
|
boxShadowFocus: "#ff0000",
|
|
},
|
|
Tag: {
|
|
colorCheckedHover: "#507afd",
|
|
colorCheckedPressed: "#507afd",
|
|
},
|
|
Slider: {
|
|
fillColor: "#1980FF",
|
|
dotBorderActive: "#1980FF",
|
|
fillColorHover: "#1980FF",
|
|
},
|
|
Card: {
|
|
padding: "0px",
|
|
},
|
|
Dropdown: {
|
|
optionColorHover: "#e8f2ff",
|
|
},
|
|
Upload: {
|
|
draggerBorder: "1px dashed #1980FF",
|
|
draggerBorderHover: "1px dashed #1980FF",
|
|
},
|
|
};
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<NConfigProvider
|
|
:locale="zhCN"
|
|
:date-locale="dateZhCN"
|
|
:theme-overrides="getThemeOverrides"
|
|
>
|
|
<NModalProvider>
|
|
<AppProvider>
|
|
<RouterView />
|
|
</AppProvider>
|
|
</NModalProvider>
|
|
</NConfigProvider>
|
|
</template>
|
|
|
|
<style lang="less">
|
|
.n-checkbox .n-checkbox__label {
|
|
color: #666666 !important;
|
|
font-size: 14px !important;
|
|
}
|
|
.n-checkbox.n-checkbox--disabled .n-checkbox__label {
|
|
color: #c9c9c9 !important;
|
|
font-size: 14px !important;
|
|
}
|
|
.draggable-ul .draggable-li {
|
|
color: #666666 !important;
|
|
font-size: 14px !important;
|
|
}
|
|
::v-deep(.n-base-clear > .n-base-clear__clear) {
|
|
color: #c9c9c9 !important;
|
|
}
|
|
.n-form-item.n-form-item--top-labelled .n-form-item-label {
|
|
flex-direction: row-reverse !important;
|
|
justify-content: flex-end !important;
|
|
}
|
|
.n-form-item .n-form-item-label .n-form-item-label__asterisk {
|
|
transform: rotate(-90deg) !important;
|
|
}
|
|
.n-scrollbar-content {
|
|
padding: 0 7.97px 0 4px;
|
|
}
|
|
.n-form-item .n-form-item-label {
|
|
font-size: 14px !important;
|
|
color: #333333 !important;
|
|
}
|
|
.n-slider-dots > .n-slider-dot:nth-child(2) {
|
|
display: none !important;
|
|
}
|
|
.n-collapse-item-arrow i svg {
|
|
width: 14px !important;
|
|
height: 14px !important;
|
|
}
|
|
</style>
|