mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 07:48:22 +08:00
Chore/sync main to site (#664)
* fix: setting radio height * build(deps): bump tdesign-vue-next from 0.20.2 to 0.20.3 (#283) Bumps [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next) from 0.20.2 to 0.20.3. - [Release notes](https://github.com/Tencent/tdesign-vue-next/releases) - [Changelog](https://github.com/Tencent/tdesign-vue-next/blob/develop/CHANGELOG.md) - [Commits](https://github.com/Tencent/tdesign-vue-next/compare/0.20.2...0.20.3) --- updated-dependencies: - dependency-name: tdesign-vue-next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: loginRedirect add redirect (#287) Co-authored-by: Setli <set_li@163.com> * fix: tab-router refresh fail (#289) * fix: 修复持久化的问题 (#316) * fix: 修正首次进入页面时由于userStore数据还未初始化导致的白屏的问题 * Update user.ts fix: 优化逻辑 * fix: 修复路径重复拼接的问题 (#319) * feat: upgrade tdesign to 0.23 (#322) * feat: add backend dynamic router permission code (#394) (#397) * chore: 大致雏形 * feat: complete permission code * feat: 修复渲染问题并完善权限代码 * chore: release 0.7.0 * chore: 更新依赖 * chore: fix echarts version * feat: upgrade dependencies * chore: mock route map * chore: hash router * chore: concat fixed routers * chore: fix dependencies * feat: optimize * chore: remove roles from get menu process * chore: remain fe permssion code Co-authored-by: 悠静萝莉 <i@mikuhl.cn> Co-authored-by: 悠静萝莉 <i@mikuhl.cn> * chore: sync main for develop (#549) * feat: upgrade vite4 (#533) * chore: 升级vite4 * docs: 项目简介 修改 * fix: 打包后预览提示TypeError * chore: @vitejs/plugin-vue,@vitejs/plugin-vue-jsx升级 * docs: 项目简介 修改 * fix: 204无内容直接返回判断 (#539) * feat(axios util): support params stringify (#544) * fix(permission store): clear routes when logout (#545) fix #541 * chore: release 0.7.7 (#548) * chore: release 0.7.7 * chore: dump tdesign version --------- Co-authored-by: liweijie0812 <674416404@qq.com> Co-authored-by: ngyyuusora <jiliangsoft@live.com> * chore: update version (#616) * fix: echarts resize error (#622) * fix: mock menu (#630) * fix(i18n): pages.result.fail.modify中文未定义 (#632) * fix(i18n): 修复用户中心词条不生效的问题 (#634) * fix: 修复husky可能找不到npx命令的问题 (#635) * fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636) * feat: 升级依赖到最新版本 (#637) * feat: 升级依赖到最新版本 * fix(style): 使用新版格式修复文件 * fix(style): eslint自动格式化 * feat(hook): 替换窗口大小变化监听器 (#638) * feat(hook): 替换窗口大小变化监听器 * feat(state): 替换响应式数据监听器 * feat(clipboard): 移除无用依赖,替换剪贴方法 * fix: 补上遗漏的逗号 * fix: 移除重复出现的依赖项 * feat: use $t (#640) * fix: ts error (#652) * fix: 修复循环过深的问题 (#650) * fix: 修复循环过深的问题 * fix: 修复依赖更新导致的类型错误 * chore: fix type (#653) * chore: fix type * chore: remove console * fix: hotfix useRoute bug after vue 3.4 release (#660) * chore: sync main to site --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Setli <darkgame@163.com> Co-authored-by: Setli <set_li@163.com> Co-authored-by: PDieE <23275429@qq.com> Co-authored-by: 悠静萝莉 <i@mikuhl.cn> Co-authored-by: liweijie0812 <674416404@qq.com> Co-authored-by: ngyyuusora <jiliangsoft@live.com> Co-authored-by: Cosmos <cosmosliu@foxmail.com> Co-authored-by: PY <pengyue970715@gmail.com>
This commit is contained in:
parent
6b21e52422
commit
f122189e0e
|
@ -34,7 +34,7 @@
|
|||
"tdesign-site-components": "^0.12.9",
|
||||
"tdesign-theme-generator": "^1.0.5",
|
||||
"tvision-color": "^1.6.0",
|
||||
"vue": "^3.3.8",
|
||||
"vue": "~3.3.8",
|
||||
"vue-i18n": "^9.6.5",
|
||||
"vue-router": "~4.2.4"
|
||||
},
|
||||
|
|
|
@ -71,9 +71,9 @@
|
|||
</t-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import { MessagePlugin } from 'tdesign-vue-next';
|
||||
import { computed, onMounted, ref, watchEffect } from 'vue';
|
||||
import useClipboard from 'vue-clipboard3';
|
||||
|
||||
import LayoutMixIcon from '@/assets/assets-layout-mix.svg';
|
||||
import LayoutSideIcon from '@/assets/assets-layout-side.svg';
|
||||
|
@ -147,8 +147,8 @@ const handleCloseDrawer = () => {
|
|||
|
||||
const handleCopy = () => {
|
||||
const text = JSON.stringify(formData.value, null, 4);
|
||||
const { toClipboard } = useClipboard();
|
||||
toClipboard(text)
|
||||
const { copy } = useClipboard({ source: text });
|
||||
copy(text)
|
||||
.then(() => {
|
||||
MessagePlugin.closeAll();
|
||||
MessagePlugin.success('复制成功');
|
||||
|
@ -190,6 +190,7 @@ const dynamicColor = computed(() => {
|
|||
.t-drawer__mask {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.t-drawer__body {
|
||||
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
||||
background-color: var(--td-bg-color-secondarycontainer);
|
||||
|
@ -215,6 +216,7 @@ const dynamicColor = computed(() => {
|
|||
padding: var(--td-comp-paddingTB-l) var(--td-comp-paddingLR-l);
|
||||
border-radius: var(--td-radius-extraLarge);
|
||||
height: 100%;
|
||||
|
||||
&-subgroup {
|
||||
margin: var(--td-comp-margin-m) 0;
|
||||
}
|
||||
|
@ -224,6 +226,7 @@ const dynamicColor = computed(() => {
|
|||
background-color: var(--td-bg-color-secondarycontainer);
|
||||
border-radius: var(--td-radius-large);
|
||||
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
||||
|
||||
> .t-form__item {
|
||||
background-color: var(--td-bg-color-container);
|
||||
margin-bottom: var(--td-comp-margin-xs);
|
||||
|
@ -235,6 +238,7 @@ const dynamicColor = computed(() => {
|
|||
border-radius: var(--td-radius-medium);
|
||||
}
|
||||
}
|
||||
|
||||
.setting-group-title {
|
||||
text-align: left;
|
||||
font: var(--td-font-title-medium);
|
||||
|
@ -252,13 +256,16 @@ const dynamicColor = computed(() => {
|
|||
padding: 0;
|
||||
border-radius: var(--td-radius-default);
|
||||
border: none;
|
||||
|
||||
> .t-radio-button__label {
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
|
||||
.mode-img,
|
||||
.layout-img {
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.picked {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
|
|
@ -18,14 +18,12 @@ const languages = usePreferredLanguages();
|
|||
// 生成语言模块列表
|
||||
const generateLangModuleMap = () => {
|
||||
const fullPaths = Object.keys(langModules);
|
||||
console.log(langModules, 'langModules');
|
||||
fullPaths.forEach((fullPath) => {
|
||||
const k = fullPath.replace('./lang', '');
|
||||
const startIndex = 1;
|
||||
const lastIndex = k.lastIndexOf('/');
|
||||
const code = k.substring(startIndex, lastIndex);
|
||||
langCode.push(code);
|
||||
console.log(langCode, 'langCode');
|
||||
langModuleMap.set(code, langModules[fullPath]);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ LayoutMap.set('IFRAME', IFRAME);
|
|||
let dynamicViewsModules: Record<string, () => Promise<Recordable>>;
|
||||
|
||||
// 动态从包内引入单个Icon
|
||||
async function getMenuIcon(iconName: string) {
|
||||
async function getMenuIcon(iconName: string): Promise<string> {
|
||||
const RenderIcon = iconsPath[`../../../node_modules/tdesign-icons-vue-next/esm/components/${iconName}.js`];
|
||||
|
||||
const Icon = await RenderIcon();
|
||||
|
@ -51,7 +51,8 @@ function asyncImportRoute(routes: RouteItem[] | undefined) {
|
|||
} else if (name) {
|
||||
item.component = PARENT_LAYOUT();
|
||||
}
|
||||
if (item.meta.icon) item.meta.icon = (await getMenuIcon(item.meta.icon)).value;
|
||||
|
||||
if (item.meta.icon) item.meta.icon = await getMenuIcon(item.meta.icon);
|
||||
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
children && asyncImportRoute(children);
|
||||
|
|
Loading…
Reference in New Issue
Block a user