Skip to content

Commit

Permalink
Sync tdesign vue next starter (#13)
Browse files Browse the repository at this point in the history
* fix: 修复菜单搜索浮层样式问题

* chore: release 0.7.7 (#548)

* build(deps-dev): bump typescript from 4.9.5 to 5.1.6 (#551)

* feat: 更新ruoyi-ui所有依赖 (#553)

* refactor: 重构Axios工具,新增接口级防抖节流 (#556)
  • Loading branch information
yixiaco authored Jul 10, 2023
1 parent 9add79d commit cbb0dfc
Show file tree
Hide file tree
Showing 36 changed files with 445 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<template #topContent>
<t-row>
<t-col flex="auto">
<t-button v-hasPermi="['${moduleName}:${businessName}:add']" theme="primary" @click="handleAdd">
<t-button v-hasPermi="['${moduleName}:${businessName}:add']" theme="primary" @click="handleAdd()">
<template #icon> <add-icon /></template>
新增
</t-button>
Expand Down Expand Up @@ -561,7 +561,7 @@ function handleSortChange(value?: TableSort) {

#end
/** 新增按钮操作 */
function handleAdd(row: ${vo}) {
function handleAdd(row?: ${vo}) {
reset();
getTreeselect();
if (row != null && row.${treeCode}) {
Expand Down Expand Up @@ -603,7 +603,7 @@ function handleDetail(row: ${vo}) {
}

/** 修改按钮操作 */
async function handleUpdate(row: ${vo}) {
async function handleUpdate(row?: ${vo}) {
buttonLoading.value = true;
reset();
open.value = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
theme="default"
variant="outline"
:disabled="single"
@click="handleUpdate"
@click="handleUpdate()"
>
<template #icon> <edit-icon /> </template>
修改
Expand All @@ -110,7 +110,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -585,12 +585,12 @@ function handleDetail(row: ${vo}) {
}

/** 修改按钮操作 */
function handleUpdate(row: ${vo}) {
function handleUpdate(row?: ${vo}) {
buttonLoading.value = true;
reset();
open.value = true;
title.value = '修改${functionName}';
const ${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value.at(0);
const ${pkColumn.javaField} = row?.${pkColumn.javaField} || ids.value.at(0);
get${BusinessName}(${pkColumn.javaField}).then((response) => {
buttonLoading.value = false;
form.value = response.data;
Expand Down Expand Up @@ -646,8 +646,8 @@ function submitForm({ validateResult, firstError }: SubmitContext) {
}

/** 删除按钮操作 */
function handleDelete(row: ${vo}) {
const ${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
function handleDelete(row?: ${vo}) {
const ${pkColumn.javaField}s = row?.${pkColumn.javaField} || ids.value;
proxy.#[[$modal]]#.confirm(`是否确认删除${functionName}编号为${${pkColumn.javaField}s}的数据项?`, () => {
const msgLoading = proxy.$modal.msgLoading('正在删除中...');
return del${BusinessName}(${pkColumn.javaField}s)
Expand Down
1 change: 1 addition & 0 deletions ruoyi-ui/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
Expand Down
34 changes: 17 additions & 17 deletions ruoyi-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": "true",
"name": "@tencent/tdesign-vue-next-starter",
"version": "0.7.6",
"version": "0.7.7",
"description": "Ruoyi-Tdesign多租户管理系统",
"scripts": {
"dev:mock": "vite --open --mode mock",
Expand All @@ -24,7 +24,7 @@
"@highlightjs/vue-plugin": "^2.1.0",
"axios": "^1.4.0",
"ckeditor5-overall-build": "^0.1.6",
"dayjs": "^1.11.8",
"dayjs": "^1.11.9",
"echarts": "5.1.2",
"file-saver": "^2.0.5",
"fuse.js": "^6.6.2",
Expand All @@ -35,59 +35,59 @@
"nprogress": "^0.2.0",
"pinia": "^2.1.4",
"pinia-plugin-persistedstate": "^3.1.0",
"qrcode.vue": "^3.3.4",
"qrcode.vue": "^3.4.0",
"qs": "^6.11.2",
"tdesign-icons-vue-next": "^0.1.11",
"tdesign-vue-next": "^1.3.10",
"tvision-color": "^1.6.0",
"vue": "^3.3.4",
"vue-clipboard3": "^2.0.0",
"vue-cropper": "^1.0.9",
"vue-router": "~4.2.2"
"vue-router": "~4.2.3"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@types/echarts": "^4.9.16",
"@types/echarts": "^4.9.18",
"@types/js-cookie": "^3.0.3",
"@types/lodash": "^4.14.195",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/compiler-sfc": "^3.3.4",
"@vue/eslint-config-typescript": "^11.0.3",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.43.0",
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.15.1",
"eslint-plugin-vue-scoped-css": "^2.4.0",
"eslint-plugin-vue-scoped-css": "^2.5.0",
"less": "^4.1.3",
"lint-staged": "^13.2.2",
"lint-staged": "^13.2.3",
"mockjs": "^1.1.0",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
"prettier": "^2.8.8",
"stylelint": "~14.9.1",
"stylelint": "~15.10.1",
"stylelint-config-prettier": "~9.0.5",
"stylelint-less": "1.0.6",
"stylelint-less": "1.0.7",
"stylelint-order": "~6.0.3",
"typescript": "~4.9.5",
"unplugin-auto-import": "^0.16.4",
"typescript": "~5.1.6",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.3.9",
"vite": "^4.4.2",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^3.0.0",
"vite-plugin-vue-devtools": "^0.3.2",
"vite-plugin-vue-devtools": "^0.5.0",
"vite-svg-loader": "^4.0.0",
"vue-tsc": "^1.8.2"
"vue-tsc": "^1.8.4"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion ruoyi-ui/src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as echarts from 'echarts/core';
import { ComponentInternalInstance, getCurrentInstance, onMounted, onUnmounted, Ref, ref } from 'vue';
import { onMounted, onUnmounted, Ref, ref } from 'vue';

/**
* eChart hook
Expand Down
6 changes: 3 additions & 3 deletions ruoyi-ui/src/pages/monitor/logininfor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -230,8 +230,8 @@ function handleSortChange(value?: TableSort) {
getList();
}
/** 删除按钮操作 */
function handleDelete(row: SysLogininforVo) {
const infoIds = row.infoId || ids.value;
function handleDelete(row?: SysLogininforVo) {
const infoIds = row?.infoId || ids.value;
proxy.$modal.confirm(`是否确认删除访问编号为"${infoIds}"的数据项?`, () => {
return delLogininfor(infoIds).then(() => {
getList();
Expand Down
6 changes: 3 additions & 3 deletions ruoyi-ui/src/pages/monitor/operlog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -290,8 +290,8 @@ function handleView(row: SysOperLogVo, index: number) {
form.value = row;
}
/** 删除按钮操作 */
function handleDelete(row: SysOperLogVo) {
const operIds = row.operId || ids.value;
function handleDelete(row?: SysOperLogVo) {
const operIds = row?.operId || ids.value;
proxy.$modal.confirm(`是否确认删除日志编号为"${operIds}"的数据项?`, () => {
return delOperlog(operIds).then(() => {
getList();
Expand Down
12 changes: 6 additions & 6 deletions ruoyi-ui/src/pages/system/app/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
theme="default"
variant="outline"
:disabled="single"
@click="handleUpdate"
@click="handleUpdate()"
>
<template #icon> <edit-icon /> </template>
修改
Expand All @@ -62,7 +62,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -315,12 +315,12 @@ function handleDetail(row: SysAppVo) {
}
/** 修改按钮操作 */
function handleUpdate(row: SysAppVo) {
function handleUpdate(row?: SysAppVo) {
buttonLoading.value = true;
reset();
open.value = true;
title.value = '修改应用管理';
const appid = row.appid || ids.value.at(0);
const appid = row?.appid || ids.value.at(0);
getApp(appid).then((response) => {
buttonLoading.value = false;
form.value = response.data;
Expand Down Expand Up @@ -366,8 +366,8 @@ function submitForm({ validateResult, firstError }: SubmitContext) {
}
/** 删除按钮操作 */
function handleDelete(row: SysAppVo) {
const appids = row.appid || ids.value;
function handleDelete(row?: SysAppVo) {
const appids = row?.appid || ids.value;
proxy.$modal.confirm(`是否确认删除应用管理编号为${appids}的数据项?`, () => {
const msgLoading = proxy.$modal.msgLoading('正在删除中...');
return delApp(appids)
Expand Down
4 changes: 2 additions & 2 deletions ruoyi-ui/src/pages/system/dept/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<template #topContent>
<t-row>
<t-col flex="auto">
<t-button v-hasPermi="['system:dept:add']" theme="primary" @click="handleAdd">
<t-button v-hasPermi="['system:dept:add']" theme="primary" @click="handleAdd()">
<template #icon> <add-icon /></template>
新增
</t-button>
Expand Down Expand Up @@ -279,7 +279,7 @@ function handleSortChange(value?: TableSort) {
getList();
}
/** 新增按钮操作 */
function handleAdd(row: SysDeptVo) {
function handleAdd(row?: SysDeptVo) {
reset();
open.value = true;
title.value = '添加部门';
Expand Down
10 changes: 5 additions & 5 deletions ruoyi-ui/src/pages/system/dict/data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
theme="default"
variant="outline"
:disabled="single"
@click="handleUpdate"
@click="handleUpdate()"
>
<template #icon> <edit-icon /> </template>
修改
Expand All @@ -70,7 +70,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -335,7 +335,7 @@ function handleSelectionChange(selection: Array<string | number>) {
multiple.value = !selection.length;
}
/** 修改按钮操作 */
function handleUpdate(row: SysDictDataVo) {
function handleUpdate(row?: SysDictDataVo) {
reset();
open.value = true;
title.value = '修改字典数据';
Expand Down Expand Up @@ -377,8 +377,8 @@ function submitForm({ validateResult, firstError }: SubmitContext) {
}
}
/** 删除按钮操作 */
function handleDelete(row: SysDictDataVo) {
const dictCodes = row.dictCode || ids.value;
function handleDelete(row?: SysDictDataVo) {
const dictCodes = row?.dictCode || ids.value;
proxy.$modal.confirm(`是否确认删除字典编码为"${dictCodes}"的数据项?`, () => {
const msgLoading = proxy.$modal.msgLoading('正在删除中...');
return delData(dictCodes)
Expand Down
12 changes: 6 additions & 6 deletions ruoyi-ui/src/pages/system/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
theme="default"
variant="outline"
:disabled="single"
@click="handleUpdate"
@click="handleUpdate()"
>
<template #icon> <edit-icon /> </template>
修改
Expand All @@ -83,7 +83,7 @@
theme="danger"
variant="outline"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete()"
>
<template #icon> <delete-icon /> </template>
删除
Expand Down Expand Up @@ -291,12 +291,12 @@ function handleSelectionChange(selection: Array<string | number>) {
multiple.value = !selection.length;
}
/** 修改按钮操作 */
function handleUpdate(row: SysDictTypeVo) {
function handleUpdate(row?: SysDictTypeVo) {
reset();
open.value = true;
title.value = '修改字典类型';
eLoading.value = true;
const dictId = row.dictId || ids.value.at(0);
const dictId = row?.dictId || ids.value.at(0);
getType(dictId).then((response) => {
form.value = response.data;
eLoading.value = false;
Expand Down Expand Up @@ -331,8 +331,8 @@ function submitForm({ validateResult, firstError }: SubmitContext) {
}
}
/** 删除按钮操作 */
function handleDelete(row: SysDictTypeVo) {
const dictIds = row.dictId || ids.value;
function handleDelete(row?: SysDictTypeVo) {
const dictIds = row?.dictId || ids.value;
proxy.$modal.confirm(`是否确认删除字典编号为"${dictIds}"的数据项?`, () => {
return delType(dictIds).then(() => {
getList();
Expand Down
4 changes: 2 additions & 2 deletions ruoyi-ui/src/pages/system/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<template #topContent>
<t-row>
<t-col flex="auto">
<t-button v-hasPermi="['system:menu:add']" theme="primary" @click="handleAdd">
<t-button v-hasPermi="['system:menu:add']" theme="primary" @click="handleAdd()">
<template #icon> <add-icon /></template>
新增
</t-button>
Expand Down Expand Up @@ -423,7 +423,7 @@ function handleSortChange(value?: TableSort) {
getList();
}
/** 新增按钮操作 */
function handleAdd(row: SysMenuVo) {
function handleAdd(row?: SysMenuVo) {
reset();
open.value = true;
title.value = '添加菜单';
Expand Down
Loading

0 comments on commit cbb0dfc

Please sign in to comment.