review:同步 vue5 官方的差异

pull/209/head
YunaiV 2025-09-01 23:29:44 +08:00
parent 4062bb03fb
commit 67da079606
11 changed files with 34 additions and 7 deletions

View File

@ -8,6 +8,7 @@ import type { ComponentType } from './component';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
// TODO @xingyu要不搞到全局的校验
/** 手机号正则表达式(中国) */
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;

View File

@ -133,7 +133,7 @@ async function handleNotificationMakeAll() {
/** 清空通知 */
async function handleNotificationClear() {
handleNotificationMakeAll();
await handleNotificationMakeAll();
}
/** 标记单个已读 */

View File

@ -222,6 +222,7 @@ async function initComponentAdapter() {
'select',
{
component: ElTreeSelect,
// TODO @xingyu这里要加 props: { label: 'label', children: 'children' }, vben 官方是有的
nodeKey: 'value',
loadingSlot: 'loading',
optionsPropName: 'data',
@ -250,6 +251,7 @@ async function initComponentAdapter() {
},
// 自定义默认按钮
DefaultButton: (props, { attrs, slots }) => {
// TODO @xingyu, type: 'info' 要加么vben5 是有的;
return h(ElButton, { ...props, attrs }, slots);
},
// 自定义主要按钮

View File

@ -8,6 +8,7 @@ import type { ComponentType } from './component';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
// TODO @xingyu要不搞到全局的校验
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
async function initSetupVbenForm() {

View File

@ -133,7 +133,7 @@ async function handleNotificationMakeAll() {
/** 清空通知 */
async function handleNotificationClear() {
handleNotificationMakeAll();
await handleNotificationMakeAll();
}
/** 标记单个已读 */

View File

@ -14,8 +14,8 @@
padding: 0 4px 2px;
font-size: 0.9em;
line-height: 0.9;
color: hsl(var(--secondary-foreground));
vertical-align: 2px;
color: hsl(var(--secondary-foreground));
cursor: pointer;
user-select: none;
background-color: hsl(var(--secondary));

View File

@ -1072,8 +1072,8 @@ watch(
box-sizing: border-box;
width: 100%;
height: 100%;
content: '';
outline: 1px dashed #d6d6d6;
content: '';
}
.resize-stick {

View File

@ -132,8 +132,8 @@ function toggleTheme(event: MouseEvent) {
&__sun {
@apply fill-foreground/90 stroke-none;
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
transform-origin: center center;
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
&:hover > svg > & {
@apply fill-foreground/90;
@ -143,10 +143,10 @@ function toggleTheme(event: MouseEvent) {
&__sun-beams {
@apply stroke-foreground/90 stroke-[2px];
transform-origin: center center;
transition:
transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25),
opacity 0.6s cubic-bezier(0.25, 0, 0.3, 1);
transform-origin: center center;
&:hover > svg > & {
@apply stroke-foreground;

View File

@ -1,5 +1,15 @@
{
"title": "System Management",
"dept": {
"name": "Department",
"title": "Department Management",
"deptName": "Department Name",
"status": "Status",
"createTime": "Create Time",
"remark": "Remark",
"operation": "Operation",
"parentDept": "Parent Department"
},
"menu": {
"title": "Menu Management",
"parent": "Parent Menu",

View File

@ -1,4 +1,15 @@
{
"dept": {
"list": "部门列表",
"createTime": "创建时间",
"deptName": "部门名称",
"name": "部门",
"operation": "操作",
"parentDept": "上级部门",
"remark": "备注",
"status": "状态",
"title": "部门管理"
},
"menu": {
"list": "菜单列表",
"activeIcon": "激活图标",

View File

@ -1,5 +1,7 @@
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
import type { VbenFormSchema } from '#/adapter/form';
import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table';
import type { OnActionClickFn } from '#/adapter/vxe-table';
import type { SystemDeptApi } from '#/api/system/dept';
import { z } from '#/adapter/form';