From 9fba04f8a59691d679c9a7279e2fb5891c0aea43 Mon Sep 17 00:00:00 2001 From: 94dreamer <503633021@qq.com> Date: Fri, 26 Nov 2021 11:32:16 +0800 Subject: [PATCH] docs: init --- .eslintrc | 48 +++ .gitignore | 4 +- cache.dockerfile | 15 + package.json | 86 +++++ src/main.ts | 18 + src/pages/dashboard/base/constants.ts | 201 +++++++++++ src/pages/dashboard/base/index.vue | 317 +++++++++++++++++ src/pages/dashboard/detail/index.vue | 115 +++++++ src/pages/detail/deploy/index.vue | 186 ++++++++++ src/pages/form/base/index.vue | 210 ++++++++++++ src/pages/list/base/index.vue | 199 +++++++++++ src/pages/list/card/components/Card.vue | 240 +++++++++++++ src/pages/list/card/components/DialogForm.vue | 121 +++++++ src/pages/list/card/index.vue | 206 +++++++++++ src/pages/list/components/Table.vue | 320 ++++++++++++++++++ src/pages/list/tree/index.vue | 91 +++++ src/pages/login/components/Login.vue | 164 +++++++++ src/pages/user/constants.ts | 74 ++++ src/pages/user/index.vue | 154 +++++++++ src/style/variables.less | 250 ++++++++++++++ 20 files changed, 3018 insertions(+), 1 deletion(-) create mode 100644 .eslintrc create mode 100644 cache.dockerfile create mode 100644 package.json create mode 100644 src/main.ts create mode 100644 src/pages/dashboard/base/constants.ts create mode 100644 src/pages/dashboard/base/index.vue create mode 100644 src/pages/dashboard/detail/index.vue create mode 100644 src/pages/detail/deploy/index.vue create mode 100644 src/pages/form/base/index.vue create mode 100644 src/pages/list/base/index.vue create mode 100644 src/pages/list/card/components/Card.vue create mode 100644 src/pages/list/card/components/DialogForm.vue create mode 100644 src/pages/list/card/index.vue create mode 100644 src/pages/list/components/Table.vue create mode 100644 src/pages/list/tree/index.vue create mode 100644 src/pages/login/components/Login.vue create mode 100644 src/pages/user/constants.ts create mode 100644 src/pages/user/index.vue create mode 100644 src/style/variables.less diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..5e20934 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,48 @@ +{ + "extends": [ + "plugin:@typescript-eslint/recommended", + "eslint-config-airbnb-base", + "plugin:vue/vue3-recommended", + "plugin:prettier/recommended" + ], + "env": { + "browser": true, + "node": true, + "jest": true, + "es6": true + }, + "plugins": [ + "vue", + "@typescript-eslint" + ], + "parserOptions": { + "parser": "@typescript-eslint/parser", + "sourceType": "module", + "allowImportExportEverywhere": true, + "ecmaFeatures": { + "jsx": true + } + }, + "settings": { + "import/extensions": [ + ".js", + ".jsx", + ".ts", + ".tsx" + ] + }, + "rules": { + "import/extensions": "off", + "import/no-unresolved": "off", + "@typescript-eslint/no-explicit-any": "off", + "no-continue": "off", + "no-restricted-syntax": "off", + "guard-for-in": "off", + "import/no-extraneous-dependencies": "off", + "import/prefer-default-export": "off", + "no-plusplus": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "no-param-reassign": "off", + "no-shadow": "off" + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b762a18..1dd38d3 100755 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,9 @@ temp* coverage test-report.html .idea/ +yarn.lock yarn-error.log +package-lock.json *.zip .history -.stylelintcache \ No newline at end of file +.stylelintcache diff --git a/cache.dockerfile b/cache.dockerfile new file mode 100644 index 0000000..5e0cae1 --- /dev/null +++ b/cache.dockerfile @@ -0,0 +1,15 @@ +# 选择一个 Base 镜像 +FROM node:12 + +# 设置工作目录 +WORKDIR /space + +# 将 by 中的文件列表 COPY 过来 +COPY . . + +# 根据 COPY 过来的文件进行依赖的安装 +RUN npm i + +# 设置好需要的环境变量 +ENV NODE_PATH=/space/node_modules + diff --git a/package.json b/package.json new file mode 100644 index 0000000..0be8a2c --- /dev/null +++ b/package.json @@ -0,0 +1,86 @@ +{ + "name": "tdesign-vue-next-starter", + "version": "0.0.1", + "scripts": { + "dev:mock": "vite --open --mode mock", + "dev": "vite --open --mode development", + "dev:linux": "vite --mode developmenet", + "build:test": "vite build --mode test", + "build": "vue-tsc --noEmit && vite build", + "serve": "vite preview", + "lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0", + "lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --max-warnings 0 --fix", + "stylelint": "stylelint src/**/*.{html,vue,sass,less}", + "stylelint:fix": "stylelint --cache --fix src/**/*.{html,vue,vss,sass,less}" + }, + "dependencies": { + "dayjs": "^1.10.6", + "echarts": "^5.2.1", + "nprogress": "^0.2.0", + "qrcode.vue": "^3.2.2", + "tdesign-vue-next": "^0.4.1", + "vue": "^3.1.5", + "vue-router": "^4.0.11", + "vue3-clipboard": "^1.0.0", + "vuex": "^4.0.2" + }, + "devDependencies": { + "@commitlint/cli": "^13.1.0", + "@commitlint/config-conventional": "^13.1.0", + "@typescript-eslint/eslint-plugin": "^4.29.3", + "@typescript-eslint/parser": "^4.29.3", + "@types/echarts": "^4.9.10", + "@vitejs/plugin-vue": "^1.3.0", + "@vitejs/plugin-vue-jsx": "^1.1.7", + "@vue/compiler-sfc": "^3.0.5", + "axios": "^0.21.1", + "commitizen": "^4.2.4", + "compressorjs": "^1.0.7", + "eslint": "^7.32.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.24.2", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-vue": "^7.16.0", + "http-proxy-agent": "^4.0.1", + "husky": "^7.0.4", + "less": "^4.1.1", + "mockjs": "^1.1.0", + "prettier": "^2.4.1", + "stylelint": "^13.13.1", + "stylelint-config-airbnb": "^0.0.0", + "stylelint-order": "^4.1.0", + "stylelint-scss": "^3.20.0", + "typescript": "^4.4.3", + "vite": "^2.4.4", + "vite-plugin-mock": "^2.9.6", + "vite-plugin-svg-sprite-component": "^1.0.10", + "vite-svg-loader": "^3.1.0", + "vue-clipboard3": "^1.0.1", + "vue-tsc": "^0.2.2", + "vuex-router-sync": "^5.0.0" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "lint-staged": { + "*.{js,jsx,vue,ts,tsx}": [ + "prettier --write", + "npm run lint:fix", + "git add" + ], + "*.{html,vue,vss,sass,less}": [ + "npm run stylelint:fix", + "git add" + ] + } +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..dbb74f8 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,18 @@ +import { createApp } from 'vue'; +import TDesign from 'tdesign-vue-next/esm'; +import VueClipboard from 'vue3-clipboard'; + +import App from './App.vue'; +import { store } from './store'; +import router from './router'; + +import '@/style/index.less'; + +const app = createApp(App); + +app.use(TDesign); +app.use(store); +app.use(router); +app.use(VueClipboard); + +app.mount('#app'); diff --git a/src/pages/dashboard/base/constants.ts b/src/pages/dashboard/base/constants.ts new file mode 100644 index 0000000..a0f4e63 --- /dev/null +++ b/src/pages/dashboard/base/constants.ts @@ -0,0 +1,201 @@ +import { TdBaseTableProps } from 'tdesign-vue-next'; + +interface DashboardPannel { + title: string; + number: string | number; + leftType: string; + upTrend?: string; + downTrend?: string; +} + +interface TendItem { + growUp?: number; + productName: string; + count: number; + date: string; +} + +export const PANE_LIST: Array = [ + { + title: '总收入', + number: '¥ 28,425.00', + upTrend: '20.5%', + leftType: 'echarts-line', + }, + { + title: '总退款', + number: '¥ 768.00', + downTrend: '20.5%', + leftType: 'echarts-bar', + }, + { + title: '活跃用户(个)', + number: '1126', + downTrend: '20.5%', + leftType: 'icon-usergroup', + }, + { + title: '产生订单(个)', + number: 527, + downTrend: '20.5%', + leftType: 'icon-file-paste', + }, +]; + +export const SALE_TEND_LIST: Array = [ + { + growUp: 1, + productName: '国家电网有限公司', + count: 7059, + date: '2021-09-01', + }, + { + growUp: -1, + productName: '深圳燃气集团股份有限公司', + count: 6437, + date: '2021-09-01', + }, + { + growUp: 4, + productName: '国家烟草专卖局', + count: 4221, + date: '2021-09-01', + }, + { + growUp: 3, + productName: '中国电信集团有限公司', + count: 3317, + date: '2021-09-01', + }, + { + growUp: -3, + productName: '中国移动通信集团有限公司', + count: 3015, + date: '2021-09-01', + }, + { + growUp: -3, + productName: '新余市办公用户采购项目', + count: 2015, + date: '2021-09-12', + }, +]; + +export const BUY_TEND_LIST: Array = [ + { + growUp: 1, + productName: '腾讯科技(深圳)有限公司', + count: 3015, + date: '2021-09-01', + }, + { + growUp: -1, + productName: '大润发有限公司', + count: 2015, + date: '2021-09-01', + }, + { + growUp: 6, + productName: '四川海底捞股份有限公司', + count: 1815, + date: '2021-09-11', + }, + { + growUp: -3, + productName: '索尼(中国)有限公司', + count: 1015, + date: '2021-09-21', + }, + { + growUp: -4, + productName: '松下电器(中国)有限公司', + count: 445, + date: '2021-09-19', + }, + { + growUp: -3, + productName: '新余市办公用户采购项目', + count: 2015, + date: '2021-09-12', + }, +]; + +export const SALE_COLUMNS: TdBaseTableProps['columns'] = [ + { + align: 'center', + colKey: 'index', + title: '排名', + width: 64, + }, + { + align: 'left', + ellipsis: true, + colKey: 'productName', + title: '客户名称', + minWidth: '200', + }, + { + align: 'center', + colKey: 'growUp', + width: 100, + title: '较上周', + }, + { + align: 'center', + colKey: 'count', + title: '订单量', + width: 100, + }, + { + align: 'center', + colKey: 'date', + width: 132, + title: '合同签订日期', + }, + { + align: 'center', + colKey: 'operation', + title: '操作', + width: 76, + }, +]; + +export const BUY_COLUMNS: TdBaseTableProps['columns'] = [ + { + align: 'center', + colKey: 'index', + title: '排名', + width: 64, + }, + { + align: 'left', + ellipsis: true, + colKey: 'productName', + title: '供应商名称', + minWidth: 200, + }, + { + align: 'center', + colKey: 'growUp', + width: 100, + title: '较上周', + }, + { + align: 'center', + colKey: 'count', + title: '订单量', + width: '100', + }, + { + align: 'center', + colKey: 'date', + width: 132, + title: '合同签订日期', + }, + { + align: 'center', + colKey: 'operation', + title: '操作', + width: 76, + }, +]; diff --git a/src/pages/dashboard/base/index.vue b/src/pages/dashboard/base/index.vue new file mode 100644 index 0000000..bc66359 --- /dev/null +++ b/src/pages/dashboard/base/index.vue @@ -0,0 +1,317 @@ + + + diff --git a/src/pages/dashboard/detail/index.vue b/src/pages/dashboard/detail/index.vue new file mode 100644 index 0000000..3ecd088 --- /dev/null +++ b/src/pages/dashboard/detail/index.vue @@ -0,0 +1,115 @@ + + + diff --git a/src/pages/detail/deploy/index.vue b/src/pages/detail/deploy/index.vue new file mode 100644 index 0000000..db7f54b --- /dev/null +++ b/src/pages/detail/deploy/index.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/pages/form/base/index.vue b/src/pages/form/base/index.vue new file mode 100644 index 0000000..e1f9c9c --- /dev/null +++ b/src/pages/form/base/index.vue @@ -0,0 +1,210 @@ + + + diff --git a/src/pages/list/base/index.vue b/src/pages/list/base/index.vue new file mode 100644 index 0000000..3977f32 --- /dev/null +++ b/src/pages/list/base/index.vue @@ -0,0 +1,199 @@ + + + diff --git a/src/pages/list/card/components/Card.vue b/src/pages/list/card/components/Card.vue new file mode 100644 index 0000000..c728a4e --- /dev/null +++ b/src/pages/list/card/components/Card.vue @@ -0,0 +1,240 @@ + + + + diff --git a/src/pages/list/card/components/DialogForm.vue b/src/pages/list/card/components/DialogForm.vue new file mode 100644 index 0000000..223d4d7 --- /dev/null +++ b/src/pages/list/card/components/DialogForm.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/pages/list/card/index.vue b/src/pages/list/card/index.vue new file mode 100644 index 0000000..b728d64 --- /dev/null +++ b/src/pages/list/card/index.vue @@ -0,0 +1,206 @@ + + + diff --git a/src/pages/list/components/Table.vue b/src/pages/list/components/Table.vue new file mode 100644 index 0000000..39b1ba2 --- /dev/null +++ b/src/pages/list/components/Table.vue @@ -0,0 +1,320 @@ + + + + diff --git a/src/pages/list/tree/index.vue b/src/pages/list/tree/index.vue new file mode 100644 index 0000000..5b69f21 --- /dev/null +++ b/src/pages/list/tree/index.vue @@ -0,0 +1,91 @@ + + + diff --git a/src/pages/login/components/Login.vue b/src/pages/login/components/Login.vue new file mode 100644 index 0000000..feff449 --- /dev/null +++ b/src/pages/login/components/Login.vue @@ -0,0 +1,164 @@ + + + diff --git a/src/pages/user/constants.ts b/src/pages/user/constants.ts new file mode 100644 index 0000000..7d3bfa0 --- /dev/null +++ b/src/pages/user/constants.ts @@ -0,0 +1,74 @@ +export const USER_INFO_LIST = [ + { + title: '手机', + content: '+86 13923734567', + }, + { + title: '座机', + content: '734567', + }, + { + title: '办公室邮箱', + content: 'Account@qq.com', + }, + { + title: '座位', + content: 'T32F 012', + }, + { + title: '管理主体', + content: '腾讯集团', + }, + { + title: '直属上级', + content: 'Account@qq.com', + }, + { + title: '直属上级', + content: '高级 UI 设计师', + }, + { + title: '入职时间', + content: '2021-07-01', + }, + { + title: '所属团队', + content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组', + span: 6, + }, +]; + +export const TEAM_MEMBERS = [ + { + avatar: 'https://tdesign.gtimg.com/pro-template/personal/avatar5.png', + title: 'Lovellzhang 张庆霖', + description: '直客销售 港澳拓展组员工', + }, + { + avatar: 'https://tdesign.gtimg.com/pro-template/personal/avatar1.png', + title: 'Jiajingwang 王佳静', + description: '前端开发 前台研发组员工', + }, + { + avatar: 'https://tdesign.gtimg.com/pro-template/personal/avatar5.png', + title: 'cruisezhang 张超', + description: '技术产品 产品组员工', + }, + { + avatar: 'https://tdesign.gtimg.com/pro-template/personal/avatar3.png', + title: 'Lovellzhang 张庆霖', + description: '产品运营 港澳拓展组员工', + }, +]; + +export const PRODUCT_LIST = [ + { + logo: 'https://tdesign.gtimg.com/pro-template/tdesign-icon1.png', + }, + { + logo: 'https://tdesign.gtimg.com/pro-template/tdesign-icon2.png', + }, + { + logo: 'https://tdesign.gtimg.com/pro-template/tdesign-icon3.png', + }, +]; diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue new file mode 100644 index 0000000..3a97a26 --- /dev/null +++ b/src/pages/user/index.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/style/variables.less b/src/style/variables.less new file mode 100644 index 0000000..4c8a3b7 --- /dev/null +++ b/src/style/variables.less @@ -0,0 +1,250 @@ +/** 公共前缀 */ +@prefix: tdesign-pro; + +// 颜色色板 + +@brand-color-1: var(--td-brand-color-1); +@brand-color-2: var(--td-brand-color-2); +@brand-color-3: var(--td-brand-color-3); +@brand-color-4: var(--td-brand-color-4); +@brand-color-5: var(--td-brand-color-5); +@brand-color-6: var(--td-brand-color-6); +@brand-color-7: var(--td-brand-color-7); +@brand-color-8: var(--td-brand-color-8); +@brand-color-9: var(--td-brand-color-9); +@brand-color-10: var(--td-brand-color-10); + +@warning-color-1: var(--td-warning-color-1); +@warning-color-2: var(--td-warning-color-2); +@warning-color-3: var(--td-warning-color-3); +@warning-color-4: var(--td-warning-color-4); +@warning-color-5: var(--td-warning-color-5); +@warning-color-6: var(--td-warning-color-6); +@warning-color-7: var(--td-warning-color-7); +@warning-color-8: var(--td-warning-color-8); +@warning-color-9: var(--td-warning-color-9); +@warning-color-10: var(--td-warning-color-10); + +@error-color-1: var(--td-error-color-1); +@error-color-2: var(--td-error-color-2); +@error-color-3: var(--td-error-color-3); +@error-color-4: var(--td-error-color-4); +@error-color-5: var(--td-error-color-5); +@error-color-6: var(--td-error-color-6); +@error-color-7: var(--td-error-color-7); +@error-color-8: var(--td-error-color-8); +@error-color-9: var(--td-error-color-9); +@error-color-10: var(--td-error-color-10); + +@success-color-1: var(--td-success-color-1); +@success-color-2: var(--td-success-color-2); +@success-color-3: var(--td-success-color-3); +@success-color-4: var(--td-success-color-4); +@success-color-5: var(--td-success-color-5); +@success-color-6: var(--td-success-color-6); +@success-color-7: var(--td-success-color-7); +@success-color-8: var(--td-success-color-8); +@success-color-9: var(--td-success-color-9); +@success-color-10: var(--td-success-color-10); + +@gray-color-1: var(--td-gray-color-1); +@gray-color-2: var(--td-gray-color-2); +@gray-color-3: var(--td-gray-color-3); +@gray-color-4: var(--td-gray-color-4); +@gray-color-5: var(--td-gray-color-5); +@gray-color-6: var(--td-gray-color-6); +@gray-color-7: var(--td-gray-color-7); +@gray-color-8: var(--td-gray-color-8); +@gray-color-9: var(--td-gray-color-9); +@gray-color-10: var(--td-gray-color-10); +@gray-color-11: var(--td-gray-color-11); +@gray-color-12: var(--td-gray-color-12); +@gray-color-13: var(--td-gray-color-13); +@gray-color-14: var(--td-gray-color-14); + +// 文字 & 图标 颜色 +@font-white-1: var(--td-font-white-1); +@font-white-2: var(--td-font-white-2); +@font-white-3: var(--td-font-white-3); +@font-white-4: var(--td-font-white-4); + +@font-gray-1: var(--td-font-gray-1); +@font-gray-2: var(--td-font-gray-2); +@font-gray-3: var(--td-font-gray-3); +@font-gray-4: var(--td-font-gray-4); + +// 基础颜色 +@brand-color: var(--td-brand-color); // 色彩-品牌-可操作 +@warning-color: var(--td-warning-color); // 色彩-功能-警告 +@error-color: var(--td-error-color); // 色彩-功能-失败 +@success-color: var(--td-success-color); // 色彩-功能-成功 + + +// 基础颜色的扩展 用于 hover / 聚焦 / 禁用 / 点击 等状态 +@brand-color-hover: var(--td-brand-color-hover); // hover态 +@brand-color-focus: var(--td-brand-color-focus); // focus态,包括鼠标和键盘 +@brand-color-active: var(--td-brand-color-active); // 点击态 +@brand-color-disabled: var(--td-brand-color-disabled); // 禁用态 +@brand-color-light: var(--td-brand-color-light); // 浅色的选中态 + +// 警告色扩展 +@warning-color-hover: var(--td-warning-color-hover); +@warning-color-focus: var(--td-warning-color-focus); +@warning-color-active: var(--td-warning-color-active); +@warning-color-disabled: var(--td-warning-color-disabled); +@warning-color-light: var(--td-warning-color-light); + +// 失败/错误色扩展 +@error-color-hover: var(--td-error-color-hover); +@error-color-focus: var(--td-error-color-focus); +@error-color-active: var(--td-error-color-active); +@error-color-disabled: var(--td-error-color-disabled); +@error-color-light: var(--td-error-color-light); + +// 成功色扩展 +@success-color-hover: var(--td-success-color-hover); +@success-color-focus: var(--td-success-color-focus); +@success-color-active: var(--td-success-color-active); +@success-color-disabled: var(--td-success-color-disabled); +@success-color-light: var(--td-success-color-light); + +// 遮罩 +@mask-active: var(--td-mask-active); // 遮罩-弹出 +@mask-disabled: var(--td-mask-disabled); // 遮罩-禁用 + +// 背景色 +@bg-color-page: var(--td-bg-color-page); // 色彩 - page +@bg-color-container: var(--td-bg-color-container); // 色彩 - 容器 +@bg-color-container-hover: var(--td-bg-color-container-hover); // 色彩 - 容器 - hover +@bg-color-container-active: var(--td-bg-color-container-active); // 色彩 - 容器 - active +@bg-color-container-select: var(--td-bg-color-container-select); // 色彩 - 容器 - select + +@bg-color-secondarycontainer: var(--td-bg-color-secondarycontainer); // 色彩 - 次级容器 +@bg-color-secondarycontainer-hover: var(--td-bg-color-secondarycontainer-hover); // 色彩 - 次级容器 - hover +@bg-color-secondarycontainer-active: var(--td-bg-color-secondarycontainer-active); // 色彩 - 次级容器 - active + +@bg-color-component: var(--td-bg-color-component); // 色彩 - 组件 +@bg-color-component-hover: var(--td-bg-color-component-hover); // 色彩 - 组件 - hover +@bg-color-component-active: var(--td-bg-color-component-active); // 色彩 - 组件 - active +@bg-color-component-disabled: var(--td-bg-color-component-disabled); // 色彩 - 组件 - disabled + +// TODO: 考虑是否在组件内部做判断,不增加额外变量 +// 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色 +@bg-color-specialcomponent: var(--td-bg-color-specialcomponent); + +// 文本颜色 +@text-color-primary: var(--td-text-color-primary); // 色彩-文字-主要 +@text-color-secondary: var(--td-text-color-secondary); // 色彩-文字-次要 +@text-color-placeholder: var(--td-text-color-placeholder); // 色彩-文字-占位符/说明 +@text-color-disabled: var(--td-text-color-disabled); // 色彩-文字-禁用 +@text-color-anti: var(--td-text-color-anti); // 色彩-文字-反色 +@text-color-brand: var(--td-text-color-brand); // 色彩-文字-品牌 +@text-color-link: var(--td-text-color-link); // 色彩-文字-链接 + +// 分割线 +@border-level-1-color: var(--td-border-level-1-color); +@component-stroke: var(--td-component-stroke); +// 边框 +@border-level-2-color: var(--td-border-level-2-color); +@component-border: var(--td-component-border); + +// shadow + +// 基础/下层 投影 hover 使用的组件包括:表格 / +@shadow-1: var(--td-shadow-1); +// 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认框 / 选择器 / +@shadow-2: var(--td-shadow-2); +// 上层投影(警示/弹窗)使用的组件包括:全局提示 / 消息通知 +@shadow-3: var(--td-shadow-3); + +// 内投影 用于弹窗类组件(气泡确认框 / 全局提示 / 消息通知)的内描边 +@shadow-inset-top: var(--td-shadow-inset-top); +@shadow-inset-right: var(--td-shadow-inset-right); +@shadow-inset-bottom: var(--td-shadow-inset-bottom); +@shadow-inset-left: var(--td-shadow-inset-left); +@shadow-inset: @shadow-inset-top, @shadow-inset-right, @shadow-inset-bottom, @shadow-inset-left; + +// 融合阴影 +@shadow-2-inset: @shadow-2, @shadow-inset; +@shadow-3-inset: @shadow-3, @shadow-inset; + +// Spacer +@spacer: 8px; +@spacer-s: @spacer * .5; // 间距-4 +@spacer-l: @spacer * 1.5; // 间距-12 +@spacer-1: @spacer; // 间距-8 +@spacer-2: @spacer * 2; // 间距-16 +@spacer-3: @spacer * 3; // 间距-24 +@spacer-4: @spacer * 4; // 间距-32 +@spacer-5: @spacer * 5; // 间距-大-40 +@spacer-6: @spacer * 6; // 间距-大-48 +@spacer-7: @spacer * 7; // 间距-大-48 +@spacer-8: @spacer * 8; // 间距-大-48 +@spacer-9: @spacer * 9; // 间距-大-48 +@spacer-10: @spacer * 10; // 间距-大-80 + +// Font +@font-size: 10px; +@font-size-s: @font-size * 1.2; // 字号-五级字号 +@font-size-base: @font-size * 1.4; // 字号-四级字号 +@font-size-l: @font-size * 1.6; // 字号-三级字号 +@font-size-xl: @font-size * 2; // 字号-二级字号 +@font-size-xxl: @font-size * 3.6; // 字号-一级字号 + +// Line Height +@text-line-height: 1.5; // 行高-常规 +@text-line-height-s: 20px; // 行高-对应五级文字 +@text-line-height-base: 22px; // 行高-对应四级文字 +@text-line-height-l: 24px; // 行高-对应三级文字 +@text-line-height-xl: 28px; // 行高-对应二级文字 +@text-line-height-xxl: 44px; //行高-对应一级文字 + +@font-family: PingFang SC, Microsoft YaHei, Arial Regular; // 字体-磅数-常规 +@font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; // 字体-磅数-粗体 + +// Border Radius +@border-radius: 3px; // 圆角-全局 +@border-radius-50: 50%; // 圆角-全圆角 + +// 表单相关 +@form-height: 30px; +@form-text-color: @text-color-primary; +@form-bg-color: @bg-color-container; +@form-border-color: @border-level-2-color; + +// 图标尺寸 +@icon-default: 16px; +@icon-l: 24px; + +// 滚动条颜色 +@scrollbar-color: var(--td-scrollbar-color); + +// 响应式断点 +@screen-sm: 768px; +@screen-md: 992px; +@screen-lg: 1200px; + +@screen-sm-min: @screen-sm; +@screen-md-min: @screen-md; +@screen-lg-min: @screen-lg; + +@screen-sm-max: (@screen-md-min - 1px); +@screen-md-max: (@screen-lg-min - 1px); + + +// 动画 +@anim-time-fn-easing: cubic-bezier(.38, 0, .24, 1); +@anim-time-fn-ease-out: cubic-bezier(0, 0, .15, 1); +@anim-time-fn-ease-in: cubic-bezier(.82, 0, 1, .9); +@anim-duration-base: .2s; +@anim-duration-moderate: .24s; +@anim-duration-slow: .28s; + +// 统一管理各组件层级关系 +@z-index-affix: 500; +@z-index-drawer: 1500; +@z-index-dialog: 2500; +@z-index-loading: 3500; +@z-index-message: 5000; +@z-index-Popup: 5500; +@z-index-Notification: 6000; \ No newline at end of file