Merge pull request #6 from Tencent/fix/slidenav/icon

fix: slide nav and result icon fix
This commit is contained in:
PY 2021-12-16 12:12:16 +08:00 committed by GitHub
commit bb1e76b263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 8232 additions and 3338 deletions

1
.gitignore vendored
View File

@ -14,7 +14,6 @@ temp*
coverage coverage
test-report.html test-report.html
.idea/ .idea/
yarn.lock
yarn-error.log yarn-error.log
*.zip *.zip
.history .history

20
LICENSE
View File

@ -1,9 +1,21 @@
MIT License MIT License
Copyright (c) 2021-present TDesign Copyright (c) 2021 TDesign
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

156
README.md
View File

@ -1,100 +1,118 @@
<p style="display:flex; justify-content: center">
</p>
<p align="center"> <p align="center">
<a href="http://tdesgin.tencent.com/starter/vue/#/dashboard/base"><img src="https://tdesign.gtimg.com/starter/brand-logo.svg" /></a> <a href="https://tdesign.tencent.com/starter/vue-next/#/dashboard/base" target="_blank">
<img alt="TDesign Logo" width="200" src="https://tdesign.gtimg.com/starter/brand-logo.svg">
</a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://npmjs.com/package/vite"><img src="https://img.shields.io/npm/v/vite.svg" alt="npm package"></a>
<a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatility"></a> <a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatility"></a>
<a href="https://github.com/Tencent/tdesign-vue-next/blob/develop/LICENSE">
<img src="https://img.shields.io/npm/l/tdesign-vue-next.svg?sanitize=true" alt="License">
</a>
</p> </p>
# TDesign Starter ### 项目简介
## 项目简介 TDesign Vue Next Starter 是一个基于 TDesign。使用 `Vue3`、`Vite2`、`TypeScript` 开发,可进行个性化主题配置,旨在提供项目开箱即用的、配置式的中后台项目。
TDesign Starter 基于 TDesign UI 组件,旨在提供项目开箱即用的、配置式的并且拥有开发体验和设计感的中后台的项目。 <p>
<a href="http://tdesign.tencent.com/starter/vue-next/">在线预览</a>
.
<a href="https://tdesign.tencent.com/starter/">使用文档</a>
- 设计美观 </p>
- 基于 TDesign UI 设计规范 <p>
- 提供 Figma、 Sketch、 Adobe XD、 Axure等多种类型的设计资源 <img src="https://tdesign.gtimg.com/starter/starter.png" style="border-radius:6px;border:1px solid var(--component-border)"/>
- 在开源体系上打造具有自身品牌特色且好用的产品 </p>
<br/>
- 完备路由
- 同时支持配置式路由和自定义路由
- 对于配置型路由,提供导航类组件的深度定制(“菜单 Menu”、“面包屑 Breadcrumb”无需手动处理路由映射关系。
<br/>
- 动态布局:
- 内置“左右布局”、“上左右布局”、“上下布局”等中后台常用布局,
- 页面内容基于 24 栅格布局设计,内置“常规型”和“紧凑型”两种间距模式
<br/>
- 极速HRM:
- 采用 `Vite` 构建
- 开发环境下体验浏览器 esmodule bundless, 达到极速更新,无需等待漫长的 bundle 过程
<br/>
- 开发规范:
- 统一规范会减少沟通成本,提高开发和维护的体验;
- 提交规范采用 `Angular commit 规范`
- 同时推荐采用 `vscode` 开发
<br/>
## 项目脚本 ### 特性
- 内置多种常用的中后台页面
- 完善的目录结构
- 完善的代码规范配置
- 支持暗黑模式
- 自定义主题颜色
- 多种空间布局
- 内置 Mock 数据方案
### 使用
> 通过 `tdesign-starter-cli` 初始化项目仓库
```bash
## 1、安装 tdesign-starter-cli
npm i tdesign-starter-cli@latest -g
## 2、创建项目
td-starter init
``` ```
// 安装依赖
### 开发
``` bash
## 安装依赖
npm install npm install
// 启动项目 ## 启动项目
npm run dev npm run dev
// 项目构建 - 体验环境
npm run build:test
// 项目构建
npm run build
// 项目预览
npm run preview
// 项目 eslint
npm run lint
// 修复 eslint
npm run lint:fix
// 项目 stylelint
npm run stylelint
// 修复 stylelint
npm run stylelint:fix
``` ```
<br/> ### 构建
## 布局 ```bash
## 构建正式环境
npm run build
网站布局支持“空布局”, “侧边栏导航布局”, “侧边栏布局加头部导航”,“头部导航”四种;布局文件地址在<a href="./src/layouts">src/layouts</a> ## 构建测试环境
npm run build:test
```
更多定制化布局,推荐使用 TDesign UI layout ### 其他
- ```<t-layout>``` ```bash
- ```<t-header>``` ## 预览构建产物
- ```<t-footer>``` npm run preview
- ```<t-aside>```
- ```<t-content>```
<br/> ## 代码格式检查
npm run lint
## 提交规范 ## 代码格式检查与自动修复
npm run lint:fix
整齐美观的提交规范,沟通维护更加省力 [Angular Git Commit Guidelines](https://zj-git-guide.readthedocs.io/zh_CN/latest/message/Angular%E6%8F%90%E4%BA%A4%E4%BF%A1%E6%81%AF%E8%A7%84%E8%8C%83/) ## style格式检查
npm run stylelint
<br/> ## style格式检查与自动修复
npm run stylelint:fix
```
## 兼容性 ### 如何贡献
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | 非常欢迎您的贡献!提交您的 [Issue](https://github.com/tencent/tdesign-vue-next-starter/issues/new/choose) 或者提交 [Pull Request](https://github.com/Tencent/tdesign-vue-next-starter/pulls)。
#### Pull Request
1. Fork 代码!
2. 创建自己的分支: `git checkout -b feat/xxxx`
3. 提交你的修改: `git commit -a 'feat(project): describe'`
4. 推送您的分支: `git push origin feat/xxxx`
5. 提交 `pull request`
#### 贡献提交规范
- [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)
- [Vue Style Guide](https://v3.vuejs.org/style-guide/#rule-categories)
### 兼容性
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- | | --------- | --------- | --------- | --------- |
| Edge >=16 | Firefox >=60| Chrome >=61| Safari >=11 | IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
<br/> ### License
[MIT](./LICENSE)

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TDesign Starter</title> <title>TDesign Vue Next Starter</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

5565
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -75,8 +75,5 @@
"npm run stylelint:fix", "npm run stylelint:fix",
"git add ." "git add ."
] ]
},
"engines": {
"node": ">=16.13.1"
} }
} }

View File

@ -0,0 +1,6 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.9997 10.6904L58.2484 25.8451V48.1545L31.9997 63.3092L5.75098 48.1545V25.8451L31.9997 10.6904ZM9.75098 30.4639V45.8451L31.9997 58.6904L54.2484 45.8451V30.4639L31.9997 43.3092L9.75098 30.4639ZM52.2484 26.9998L40.6599 33.6904L31.9997 28.6904L23.3394 33.6904L11.751 26.9998L31.9997 15.3092L52.2484 26.9998ZM27.3394 35.9998L31.9997 38.6904L36.6599 35.9998L31.9997 33.3092L27.3394 35.9998Z" fill="currentcolor" fill-opacity="0.26"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 8V0H34V8H30Z" fill="currentcolor" fill-opacity="0.26"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.2676 10.7514L48.2676 3.82324L51.7317 5.82324L47.7317 12.7514L44.2676 10.7514Z" fill="currentcolor" fill-opacity="0.26"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.2676 12.7514L12.2676 5.82324L15.7317 3.82324L19.7317 10.7514L16.2676 12.7514Z" fill="currentcolor" fill-opacity="0.26"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,47 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_17_619)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7"/>
<g filter="url(#filter0_f_17_619)">
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter1_f_17_619)">
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB"/>
</g>
<rect x="46" y="105" width="32" height="2" fill="white"/>
<rect x="46" y="98" width="32" height="2" fill="white"/>
<rect x="46" y="88" width="16" height="2" fill="white"/>
</g>
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor"/>
<mask id="mask1_17_619" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
<path d="M63 30H151V80H63V30Z" fill="currentcolor"/>
</mask>
<g mask="url(#mask1_17_619)">
<path d="M63 30H151V80H63V30Z" fill="currentcolor"/>
<g opacity="0.3" filter="url(#filter2_f_17_619)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7"/>
</g>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M95.6863 40.8577L105.964 51.1345C106.295 51.0466 106.642 50.9998 107 50.9998C109.213 50.9998 111 52.7865 111 54.9998C111 55.3574 110.953 55.7038 110.866 56.0333L121.142 66.3135L118.314 69.1419L113.716 64.5448C111.653 65.423 109.384 65.9089 107 65.9089C99.7273 65.9089 93.5164 61.3853 91 54.9998C92.1785 52.0093 94.1673 49.4271 96.6961 47.5268L92.8579 43.6861L95.6863 40.8577ZM99 54.9998C99 59.4158 102.584 62.9998 107 62.9998C108.483 62.9998 109.872 62.5957 111.063 61.8917L108.034 58.8657C107.704 58.9532 107.358 58.9998 107 58.9998C104.787 58.9998 103 57.2131 103 54.9998C103 54.6423 103.047 54.2958 103.134 53.9663L100.107 50.9389C99.4037 52.1295 99 53.5178 99 54.9998ZM107 44.0907C114.273 44.0907 120.484 48.6143 123 54.9998C122.071 57.3574 120.638 59.4612 118.834 61.1773L114.729 57.0717C114.906 56.4108 115 55.7162 115 54.9998C115 50.5838 111.416 46.9998 107 46.9998C106.284 46.9998 105.589 47.0941 104.928 47.2711L102.378 44.7205C103.848 44.3101 105.398 44.0907 107 44.0907Z" fill="white"/>
<rect x="68" y="24" width="2" height="2" fill="white"/>
<rect x="74" y="24" width="2" height="2" fill="white"/>
<rect x="80" y="24" width="66" height="2" fill="white"/>
<path d="M157 53.9998L181.249 95.9998H132.751L157 53.9998Z" fill="white" stroke="black"/>
<path d="M157 88.9998L157 70.9998" stroke="black"/>
<defs>
<filter id="filter0_f_17_619" x="-38" y="34" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_17_619"/>
</filter>
<filter id="filter1_f_17_619" x="30" y="4" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_17_619"/>
</filter>
<filter id="filter2_f_17_619" x="24" y="56" width="100" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_17_619"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,47 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_16559_24301)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7"/>
<g filter="url(#filter0_f_16559_24301)">
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter1_f_16559_24301)">
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB"/>
</g>
<path d="M49 93L42 100L49 107" stroke="white" stroke-width="2"/>
<path d="M69 107L76 100L69 93" stroke="white" stroke-width="2"/>
<path d="M62.3647 87.4431L55.6355 112.557" stroke="white" stroke-width="2"/>
</g>
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor"/>
<mask id="mask1_16559_24301" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
<path d="M63 30H151V80H63V30Z" fill="currentcolor"/>
</mask>
<g mask="url(#mask1_16559_24301)">
<path d="M63 30H151V80H63V30Z" fill="currentcolor"/>
<g opacity="0.3" filter="url(#filter2_f_16559_24301)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7"/>
</g>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" d="M105.25 41C112.015 41 117.5 46.4845 117.5 53.25C117.5 55.6827 116.791 57.9498 115.568 59.8558L121 65.2877L117.288 69L111.856 63.5681C109.95 64.7909 107.683 65.5 105.25 65.5C98.4845 65.5 93 60.0155 93 53.25C93 46.4845 98.4845 41 105.25 41ZM105.25 44.5C100.418 44.5 96.5 48.4175 96.5 53.25C96.5 58.0825 100.418 62 105.25 62C110.082 62 114 58.0825 114 53.25C114 48.4175 110.082 44.5 105.25 44.5Z" fill="white"/>
<rect x="68" y="24" width="2" height="2" fill="white"/>
<rect x="74" y="24" width="2" height="2" fill="white"/>
<rect x="80" y="24" width="66" height="2" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M153 56C140.85 56 131 65.8497 131 78C131 82.6039 132.414 86.8776 134.832 90.4102L127 98.5L139.495 95.3681C143.222 98.2709 147.909 100 153 100C165.15 100 175 90.1503 175 78C175 65.8497 165.15 56 153 56Z" fill="white"/>
<path d="M131 78L131.5 78V78L131 78ZM134.832 90.4102L135.191 90.758L135.475 90.4647L135.245 90.1278L134.832 90.4102ZM127 98.5L126.641 98.1522L125.422 99.411L127.122 98.985L127 98.5ZM139.495 95.3681L139.802 94.9736L139.61 94.8238L139.373 94.8831L139.495 95.3681ZM153 100L153 100.5L153 100.5L153 100ZM175 78L174.5 78L174.5 78L175 78ZM131.5 78C131.5 66.1259 141.126 56.5 153 56.5V55.5C140.574 55.5 130.5 65.5736 130.5 78L131.5 78ZM135.245 90.1278C132.882 86.6757 131.5 82.5 131.5 78H130.5C130.5 82.7079 131.946 87.0794 134.419 90.6926L135.245 90.1278ZM134.473 90.0624L126.641 98.1522L127.359 98.8478L135.191 90.758L134.473 90.0624ZM127.122 98.985L139.616 95.8531L139.373 94.8831L126.878 98.015L127.122 98.985ZM153 99.5C148.024 99.5 143.445 97.8105 139.802 94.9736L139.187 95.7626C143 98.7314 147.794 100.5 153 100.5V99.5ZM174.5 78C174.5 89.8741 164.874 99.5 153 99.5L153 100.5C165.426 100.5 175.5 90.4264 175.5 78L174.5 78ZM153 56.5C164.874 56.5 174.5 66.1259 174.5 78H175.5C175.5 65.5736 165.426 55.5 153 55.5V56.5Z" fill="black"/>
<defs>
<filter id="filter0_f_16559_24301" x="-38" y="34" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_16559_24301"/>
</filter>
<filter id="filter1_f_16559_24301" x="30" y="4" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_16559_24301"/>
</filter>
<filter id="filter2_f_16559_24301" x="24" y="56" width="100" height="72" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_16559_24301"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,42 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_16559_24251)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
<g filter="url(#filter0_f_16559_24251)">
<rect x="46.3911" y="92" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter1_f_16559_24251)">
<rect y="23" width="80" height="60" fill="#E3E6EB"/>
</g>
</g>
<mask id="mask1_16559_24251" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="80" y="9" width="78" height="88">
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentcolor"/>
</mask>
<g mask="url(#mask1_16559_24251)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M80.895 31V75L119 97L157.105 75V31L119 53L80.895 31Z" fill="currentcolor"/>
<path opacity="0.9" d="M119 -35L157.105 -13L157.105 31.5L119 53.5L80.8952 31.5L80.895 -13L119 -35Z" fill="currentcolor"/>
<g opacity="0.3" filter="url(#filter2_f_16559_24251)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
</g>
</g>
<path d="M143 68.822L147.867 85.875L148 86.3405L148.469 86.2228L165.671 81.911L153.336 94.6522L152.999 95L153.336 95.3478L165.671 108.089L148.469 103.777L148 103.659L147.867 104.125L143 121.178L138.133 104.125L138 103.659L137.531 103.777L120.329 108.089L132.664 95.3478L133.001 95L132.664 94.6522L120.329 81.911L137.531 86.2228L138 86.3405L138.133 85.875L143 68.822Z" fill="white" stroke="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M123.243 35.0821L126.071 33.4493L123.243 31.8164L120.414 33.4493L123.243 35.0821ZM119 32.6329L121.828 31L114.757 26.9179L111.929 28.5507L119 32.6329ZM127.485 35.8986C122.806 38.6001 115.194 38.6001 110.515 35.8986C105.835 33.197 105.835 28.803 110.515 26.1014C115.194 23.3999 122.806 23.3999 127.485 26.1014C132.165 28.803 132.165 33.197 127.485 35.8986ZM107.686 24.4686C101.438 28.0756 101.438 33.9244 107.686 37.5314C113.934 41.1384 124.066 41.1384 130.314 37.5314C136.562 33.9244 136.562 28.0756 130.314 24.4686C124.066 20.8616 113.934 20.8616 107.686 24.4686Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M41.8989 86.2863L44.7272 87.9193L44.7275 94.4512L41.8992 92.8181L41.8989 86.2863ZM53.9194 93.2269L56.7477 94.86L56.7479 101.392L53.9196 99.7587L53.9194 93.2269ZM44.7281 107.515L41.8999 105.882L41.9 109.148L44.7283 110.781L44.7282 107.515L53.92 112.822L53.9201 116.088L56.7484 117.721L56.7483 114.455L53.9201 112.822L53.92 109.556L44.728 104.249L44.7281 107.515Z" fill="white"/>
<defs>
<filter id="filter0_f_16559_24251" x="-3.60889" y="42" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_16559_24251"/>
</filter>
<filter id="filter1_f_16559_24251" x="-50" y="-27" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_16559_24251"/>
</filter>
<filter id="filter2_f_16559_24251" x="23.895" y="42" width="88.21" height="100" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_16559_24251"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,42 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_22_990)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M144.569 105.61L96.5692 133.322L48.5693 105.61V83.7121L96.569 55.9995L144.569 83.7122V105.61Z" fill="#97A3B7"/>
<g filter="url(#filter0_f_22_990)">
<rect x="-3" y="33.9995" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter1_f_22_990)">
<rect x="97" y="97.9995" width="80" height="60" fill="#E3E6EB"/>
</g>
</g>
<mask id="mask1_22_990" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="53" y="16" width="86" height="69">
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z" fill="currentcolor"/>
</mask>
<g mask="url(#mask1_22_990)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z" fill="currentcolor"/>
<g opacity="0.3" filter="url(#filter2_f_22_990)">
<path d="M96.569 55.9995L144.569 83.7122V139.138L96.569 166.85L48.5692 139.138V83.7122L96.569 55.9995Z" fill="#97A3B7"/>
</g>
</g>
<ellipse cx="155" cy="78" rx="22" ry="22" transform="rotate(180 155 78)" fill="white" stroke="black"/>
<path d="M155 83L155 65" stroke="black"/>
<rect x="155" y="87" width="0.00390625" height="0.00390625" fill="#C4C4C4" stroke="black" stroke-width="2" stroke-linejoin="round"/>
<path d="M96.5693 112L96.5693 87.9995" stroke="white" stroke-width="2"/>
<path d="M86.5693 97.9995L96.5693 87.9995L106.569 97.9995" stroke="white" stroke-width="2"/>
<defs>
<filter id="filter0_f_22_990" x="-53" y="-16.0005" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_22_990"/>
</filter>
<filter id="filter1_f_22_990" x="47" y="47.9995" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_22_990"/>
</filter>
<filter id="filter2_f_22_990" x="42.5693" y="49.9995" width="108" height="122.851" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_22_990"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,27 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_21_716)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M33 46.843L96.3214 119L159.643 46.843C142.742 31.9998 120.583 23 96.3214 23C72.0601 23 49.9009 31.9998 33 46.843Z" fill="#97A3B7"/>
<g filter="url(#filter0_f_21_716)">
<rect x="95" y="21" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter1_f_21_716)">
<rect x="-7" y="43" width="80" height="60" fill="#E3E6EB"/>
</g>
</g>
<path d="M72.8122 63.6882L69.6548 66.8455L75.9009 73.0916C71.2469 75.1648 66.9663 77.925 63.188 81.2433L96.3213 119L108.234 105.425L114.647 111.837L117.804 108.68L80.4504 71.3261C80.4505 71.3261 80.4503 71.3261 80.4504 71.3261L72.8122 63.6882Z" fill="currentcolor"/>
<path d="M129.455 81.2433L114.137 98.6982L85.3974 69.9585C88.9142 69.1786 92.5697 68.7674 96.3213 68.7674C109.016 68.7674 120.611 73.4766 129.455 81.2433Z" fill="currentcolor"/>
<path d="M152 21.822L156.867 38.875L157 39.3405L157.469 39.2228L174.671 34.911L162.336 47.6522L161.999 48L162.336 48.3478L174.671 61.089L157.469 56.7772L157 56.6595L156.867 57.125L152 74.178L147.133 57.125L147 56.6595L146.531 56.7772L129.329 61.089L141.664 48.3478L142.001 48L141.664 47.6522L129.329 34.911L146.531 39.2228L147 39.3405L147.133 38.875L152 21.822Z" fill="white" stroke="black"/>
<path d="M101 31L90 42L101 53L93 61" stroke="white" stroke-width="2"/>
<defs>
<filter id="filter0_f_21_716" x="45" y="-29" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_21_716"/>
</filter>
<filter id="filter1_f_21_716" x="-57" y="-7" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_21_716"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 3.75C2.5 3.05965 3.05962 2.5 3.75 2.5H8.125C8.81538 2.5 9.375 3.05965 9.375 3.75V10C9.375 10.6903 8.81538 11.25 8.125 11.25H3.75C3.05962 11.25 2.5 10.6903 2.5 10V3.75ZM3.75 3.75H8.125V10H3.75V3.75Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.625 10C10.625 9.30965 11.1846 8.75 11.875 8.75H16.25C16.9404 8.75 17.5 9.30965 17.5 10V16.25C17.5 16.9403 16.9404 17.5 16.25 17.5H11.875C11.1846 17.5 10.625 16.9403 10.625 16.25V10ZM11.875 10H16.25V16.25H11.875V10Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 12.5C3.05962 12.5 2.5 13.0597 2.5 13.75V16.25C2.5 16.9403 3.05962 17.5 3.75 17.5H8.125C8.81538 17.5 9.375 16.9403 9.375 16.25V13.75C9.375 13.0597 8.81538 12.5 8.125 12.5H3.75ZM8.125 13.75H3.75V16.25H8.125V13.75Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.625 3.75C10.625 3.05965 11.1846 2.5 11.875 2.5H16.25C16.9404 2.5 17.5 3.05965 17.5 3.75V6.25C17.5 6.94035 16.9404 7.5 16.25 7.5H11.875C11.1846 7.5 10.625 6.94035 10.625 6.25V3.75ZM11.875 3.75H16.25V6.25H11.875V3.75Z" fill="currentcolor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.5 5.625H5V6.875H12.5V5.625Z" fill="currentcolor"/>
<path d="M5 8.75H12.5V10H5V8.75Z" fill="currentcolor"/>
<path d="M10 11.875H5V13.125H10V11.875Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 3.75C2.5 3.05962 3.05962 2.5 3.75 2.5H16.25C16.9404 2.5 17.5 3.05962 17.5 3.75V16.25C17.5 16.9404 16.9404 17.5 16.25 17.5H3.75C3.05962 17.5 2.5 16.9404 2.5 16.25V3.75ZM3.75 3.75H16.25V16.25H3.75V3.75Z" fill="currentcolor"/>
</svg>

After

Width:  |  Height:  |  Size: 564 B

View File

@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1485 2.60504L7.96107 8.79252C7.88191 8.87167 7.82547 8.97063 7.79764 9.07905L6.98445 12.2468C6.92951 12.4608 6.99164 12.6879 7.14788 12.8442C7.30411 13.0004 7.53121 13.0625 7.74522 13.0076L10.913 12.1944C11.0214 12.1666 11.1204 12.1101 11.1995 12.031L17.387 5.8435C18.2813 4.94923 18.2813 3.49931 17.387 2.60504C16.4927 1.71076 15.0428 1.71076 14.1485 2.60504ZM8.45793 11.5341L8.96586 9.55549L15.0324 3.48892C15.4386 3.08279 16.097 3.0828 16.5031 3.48892C16.9093 3.89504 16.9093 4.5535 16.5031 4.95962L10.4366 11.0262L8.45793 11.5341Z" fill="currentcolor"/>
<path d="M3.75 4.37493H10V3.12493H3.75C3.05964 3.12493 2.5 3.68457 2.5 4.37493V15.6249C2.5 16.3153 3.05964 16.8749 3.75 16.8749H16.25C16.9404 16.8749 17.5 16.3153 17.5 15.6249V9.37493H16.25V15.6249H3.75V4.37493Z" fill="currentcolor"/>
</svg>

After

Width:  |  Height:  |  Size: 949 B

View File

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 5.3125H10V6.5625H5V5.3125Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 3.75C2.5 3.05965 3.05962 2.5 3.75 2.5H16.25C16.9404 2.5 17.5 3.05965 17.5 3.75V8.125C17.5 8.81535 16.9404 9.375 16.25 9.375H3.75C3.05962 9.375 2.5 8.81535 2.5 8.125V3.75ZM3.75 3.75H16.25V8.125H3.75V3.75Z" fill="currentcolor"/>
<path d="M10 13.4375H5V14.6875H10V13.4375Z" fill="currentcolor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 11.875C2.5 11.1847 3.05962 10.625 3.75 10.625H16.25C16.9404 10.625 17.5 11.1847 17.5 11.875V16.25C17.5 16.9403 16.9404 17.5 16.25 17.5H3.75C3.05962 17.5 2.5 16.9403 2.5 16.25V11.875ZM16.25 11.875V16.25H3.75V11.875H16.25Z" fill="currentcolor"/>
</svg>

After

Width:  |  Height:  |  Size: 810 B

View File

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM18.75 10C18.75 14.8325 14.8325 18.75 10 18.75C5.16751 18.75 1.25 14.8325 1.25 10C1.25 5.16751 5.16751 1.25 10 1.25C14.8325 1.25 18.75 5.16751 18.75 10ZM12.5489 9.37547L10.0934 6.91989L10.9772 6.03601L14.4998 9.55853C14.7438 9.80261 14.7438 10.1983 14.4998 10.4424L10.9804 13.9618L10.0965 13.0779L12.5489 10.6255L5.45213 10.6255L5.45214 9.37545L12.5489 9.37547Z" fill="currentcolor"/>
</svg>

After

Width:  |  Height:  |  Size: 676 B

View File

@ -1,16 +1,24 @@
<template> <template>
<div class="result-container"> <div class="result-container">
<img class="result-bg-img" :src="bgUrl" /> <div class="result-bg-img">
<component :is="dynamicComponent"></component>
</div>
<div class="result-title">{{ title }}</div> <div class="result-title">{{ title }}</div>
<div class="result-tip">{{ tip }}</div> <div class="result-tip">{{ tip }}</div>
<slot /> <slot />
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType } from 'vue'; import { defineComponent, PropType, computed } from 'vue';
import Result403Icon from '@/assets/assets-result-403.svg?component';
import Result404Icon from '@/assets/assets-result-404.svg?component';
import Result500Icon from '@/assets/assets-result-500.svg?component';
import ResultIeIcon from '@/assets/assets-result-ie.svg?component';
import ResultWifiIcon from '@/assets/assets-result-wifi.svg?component';
export default defineComponent({ export default defineComponent({
name: 'Result', name: 'Result',
components: { Result403Icon, Result500Icon, Result404Icon },
props: { props: {
bgUrl: { bgUrl: {
type: String as PropType<string>, type: String as PropType<string>,
@ -24,6 +32,31 @@ export default defineComponent({
type: String as PropType<string>, type: String as PropType<string>,
default: '', default: '',
}, },
type: {
type: String as PropType<string>,
default: '',
},
},
setup(props) {
const dynamicComponent = computed(() => {
switch (props.type) {
case '403':
return Result403Icon;
case '404':
return Result404Icon;
case '500':
return Result500Icon;
case 'ie':
return ResultIeIcon;
case 'wifi':
return ResultWifiIcon;
default:
return Result403Icon;
}
});
return {
dynamicComponent,
};
}, },
}); });
</script> </script>
@ -65,6 +98,7 @@ export default defineComponent({
&-bg-img { &-bg-img {
width: 200px; width: 200px;
color: @brand-color;
} }
&-title { &-title {

View File

@ -8,7 +8,11 @@ export interface ResDataType {
export interface MenuRoute { export interface MenuRoute {
path: string; path: string;
title?: string; title?: string;
icon?: string; icon?:
| string
| {
render: () => void;
};
redirect?: string; redirect?: string;
children: MenuRoute[]; children: MenuRoute[];
meta: any; meta: any;

View File

@ -7,8 +7,7 @@
</span> </span>
<div v-else class="header-operate-left"> <div v-else class="header-operate-left">
<t-button theme="default" shape="square" variant="text" @click="changeCollapsed"> <t-button theme="default" shape="square" variant="text" @click="changeCollapsed">
<t-icon v-show="isSidebarCompact" class="collapsed-icon" name="menu-fold" /> <t-icon class="collapsed-icon" name="view-list" />
<t-icon v-show="!isSidebarCompact" class="collapsed-icon" name="menu-unfold" />
</t-button> </t-button>
<search :layout="layout" /> <search :layout="layout" />
</div> </div>
@ -174,7 +173,7 @@ export default defineComponent({
}; };
const navToGitHub = () => { const navToGitHub = () => {
window.open('https://github.com/Tencent/tdesign-vue-next-starter'); window.open('https://github.com/TDesignOteam/tdesign-vue-next-starter');
}; };
const navToHelper = () => { const navToHelper = () => {
@ -231,13 +230,6 @@ export default defineComponent({
display: inline-flex; display: inline-flex;
height: 64px; height: 64px;
} }
.t-logo {
width: 32px;
&:hover {
cursor: pointer;
}
}
} }
.header-menu { .header-menu {
@ -282,8 +274,17 @@ export default defineComponent({
} }
.header-logo-container { .header-logo-container {
width: 166px;
display: flex; display: flex;
margin-left: 16px; margin-left: 24px;
.t-logo {
width: 100%;
height: 100%;
&:hover {
cursor: pointer;
}
}
&:hover { &:hover {
cursor: pointer; cursor: pointer;
@ -300,12 +301,19 @@ export default defineComponent({
} }
} }
.t-head-menu__inner {
border-bottom: 1px solid @border-level-1-color;
}
.t-menu--light { .t-menu--light {
.header-user-account { .header-user-account {
color: @text-color-primary; color: @text-color-primary;
} }
} }
.t-menu--dark { .t-menu--dark {
.t-head-menu__inner {
border-bottom: 1px solid var(--td-gray-color-10);
}
.header-user-account { .header-user-account {
color: rgba(255, 255, 255, 0.55); color: rgba(255, 255, 255, 0.55);
} }

View File

@ -12,7 +12,7 @@
</t-input> </t-input>
</div> </div>
<div v-else> <div v-else class="header-menu-search-left">
<t-button <t-button
:class="{ 'search-icon-hide': isSearchFocus }" :class="{ 'search-icon-hide': isSearchFocus }"
theme="default" theme="default"
@ -72,6 +72,9 @@ export default defineComponent({
.t-input__inner { .t-input__inner {
background: @bg-color-secondarycontainer; background: @bg-color-secondarycontainer;
} }
.t-icon {
color: @brand-color !important;
}
} }
.t-icon { .t-icon {
@ -110,4 +113,8 @@ export default defineComponent({
.search-icon-hide { .search-icon-hide {
opacity: 0; opacity: 0;
} }
.header-menu-search-left {
display: flex;
align-items: center;
}
</style> </style>

View File

@ -1,4 +1,4 @@
import { defineComponent, PropType, computed } from 'vue'; import { defineComponent, PropType, computed, h } from 'vue';
import { PREFIX as prefix } from '@/config/global'; import { PREFIX as prefix } from '@/config/global';
import { MenuRoute } from '@/interface'; import { MenuRoute } from '@/interface';
@ -19,6 +19,19 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
}); });
}; };
const renderIcon = (item) => {
if (typeof item.icon === 'string') {
return () => item.icon && <t-icon name={item.icon}></t-icon>;
}
if (item.icon && typeof item.icon.render === 'function') {
return () =>
h(item.icon.render(), {
class: 't-icon',
});
}
return () => '';
};
const useRenderNav = (list: Array<MenuRoute>) => { const useRenderNav = (list: Array<MenuRoute>) => {
return list.map((item) => { return list.map((item) => {
if (!item.children || !item.children.length || item.meta?.single) { if (!item.children || !item.children.length || item.meta?.single) {
@ -27,19 +40,14 @@ const useRenderNav = (list: Array<MenuRoute>) => {
name={item.path} name={item.path}
value={item.meta?.single ? item.redirect : item.path} value={item.meta?.single ? item.redirect : item.path}
to={item.path} to={item.path}
icon={() => item.icon && <t-icon name={item.icon} />} icon={renderIcon(item)}
> >
{item.title} {item.title}
</t-menu-item> </t-menu-item>
); );
} }
return ( return (
<t-submenu <t-submenu name={item.path} value={item.path} title={item.title} icon={renderIcon(item)}>
name={item.path}
value={item.path}
title={item.title}
icon={() => item.icon && <t-icon name={item.icon} />}
>
{item.children && useRenderNav(item.children)} {item.children && useRenderNav(item.children)}
</t-submenu> </t-submenu>
); );

View File

@ -143,7 +143,6 @@ export default defineComponent({
const header = this.renderHeader(); const header = this.renderHeader();
const sidebar = this.renderSidebar(); const sidebar = this.renderSidebar();
const content = this.renderContent(); const content = this.renderContent();
const footer = this.renderFooter();
return ( return (
<div class={`${PREFIX}-wrapper`}> <div class={`${PREFIX}-wrapper`}>
@ -156,7 +155,6 @@ export default defineComponent({
<t-layout key="no-side"> <t-layout key="no-side">
{header} {header}
<t-layout class={this.mainLayoutCls}>{[sidebar, content]}</t-layout> <t-layout class={this.mainLayoutCls}>{[sidebar, content]}</t-layout>
{this.showFooter && footer}
</t-layout> </t-layout>
)} )}
<tdesign-setting /> <tdesign-setting />

View File

@ -1,11 +1,9 @@
import { createApp } from 'vue'; import { createApp } from 'vue';
import TDesign from 'tdesign-vue-next'; import TDesign from 'tdesign-vue-next';
import VueClipboard from 'vue3-clipboard'; import VueClipboard from 'vue3-clipboard';
import App from './App.vue'; import App from './App.vue';
import { store } from './store'; import { store } from './store';
import router from './router'; import router from './router';
import '@/style/index.less'; import '@/style/index.less';
import './permission'; import './permission';

View File

@ -35,7 +35,7 @@
</t-list-item> </t-list-item>
</t-list> </t-list>
<div v-else class="secondary-msg-list__empty-list"> <div v-else class="secondary-msg-list__empty-list">
<img src="https://tdesign.gtimg.com/pro-template/personal/nothing.png" alt="空" /> <empty-icon></empty-icon>
<p>暂无通知</p> <p>暂无通知</p>
</div> </div>
</t-tab-panel> </t-tab-panel>
@ -54,6 +54,7 @@ import { defineComponent, ref, computed, ComputedRef } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { NOTIFICATION_TYPES } from '@/constants'; import { NOTIFICATION_TYPES } from '@/constants';
import { NotificationItem } from '@/interface'; import { NotificationItem } from '@/interface';
import EmptyIcon from '@/assets/assets-empty.svg?component';
const TAB_LIST = [ const TAB_LIST = [
{ {
@ -72,6 +73,9 @@ const TAB_LIST = [
export default defineComponent({ export default defineComponent({
name: 'DetailSecondary', name: 'DetailSecondary',
components: {
EmptyIcon,
},
setup() { setup() {
const tabValue = ref('msgData'); const tabValue = ref('msgData');

View File

@ -29,7 +29,7 @@ export default defineComponent({
}; };
const navToGitHub = () => { const navToGitHub = () => {
window.open('https://github.com/Tencent/tdesign-vue-next-starter'); window.open('https://github.com/TDesignOteam/tdesign-vue-next-starter');
}; };
const navToHelper = () => { const navToHelper = () => {

View File

@ -1,9 +1,5 @@
<template> <template>
<result <result title="403 Forbidden" tip="抱歉您无权限访问此页面企业微信联系创建者xiaolaoshi">
page-header="403"
tip="抱歉您无权限访问此页面企业微信联系创建者xiaolaoshi"
bg-url="https://tdesign.gtimg.com/starter/result-page/403.png"
>
<t-button @click="() => $router.push('/')">返回首页</t-button> <t-button @click="() => $router.push('/')">返回首页</t-button>
</result> </result>
</template> </template>

View File

@ -1,9 +1,5 @@
<template> <template>
<result <result title="404 Not Found" tip="抱歉,您访问的页面不存在" type="404">
page-header="404"
tip="抱歉,您访问的页面不存在"
bg-url="https://tdesign.gtimg.com/starter/result-page/404.png"
>
<t-button @click="() => $router.push('/')">返回首页</t-button> <t-button @click="() => $router.push('/')">返回首页</t-button>
</result> </result>
</template> </template>

View File

@ -1,5 +1,5 @@
<template> <template>
<result page-header="500" tip="抱歉,服务器出错啦" bg-url="https://tdesign.gtimg.com/starter/result-page/500.png"> <result title="500 Internal Server Error" type="500" tip="抱歉,服务器出错啦">
<t-button @click="() => $router.push('/')">返回首页</t-button> <t-button @click="() => $router.push('/')">返回首页</t-button>
</result> </result>
</template> </template>

View File

@ -1,6 +1,7 @@
<template> <template>
<result <result
page-header="浏览器不兼容" title="浏览器不兼容"
type="ie"
tip="抱歉,您正在使用的浏览器版本过低,无法打开当前网页" tip="抱歉,您正在使用的浏览器版本过低,无法打开当前网页"
bg-url="https://tdesign.gtimg.com/starter/result-page/browser-incompatible.png" bg-url="https://tdesign.gtimg.com/starter/result-page/browser-incompatible.png"
> >

View File

@ -1,9 +1,5 @@
<template> <template>
<result <result title="网络异常" tip="网络异常,请稍后再试" type="wifi">
page-header="网络异常"
tip="网络异常,请稍后再试"
bg-url="https://tdesign.gtimg.com/starter/result-page/network-error.png"
>
<div> <div>
<t-button theme="default" @click="() => $router.push('/')">返回首页</t-button> <t-button theme="default" @click="() => $router.push('/')">返回首页</t-button>
<t-button @click="() => $router.push('/')">重新加载</t-button> <t-button @click="() => $router.push('/')">重新加载</t-button>

View File

@ -16,8 +16,10 @@ router.beforeEach(async (to, from, next) => {
if (token) { if (token) {
if (to.path === '/login') { if (to.path === '/login') {
setTimeout(() => {
store.dispatch('user/logout'); store.dispatch('user/logout');
store.dispatch('permission/restore'); store.dispatch('permission/restore');
});
next(); next();
return; return;
} }

View File

@ -1,4 +1,5 @@
import Layout from '@/layouts'; import Layout from '@/layouts';
import DashboardIcon from '@/assets/assets-slide-dashboard.svg';
export default [ export default [
{ {
@ -6,7 +7,7 @@ export default [
component: Layout, component: Layout,
redirect: '/dashboard/base', redirect: '/dashboard/base',
name: 'dashboard', name: 'dashboard',
meta: { title: '仪表盘', icon: 'dashboard' }, meta: { title: '仪表盘', icon: DashboardIcon },
children: [ children: [
{ {
path: 'base', path: 'base',

View File

@ -1,4 +1,7 @@
import Layout from '@/layouts'; import Layout from '@/layouts';
import ListIcon from '@/assets/assets-slide-list.svg';
import FormIcon from '@/assets/assets-slide-form.svg';
import DetailIcon from '@/assets/assets-slide-detail.svg';
export default [ export default [
{ {
@ -6,7 +9,7 @@ export default [
name: 'list', name: 'list',
component: Layout, component: Layout,
redirect: '/list/base', redirect: '/list/base',
meta: { title: '列表页', icon: 'view-module' }, meta: { title: '列表页', icon: ListIcon },
children: [ children: [
{ {
path: 'base', path: 'base',
@ -39,7 +42,7 @@ export default [
name: 'form', name: 'form',
component: Layout, component: Layout,
redirect: '/form/base', redirect: '/form/base',
meta: { title: '表单页', icon: 'queue' }, meta: { title: '表单页', icon: FormIcon },
children: [ children: [
{ {
path: 'base', path: 'base',
@ -60,7 +63,7 @@ export default [
name: 'detail', name: 'detail',
component: Layout, component: Layout,
redirect: '/detail/base', redirect: '/detail/base',
meta: { title: '详情页', icon: 'layers' }, meta: { title: '详情页', icon: DetailIcon },
children: [ children: [
{ {
path: 'base', path: 'base',

View File

@ -1,4 +1,5 @@
import Layout from '@/layouts'; import Layout from '@/layouts';
import LogoutIcon from '@/assets/assets-slide-logout.svg';
export default [ export default [
{ {
@ -19,7 +20,7 @@ export default [
{ {
path: '/loginRedirect', path: '/loginRedirect',
name: 'loginRedirect', name: 'loginRedirect',
meta: { title: '登录页', icon: 'chevron-right-rectangle' }, meta: { title: '登录页', icon: LogoutIcon },
component: () => import('@/layouts/blank.vue'), component: () => import('@/layouts/blank.vue'),
children: [ children: [
{ {

View File

@ -116,7 +116,6 @@
} }
&-logo-normal { &-logo-normal {
font-family: TencentSansKoreanW7;
color: @brand-color; color: @brand-color;
font-size: @font-size-l; font-size: @font-size-l;
transition: all 0.3s; transition: all 0.3s;
@ -142,7 +141,9 @@
cursor: pointer; cursor: pointer;
} }
} }
.t-default-menu.t-menu--dark {
background: var(--td-gray-color-13);
}
.logo-container { .logo-container {
cursor: pointer; cursor: pointer;

View File

@ -27,6 +27,7 @@ export default defineConfig({
server: { server: {
port: 3002, port: 3002,
host: '0.0.0.0',
proxy: { proxy: {
'/api': 'http://127.0.0.1:3000/', '/api': 'http://127.0.0.1:3000/',
}, },

5388
yarn.lock Normal file

File diff suppressed because it is too large Load Diff