style: add variables

This commit is contained in:
Fine 2023-06-27 20:44:23 +08:00
parent 63db3fbc2e
commit 3f1e68a640
4 changed files with 33 additions and 4 deletions

20
src/styles/variables.scss Normal file
View File

@ -0,0 +1,20 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
$font-color: #3d444f;
$active-color: #409eff;
$theme-background: #fff;

View File

@ -55,7 +55,7 @@ limitations under the License. -->
</span>
</template>
</el-table-column>
<el-table-column prop="layer" label="Layer" width="120" />
<el-table-column prop="layer" label="Layer" width="160" />
<el-table-column prop="entity" label="Entity" width="200" />
<el-table-column prop="isRoot" label="Root" width="60">
<template #default="scope">
@ -481,7 +481,7 @@ limitations under the License. -->
.table {
padding: 20px 10px;
background-color: #fff;
box-shadow: 0px 1px 4px 0px #00000029;
box-shadow: 0 1px 4px 0 #00000029;
border-radius: 5px;
width: 100%;
height: 100%;

View File

@ -293,7 +293,7 @@ limitations under the License. -->
text-align: center;
&:hover {
color: #409eff;
color: $active-color;
background-color: #eee;
}
}

View File

@ -27,6 +27,7 @@ import path from "path";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
const OUTPUT_DIR = "dist";
const pathSrc = path.resolve(__dirname, "./src");
// https://vitejs.dev/config/
export default ({ mode }: ConfigEnv): UserConfig => {
const { VITE_SW_PROXY_TARGET } = loadEnv(mode, process.cwd());
@ -54,11 +55,19 @@ export default ({ mode }: ConfigEnv): UserConfig => {
resolve: {
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
alias: {
"@": path.resolve(__dirname, "./src"),
"@": pathSrc,
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
},
preserveSymlinks: true,
},
css: {
preprocessorOptions: {
//define global scss variable
scss: {
additionalData: `@import "@/styles/variables.scss";`,
},
},
},
server: {
host: true,
port: 3000,