Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tencent/tdesign-vue-next-starter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.7.5
Choose a base ref
...
head repository: Tencent/tdesign-vue-next-starter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.7.6
Choose a head ref

Commits on Jun 27, 2022

  1. fix: setting radio height

    uyarn committed Jun 27, 2022
    Copy the full SHA
    d3b81b4 View commit details
  2. Copy the full SHA
    c6979d6 View commit details

Commits on Jun 30, 2022

  1. Copy the full SHA
    497b781 View commit details

Commits on Jul 6, 2022

  1. Copy the full SHA
    a7e228b View commit details

Commits on Jul 12, 2022

  1. Copy the full SHA
    1138652 View commit details

Commits on Jul 19, 2022

  1. Copy the full SHA
    2ca9ad1 View commit details

Commits on Jul 27, 2022

  1. Copy the full SHA
    0dffd28 View commit details

Commits on Aug 8, 2022

  1. Copy the full SHA
    94dae4d View commit details

Commits on Aug 11, 2022

  1. Copy the full SHA
    5a825e1 View commit details
  2. Copy the full SHA
    bff0245 View commit details

Commits on Aug 31, 2022

  1. Copy the full SHA
    16c2dc4 View commit details

Commits on Sep 3, 2022

  1. 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](Tencent/tdesign-vue-next@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>
    dependabot[bot] authored and uyarn committed Sep 3, 2022
    Copy the full SHA
    cf3687a View commit details
  2. feat: loginRedirect add redirect (#287)

    Co-authored-by: Setli <set_li@163.com>
    2 people authored and uyarn committed Sep 3, 2022
    Copy the full SHA
    860a830 View commit details
  3. Copy the full SHA
    c4f89d5 View commit details

Commits on Sep 4, 2022

  1. Copy the full SHA
    caea951 View commit details

Commits on Sep 5, 2022

  1. Copy the full SHA
    8cba092 View commit details
  2. Copy the full SHA
    69d2b77 View commit details

Commits on Sep 14, 2022

  1. Copy the full SHA
    f8a2999 View commit details

Commits on Sep 16, 2022

  1. Copy the full SHA
    094339b View commit details

Commits on Sep 27, 2022

  1. fix: 修复持久化的问题 (#316)

    * fix: 修正首次进入页面时由于userStore数据还未初始化导致的白屏的问题
    
    * Update user.ts
    
    fix: 优化逻辑
    PDieE authored and uyarn committed Sep 27, 2022
    Copy the full SHA
    07f3059 View commit details
  2. Copy the full SHA
    fcdebd2 View commit details
  3. Copy the full SHA
    3d618eb View commit details

Commits on Oct 13, 2022

  1. Copy the full SHA
    c9f12bd View commit details
  2. Copy the full SHA
    cfc3b6c View commit details

Commits on Oct 17, 2022

  1. Copy the full SHA
    29f44b3 View commit details

Commits on Oct 18, 2022

  1. Copy the full SHA
    13bf229 View commit details

Commits on Oct 26, 2022

  1. Copy the full SHA
    4ebec48 View commit details

Commits on Nov 16, 2022

  1. Copy the full SHA
    3eb93db View commit details

Commits on Nov 18, 2022

  1. Copy the full SHA
    7d744f6 View commit details
  2. Copy the full SHA
    fa91339 View commit details

Commits on Nov 25, 2022

  1. Copy the full SHA
    2fd6457 View commit details

Commits on Dec 19, 2022

  1. Copy the full SHA
    5797d69 View commit details

Commits on Dec 22, 2022

  1. Copy the full SHA
    80f7a94 View commit details

Commits on Dec 28, 2022

  1. Copy the full SHA
    ae90d88 View commit details

Commits on Jan 3, 2023

  1. Copy the full SHA
    6e60836 View commit details

Commits on Jan 10, 2023

  1. Copy the full SHA
    ec83f9f View commit details

Commits on Jan 12, 2023

  1. Copy the full SHA
    26b0a1b View commit details

Commits on Jan 16, 2023

  1. 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>
    uyarn and timi137137 authored Jan 16, 2023
    Copy the full SHA
    065540e View commit details

Commits on Feb 8, 2023

  1. Copy the full SHA
    4c90ab6 View commit details
  2. Copy the full SHA
    2105cb9 View commit details

Commits on Feb 14, 2023

  1. Copy the full SHA
    848c0e6 View commit details

Commits on Feb 18, 2023

  1. Copy the full SHA
    753cfeb View commit details

Commits on Feb 21, 2023

  1. Copy the full SHA
    a381cb7 View commit details

Commits on Mar 15, 2023

  1. Copy the full SHA
    f77b936 View commit details

Commits on Apr 13, 2023

  1. Copy the full SHA
    fa1746b View commit details

Commits on May 18, 2023

  1. chore: release 0.7.5 (#512)

    uyarn authored May 18, 2023
    Copy the full SHA
    7a7ee4a View commit details
  2. Copy the full SHA
    9840fd4 View commit details

Commits on May 19, 2023

  1. Copy the full SHA
    e773936 View commit details
  2. Copy the full SHA
    f84e348 View commit details

Commits on May 23, 2023

  1. Copy the full SHA
    09fdbb3 View commit details
11 changes: 10 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
// commit-lint config
module.exports = { extends: ['@commitlint/config-conventional'] };
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'types'],
],
},
};
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tdesign-vue-next-starter",
"version": "0.7.4",
"name": "@tencent/tdesign-vue-next-starter",
"version": "0.7.6",
"scripts": {
"dev:mock": "vite --open --mode mock",
"dev": "vite --open --mode development",
@@ -28,9 +28,9 @@
"pinia-plugin-persistedstate": "^3.1.0",
"qrcode.vue": "^3.3.4",
"qs": "^6.11.1",
"tdesign-icons-vue-next": "^0.1.8",
"tdesign-vue-next": "^1.2.2",
"tvision-color": "^1.5.0",
"tdesign-icons-vue-next": "^0.1.11",
"tdesign-vue-next": "^1.3.4",
"tvision-color": "^1.6.0",
"vue": "^3.2.47",
"vue-clipboard3": "^2.0.0",
"vue-router": "~4.1.6"
@@ -83,12 +83,10 @@
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"prettier --write",
"npm run lint:fix",
"git add ."
"npm run lint:fix"
],
"*.{html,vue,vss,sass,less}": [
"npm run stylelint:fix",
"git add ."
"npm run stylelint:fix"
]
}
}
1 change: 0 additions & 1 deletion src/config/global.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const prefix = 'tdesign-starter';
export const TOKEN_NAME = 'tdesign-starter';
14 changes: 8 additions & 6 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -34,12 +34,14 @@ export const CONTRACT_PAYMENT_TYPES = {
RECEIPT: 1,
};

// 通知的优先级对应的TAG类型
export const NOTIFICATION_TYPES = {
low: 'primary',
middle: 'warning',
high: 'danger',
};
// 标签类型
type TagTheme = 'default' | 'success' | 'primary' | 'warning' | 'danger';
// 通知的优先级对应的标签类型
export const NOTIFICATION_TYPES: Map<string, TagTheme> = new Map([
['low', 'primary'],
['middle', 'warning'],
['high', 'danger'],
]);

// 通用请求头
export enum ContentTypeEnum {
2 changes: 1 addition & 1 deletion src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ export const useChart = (domId: string): Ref<echarts.ECharts> => {
* @returns
*/
export const useCounter = (duration = 60): [Ref<number>, () => void] => {
let intervalTimer;
let intervalTimer: ReturnType<typeof setInterval>;
onUnmounted(() => {
clearInterval(intervalTimer);
});
2 changes: 1 addition & 1 deletion src/layouts/components/Header.vue
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ const changeCollapsed = () => {
});
};
const handleNav = (url) => {
const handleNav = (url: string) => {
router.push(url);
};
15 changes: 8 additions & 7 deletions src/layouts/components/LayoutContent.vue
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
:min-column-width="128"
:popup-props="{
overlayClassName: 'route-tabs-dropdown',
onVisibleChange: (visible, ctx) => handleTabMenuClick(visible, ctx, routeItem.path),
onVisibleChange: (visible: boolean, ctx: PopupVisibleChangeContext) => handleTabMenuClick(visible, ctx, routeItem.path),
visible: activeTabPath === routeItem.path,
}"
>
@@ -70,12 +70,13 @@
</template>

<script setup lang="ts">
import type { PopupVisibleChangeContext } from 'tdesign-vue-next';
import { computed, nextTick, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { prefix } from '@/config/global';
import { useSettingStore, useTabsRouterStore } from '@/store';
import type { TRouterInfo } from '@/types/interface';
import type { TRouterInfo, TTabRemoveOptions } from '@/types/interface';
import LBreadcrumb from './Breadcrumb.vue';
import LContent from './Content.vue';
@@ -95,12 +96,12 @@ const handleChangeCurrentTab = (path: string) => {
router.push({ path, query: route.query });
};
const handleRemove = ({ value: path, index }) => {
const handleRemove = (options: TTabRemoveOptions) => {
const { tabRouters } = tabsRouterStore;
const nextRouter = tabRouters[index + 1] || tabRouters[index - 1];
const nextRouter = tabRouters[options.index + 1] || tabRouters[options.index - 1];
tabsRouterStore.subtractCurrentTabRouter({ path, routeIdx: index });
if (path === route.path) router.push({ path: nextRouter.path, query: nextRouter.query });
tabsRouterStore.subtractCurrentTabRouter({ path: options.value as string, routeIdx: options.index });
if ((options.value as string) === route.path) router.push({ path: nextRouter.path, query: nextRouter.query });
};
const handleRefresh = (route: TRouterInfo, routeIdx: number) => {
@@ -147,7 +148,7 @@ const handleOperationEffect = (type: 'other' | 'ahead' | 'behind', routeIndex: n
activeTabPath.value = null;
};
const handleTabMenuClick = (visible: boolean, ctx, path: string) => {
const handleTabMenuClick = (visible: boolean, ctx: PopupVisibleChangeContext, path: string) => {
if (ctx.trigger === 'document') activeTabPath.value = null;
if (visible) activeTabPath.value = path;
};
3 changes: 2 additions & 1 deletion src/layouts/components/LayoutSideNav.vue
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { usePermissionStore, useSettingStore } from '@/store';
import type { MenuRoute } from '@/types/interface';
import LSideNav from './SideNav.vue';
@@ -26,7 +27,7 @@ const { routers: menuRouters } = storeToRefs(permissionStore);
const sideMenu = computed(() => {
const { layout, splitMenu } = settingStore;
let newMenuRouters = menuRouters.value;
let newMenuRouters = menuRouters.value as Array<MenuRoute>;
if (layout === 'mix' && splitMenu) {
newMenuRouters.forEach((menu) => {
if (route.path.indexOf(menu.path) === 0) {
2 changes: 1 addition & 1 deletion src/layouts/setting.vue
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ const initStyleConfig = () => {
const styleConfig = STYLE_CONFIG;
for (const key in styleConfig) {
if (Object.prototype.hasOwnProperty.call(styleConfig, key)) {
styleConfig[key] = settingStore[key];
(styleConfig[key as keyof typeof STYLE_CONFIG] as any) = settingStore[key as keyof typeof STYLE_CONFIG];
}
}
3 changes: 2 additions & 1 deletion src/pages/dashboard/base/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dayjs from 'dayjs';
import { EChartsOption } from 'echarts';

import { TChartColor } from '@/config/color';
import { getRandomArray } from '@/utils/charts';
@@ -307,7 +308,7 @@ export function getPieChartDataSet({
textColor,
placeholderColor,
containerColor,
}: { radius?: number } & Record<string, string>) {
}: { radius?: number } & Record<string, string>): EChartsOption {
return {
color: getChartListColor(),
tooltip: {
8 changes: 4 additions & 4 deletions src/pages/detail/advanced/constants.ts
Original file line number Diff line number Diff line change
@@ -83,14 +83,14 @@ export const TABLE_COLUMNS_DATA = [
ellipsis: true,
colKey: 'index',
title: '申请号',
sorter: (a, b) => a.index.substr(3) - b.index.substr(3),
sorter: (a: any, b: any) => a.index.substr(3) - b.index.substr(3),
},
{
width: 200,
ellipsis: true,
colKey: 'pdName',
title: '产品名称',
sorter: (a, b) => a.pdName.length - b.pdName.length,
sorter: (a: any, b: any) => a.pdName.length - b.pdName.length,
},
{
width: 200,
@@ -103,7 +103,7 @@ export const TABLE_COLUMNS_DATA = [
ellipsis: true,
colKey: 'purchaseNum',
title: '采购数量',
sorter: (a, b) => a.purchaseNum - b.purchaseNum,
sorter: (a: any, b: any) => a.purchaseNum - b.purchaseNum,
},
{
width: 160,
@@ -116,7 +116,7 @@ export const TABLE_COLUMNS_DATA = [
ellipsis: true,
colKey: 'updateTime',
title: '创建时间',
sorter: (a, b) => Date.parse(a.updateTime) - Date.parse(b.updateTime),
sorter: (a: any, b: any) => Date.parse(a.updateTime) - Date.parse(b.updateTime),
},
{
align: 'left' as const,
6 changes: 3 additions & 3 deletions src/pages/detail/advanced/index.vue
Original file line number Diff line number Diff line change
@@ -170,16 +170,16 @@ onMounted(() => {
});
const visible = ref(false);
const sortChange = (val) => {
const sortChange = (val: unknown) => {
console.log(val);
};
const rehandleChange = (changeParams, triggerAndData) => {
const rehandleChange = (changeParams: unknown, triggerAndData: unknown) => {
console.log('统一Change', changeParams, triggerAndData);
};
const listClick = () => {
visible.value = true;
};
const deleteClickOp = (columns) => {
const deleteClickOp = (columns: { rowIndex: number }) => {
data.value.splice(columns.rowIndex, 1);
};
const onConfirm = () => {
4 changes: 2 additions & 2 deletions src/pages/detail/deploy/constants.ts
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ export const TABLE_COLUMNS = [
ellipsis: true,
colKey: 'name',
title: '项目名称',
sorter: (a, b) => a.name.substr(10) - b.name.substr(10),
sorter: (a: any, b: any) => a.name.substr(10) - b.name.substr(10),
},
{
width: '280',
@@ -101,7 +101,7 @@ export const TABLE_COLUMNS = [
ellipsis: true,
colKey: 'updateTime',
title: '创建时间',
sorter: (a, b) => Date.parse(a.updateTime) - Date.parse(b.updateTime),
sorter: (a: any, b: any) => Date.parse(a.updateTime) - Date.parse(b.updateTime),
},
{
align: 'left' as const,
9 changes: 3 additions & 6 deletions src/pages/detail/deploy/index.vue
Original file line number Diff line number Diff line change
@@ -147,8 +147,6 @@ onMounted(() => {
dataChart.setOption(get2ColBarChartDataSet({ ...chartColors.value }));
});
const intervalTimer = null;
/// / chartSize update
const updateContainer = () => {
monitorChart.resize({
@@ -163,7 +161,6 @@ const updateContainer = () => {
onUnmounted(() => {
window.removeEventListener('resize', updateContainer);
clearInterval(intervalTimer);
});
const onAlertChange = () => {
@@ -182,10 +179,10 @@ watch(
},
);
const sortChange = (val) => {
const sortChange = (val: unknown) => {
console.log(val);
};
const rehandleChange = (changeParams, triggerAndData) => {
const rehandleChange = (changeParams: unknown, triggerAndData: unknown) => {
console.log('统一Change', changeParams, triggerAndData);
};
const listClick = () => {
@@ -194,7 +191,7 @@ const listClick = () => {
const onConfirm = () => {
visible.value = false;
};
const deleteClickOp = (e) => {
const deleteClickOp = (e: { rowIndex: number }) => {
data.value.splice(e.rowIndex, 1);
};
</script>
2 changes: 1 addition & 1 deletion src/pages/detail/secondary/index.vue
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<t-list v-if="msgDataList.length > 0" class="secondary-msg-list" :split="true">
<t-list-item v-for="(item, index) in msgDataList" :key="index">
<p :class="['content', { unread: item.status }]" @click="setReadStatus(item)">
<t-tag size="medium" :theme="NOTIFICATION_TYPES[item.quality]" variant="light">
<t-tag size="medium" :theme="NOTIFICATION_TYPES.get(item.quality)" variant="light">
{{ item.type }}
</t-tag>
{{ item.content }}
4 changes: 2 additions & 2 deletions src/pages/form/base/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormRule } from 'tdesign-vue-next';
import type { FormRule, UploadFile } from 'tdesign-vue-next';

export const FORM_RULES: Record<string, FormRule[]> = {
name: [{ required: true, message: '请输入合同名称', type: 'error' }],
@@ -23,7 +23,7 @@ export const INITIAL_DATA = {
payment: '1',
amount: 0,
comment: '',
files: [],
files: [] as Array<UploadFile>,
};

export const TYPE_OPTIONS = [
13 changes: 7 additions & 6 deletions src/pages/form/base/index.vue
Original file line number Diff line number Diff line change
@@ -164,6 +164,7 @@ export default {
</script>

<script setup lang="ts">
import type { SubmitContext, UploadFailContext, UploadFile } from 'tdesign-vue-next';
import { MessagePlugin } from 'tdesign-vue-next';
import { ref } from 'vue';
@@ -174,12 +175,12 @@ const formData = ref({ ...INITIAL_DATA });
const onReset = () => {
MessagePlugin.warning('取消新建');
};
const onSubmit = ({ validateResult }) => {
if (validateResult === true) {
const onSubmit = (ctx: SubmitContext) => {
if (ctx.validateResult === true) {
MessagePlugin.success('新建成功');
}
};
const beforeUpload = (file) => {
const beforeUpload = (file: UploadFile) => {
if (!/\.(pdf)$/.test(file.name)) {
MessagePlugin.warning('请上传pdf文件');
return false;
@@ -190,11 +191,11 @@ const beforeUpload = (file) => {
}
return true;
};
const handleFail = ({ file }) => {
MessagePlugin.error(`文件 ${file.name} 上传失败`);
const handleFail = (options: UploadFailContext) => {
MessagePlugin.error(`文件 ${options.file.name} 上传失败`);
};
// 用于格式化接口响应值,error 会被用于上传失败的提示文字;url 表示文件/图片地址
const formatResponse = (res) => {
const formatResponse = (res: any) => {
return { ...res, error: '上传失败,请重试', url: res.url };
};
</script>
Loading