update: 升级前端核心依赖并完成适配
- 升级 Vue、Vue Router、Element Plus、Vite、UnoCSS、Sass、vue-tsc、oxlint 等前端核心依赖 - 适配依赖升级后的类型检查、键盘事件和 Sass 命名空间写法 - 登录记住功能仅保存用户名和 rememberMe,不再保存密码 - 移除模板中的 scope.row 类型断言,改由处理函数使用 Partial<VO> 承接
This commit is contained in:
@@ -618,7 +618,7 @@ const { resetQuery } = useSearchReset({
|
||||
});
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = (row?: ${BusinessName}VO) => {
|
||||
const handleAdd = (row?: Partial<${BusinessName}VO>) => {
|
||||
openDialog('添加${functionName}');
|
||||
getTreeselect();
|
||||
if (row != null && row.${treeCode}) {
|
||||
@@ -629,7 +629,7 @@ const handleAdd = (row?: ${BusinessName}VO) => {
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row: ${BusinessName}VO) => {
|
||||
const handleUpdate = async (row: Partial<${BusinessName}VO>) => {
|
||||
reset();
|
||||
await getTreeselect(row.${treeCode});
|
||||
if (row != null) {
|
||||
@@ -668,7 +668,7 @@ const submitForm = () => {
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row: ${BusinessName}VO) => {
|
||||
const handleDelete = async (row: Partial<${BusinessName}VO>) => {
|
||||
await modal.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?');
|
||||
setLoading(true);
|
||||
await del${BusinessName}(row.${pkColumn.javaField}).finally(() => setLoading(false));
|
||||
@@ -687,7 +687,7 @@ const filterTreeOptions = (options: ${BusinessName}Option[], excludeId: string |
|
||||
|
||||
#if($enableStatus)
|
||||
/** 状态修改 */
|
||||
const handleStatusChange = async (row: ${BusinessName}VO) => {
|
||||
const handleStatusChange = async (row: Partial<${BusinessName}VO>) => {
|
||||
const text = row.${statusField} === ${statusField}ActiveValue ? '启用' : '停用';
|
||||
try {
|
||||
await modal.confirm('确认要"' + text + '"吗?');
|
||||
@@ -701,7 +701,7 @@ const handleStatusChange = async (row: ${BusinessName}VO) => {
|
||||
|
||||
#if($enableSort)
|
||||
/** 排序调整 */
|
||||
const handleSortChange = async (row: ${BusinessName}VO) => {
|
||||
const handleSortChange = async (row: Partial<${BusinessName}VO>) => {
|
||||
try {
|
||||
await update${BusinessName}Sort(row.${pkColumn.javaField}, row.${sortField});
|
||||
modal.msgSuccess('排序更新成功');
|
||||
|
||||
Reference in New Issue
Block a user