review:同步 vue5 官方的差异

This commit is contained in:
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();
}
/** 标记单个已读 */