Merge branch 'main' into feature/antd上传组件支持调用Image组件查看图片

This commit is contained in:
Jin Mao
2025-11-24 21:59:34 +08:00
committed by GitHub
158 changed files with 1018 additions and 1286 deletions

View File

@@ -24,7 +24,7 @@ onMounted(() => {
{ name: '定制', value: 310 },
{ name: '技术支持', value: 274 },
{ name: '远程', value: 400 },
].sort((a, b) => {
].toSorted((a, b) => {
return a.value - b.value;
}),
name: '商业占比',

View File

@@ -58,7 +58,7 @@ async function changeAccount(role: string) {
<Card class="mb-5">
<template #title>
<span class="font-semibold">当前角色:</span>
<span class="text-primary mx-4 text-lg">
<span class="mx-4 text-lg text-primary">
{{ userStore.userRoles?.[0] }}
</span>
</template>

View File

@@ -71,7 +71,7 @@ async function handleToggleAccessMode() {
>
<Card class="mb-5" title="权限模式">
<span class="font-semibold">当前权限模式:</span>
<span class="text-primary mx-4">{{
<span class="mx-4 text-primary">{{
accessMode === 'frontend' ? '前端权限控制' : '后端权限控制'
}}</span>
<Button type="primary" @click="handleToggleAccessMode">

View File

@@ -31,7 +31,7 @@ const inputComponent = h(Input);
<template>
<Page title="图标">
<template #description>
<div class="text-foreground/80 mt-2">
<div class="mt-2 text-foreground/80">
图标可在
<a
class="text-primary"

View File

@@ -20,7 +20,7 @@ async function handleClick(type: LoginExpiredModeType) {
<template>
<Page title="登录过期演示">
<template #description>
<div class="text-foreground/80 mt-2">
<div class="mt-2 text-foreground/80">
接口请求遇到401状态码时需要重新登录有两种方式
<p>1.转到登录页登录成功后跳转回原页面</p>
<p>

View File

@@ -41,7 +41,7 @@ function reset() {
<template>
<Page description="用于需要操作标签页的场景" title="标签页">
<Card class="mb-5" title="打开/关闭标签页">
<div class="text-foreground/80 mb-3">
<div class="mb-3 text-foreground/80">
如果标签页存在直接跳转切换如果标签页不存在则打开新的标签页
</div>
<div class="flex flex-wrap gap-3">
@@ -53,7 +53,7 @@ function reset() {
</Card>
<Card class="mb-5" title="标签页操作">
<div class="text-foreground/80 mb-3">用于动态控制标签页的各种操作</div>
<div class="mb-3 text-foreground/80">用于动态控制标签页的各种操作</div>
<div class="flex flex-wrap gap-3">
<Button type="primary" @click="closeCurrentTab()">
关闭当前标签页
@@ -73,7 +73,7 @@ function reset() {
</Card>
<Card class="mb-5" title="动态标题">
<div class="text-foreground/80 mb-3">
<div class="mb-3 text-foreground/80">
该操作不会影响页面标题仅修改Tab标题
</div>
<div class="flex flex-wrap items-center gap-3">
@@ -90,7 +90,7 @@ function reset() {
</Card>
<Card class="mb-5" title="最大打开数量">
<div class="text-foreground/80 mb-3">
<div class="mb-3 text-foreground/80">
限制带参数的tab打开的最大数量 `route.meta.maxNumOfOpenTab` 控制
</div>
<div class="flex flex-wrap items-center gap-3">

View File

@@ -48,7 +48,7 @@ async function createWaterMark() {
<template>
<Page title="水印">
<template #description>
<div class="text-foreground/80 mt-2">
<div class="mt-2 text-foreground/80">
水印使用了
<a
class="text-primary"

View File

@@ -35,7 +35,7 @@ function handleUpdate(len: number) {
<div
v-for="item in list"
:key="item"
class="even:bg-heavy bg-muted flex-center h-[220px] w-full"
class="flex-center h-[220px] w-full bg-muted even:bg-heavy"
>
{{ item }}
</div>

View File

@@ -56,7 +56,7 @@ const leftMaxWidth = ref(props.leftMaxWidth || 100);
<div
v-else
:style="{ minWidth: '200px' }"
class="border-border bg-card mr-2 rounded-[var(--radius)] border p-2"
class="mr-2 rounded-[var(--radius)] border border-border bg-card p-2"
>
<p>这里是左侧内容</p>
<p>这里是左侧内容</p>

View File

@@ -51,7 +51,7 @@ const loadingV = refAutoReset(false, 3000);
<template #icon>
<IconifyIcon
icon="svg-spinners:ring-resize"
class="text-primary size-10"
class="size-10 text-primary"
/>
</template>
</Loading>
@@ -65,7 +65,7 @@ const loadingV = refAutoReset(false, 3000);
<template #icon>
<IconifyIcon
icon="svg-spinners:bars-scale"
class="text-primary size-10"
class="size-10 text-primary"
/>
</template>
</Loading>

View File

@@ -38,7 +38,7 @@ function handleUpdate(len?: number) {
<div
v-for="item in list"
:key="item"
class="even:bg-heavy bg-muted flex-center h-[220px] w-full"
class="flex-center h-[220px] w-full bg-muted even:bg-heavy"
>
{{ item }}
</div>

View File

@@ -291,7 +291,7 @@ function goDoc() {
<Form class="mt-4" />
<template #actions>
<p
class="text-secondary-foreground hover:text-secondary-foreground cursor-default"
class="cursor-default text-secondary-foreground hover:text-secondary-foreground"
>
更多配置请
<Button type="link" size="small" @click="goDoc">查看文档</Button>

View File

@@ -107,7 +107,7 @@ const schema: VbenFormSchema[] = [
componentProps() {
// 不需要处理多语言时就无需这么做
return {
addonAfter: titleSuffix.value,
...(titleSuffix.value && { addonAfter: titleSuffix.value }),
onChange({ target: { value } }: ChangeEvent) {
titleSuffix.value = value && $te(value) ? $t(value) : undefined;
},
@@ -442,7 +442,6 @@ const [Form, formApi] = useVbenForm({
showDefaultActions: false,
wrapperClass: 'grid-cols-2 gap-x-4',
});
const [Drawer, drawerApi] = useVbenDrawer({
onConfirm: onSubmit,
onOpenChange(isOpen) {