review:同步 vue5 官方的差异
This commit is contained in:
@@ -8,6 +8,7 @@ import type { ComponentType } from './component';
|
|||||||
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
|
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
|
// TODO @xingyu:要不搞到全局的校验?
|
||||||
/** 手机号正则表达式(中国) */
|
/** 手机号正则表达式(中国) */
|
||||||
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ async function handleNotificationMakeAll() {
|
|||||||
|
|
||||||
/** 清空通知 */
|
/** 清空通知 */
|
||||||
async function handleNotificationClear() {
|
async function handleNotificationClear() {
|
||||||
handleNotificationMakeAll();
|
await handleNotificationMakeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 标记单个已读 */
|
/** 标记单个已读 */
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ async function initComponentAdapter() {
|
|||||||
'select',
|
'select',
|
||||||
{
|
{
|
||||||
component: ElTreeSelect,
|
component: ElTreeSelect,
|
||||||
|
// TODO @xingyu:这里要加 props: { label: 'label', children: 'children' }, vben 官方是有的
|
||||||
nodeKey: 'value',
|
nodeKey: 'value',
|
||||||
loadingSlot: 'loading',
|
loadingSlot: 'loading',
|
||||||
optionsPropName: 'data',
|
optionsPropName: 'data',
|
||||||
@@ -250,6 +251,7 @@ async function initComponentAdapter() {
|
|||||||
},
|
},
|
||||||
// 自定义默认按钮
|
// 自定义默认按钮
|
||||||
DefaultButton: (props, { attrs, slots }) => {
|
DefaultButton: (props, { attrs, slots }) => {
|
||||||
|
// TODO @xingyu:, type: 'info' 要加么?vben5 是有的;
|
||||||
return h(ElButton, { ...props, attrs }, slots);
|
return h(ElButton, { ...props, attrs }, slots);
|
||||||
},
|
},
|
||||||
// 自定义主要按钮
|
// 自定义主要按钮
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import type { ComponentType } from './component';
|
|||||||
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
|
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
||||||
|
// TODO @xingyu:要不搞到全局的校验?
|
||||||
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
const MOBILE_REGEX = /(?:0|86|\+86)?1[3-9]\d{9}/;
|
||||||
|
|
||||||
async function initSetupVbenForm() {
|
async function initSetupVbenForm() {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ async function handleNotificationMakeAll() {
|
|||||||
|
|
||||||
/** 清空通知 */
|
/** 清空通知 */
|
||||||
async function handleNotificationClear() {
|
async function handleNotificationClear() {
|
||||||
handleNotificationMakeAll();
|
await handleNotificationMakeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 标记单个已读 */
|
/** 标记单个已读 */
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
padding: 0 4px 2px;
|
padding: 0 4px 2px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
line-height: 0.9;
|
line-height: 0.9;
|
||||||
color: hsl(var(--secondary-foreground));
|
|
||||||
vertical-align: 2px;
|
vertical-align: 2px;
|
||||||
|
color: hsl(var(--secondary-foreground));
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background-color: hsl(var(--secondary));
|
background-color: hsl(var(--secondary));
|
||||||
|
|||||||
@@ -1072,8 +1072,8 @@ watch(
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
content: '';
|
|
||||||
outline: 1px dashed #d6d6d6;
|
outline: 1px dashed #d6d6d6;
|
||||||
|
content: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
.resize-stick {
|
.resize-stick {
|
||||||
|
|||||||
@@ -132,8 +132,8 @@ function toggleTheme(event: MouseEvent) {
|
|||||||
&__sun {
|
&__sun {
|
||||||
@apply fill-foreground/90 stroke-none;
|
@apply fill-foreground/90 stroke-none;
|
||||||
|
|
||||||
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
|
|
||||||
transform-origin: center center;
|
transform-origin: center center;
|
||||||
|
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
|
||||||
|
|
||||||
&:hover > svg > & {
|
&:hover > svg > & {
|
||||||
@apply fill-foreground/90;
|
@apply fill-foreground/90;
|
||||||
@@ -143,10 +143,10 @@ function toggleTheme(event: MouseEvent) {
|
|||||||
&__sun-beams {
|
&__sun-beams {
|
||||||
@apply stroke-foreground/90 stroke-[2px];
|
@apply stroke-foreground/90 stroke-[2px];
|
||||||
|
|
||||||
|
transform-origin: center center;
|
||||||
transition:
|
transition:
|
||||||
transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25),
|
transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25),
|
||||||
opacity 0.6s cubic-bezier(0.25, 0, 0.3, 1);
|
opacity 0.6s cubic-bezier(0.25, 0, 0.3, 1);
|
||||||
transform-origin: center center;
|
|
||||||
|
|
||||||
&:hover > svg > & {
|
&:hover > svg > & {
|
||||||
@apply stroke-foreground;
|
@apply stroke-foreground;
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
{
|
{
|
||||||
"title": "System Management",
|
"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": {
|
"menu": {
|
||||||
"title": "Menu Management",
|
"title": "Menu Management",
|
||||||
"parent": "Parent Menu",
|
"parent": "Parent Menu",
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
{
|
{
|
||||||
|
"dept": {
|
||||||
|
"list": "部门列表",
|
||||||
|
"createTime": "创建时间",
|
||||||
|
"deptName": "部门名称",
|
||||||
|
"name": "部门",
|
||||||
|
"operation": "操作",
|
||||||
|
"parentDept": "上级部门",
|
||||||
|
"remark": "备注",
|
||||||
|
"status": "状态",
|
||||||
|
"title": "部门管理"
|
||||||
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"list": "菜单列表",
|
"list": "菜单列表",
|
||||||
"activeIcon": "激活图标",
|
"activeIcon": "激活图标",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
|
||||||
|
|
||||||
import type { VbenFormSchema } from '#/adapter/form';
|
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 type { SystemDeptApi } from '#/api/system/dept';
|
||||||
|
|
||||||
import { z } from '#/adapter/form';
|
import { z } from '#/adapter/form';
|
||||||
|
|||||||
Reference in New Issue
Block a user