fix(@vben/web-antdv-next): replace deprecated semantic props

- migrate Spin wrapperClassName and tip to classes.root and description
- migrate Card bodyStyle and borderless usage to styles.body and variant
- migrate Tooltip, Popover, and Dropdown overlay props to classes.root and styles.root
This commit is contained in:
XuZhiqiang
2026-06-25 18:07:44 +08:00
parent 514a5a02d5
commit 6bc0d627c1
34 changed files with 58 additions and 54 deletions

View File

@@ -179,7 +179,7 @@ async function handleSubmitApply() {
</template>
</Input>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<div class="h-[400px] mt-2.5">
<div
v-if="visibleUsers.length === 0"

View File

@@ -170,7 +170,7 @@ function updateLocalResult(id: number, handleResult: number) {
:mask="{ closable: false }"
class="im-group-request-list__dialog"
>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<div class="flex flex-col gap-3 max-h-[60vh] overflow-y-auto pr-1">
<!-- 空态 -->
<Empty v-if="!loading && list.length === 0" description="暂无进群申请" />

View File

@@ -147,7 +147,7 @@ async function handleJoin() {
<Popover
v-model:open="popoverVisible"
placement="bottomLeft"
:overlay-style="{ width: '280px' }"
:styles="{ root: { width: '280px' } }"
trigger="click"
>
<!-- 胶囊条本体电话图标 + 文案含人数+ 右箭头 -->

View File

@@ -305,7 +305,7 @@ async function handleDeleteFriend() {
</div>
<!-- 右上 "..." 菜单 friend 态展示加入/移出黑名单 + 删除联系人 -->
<div v-if="relation === 'friend'" class="flex-shrink-0">
<Dropdown :trigger="['click']" placement="bottomRight" overlay-class-name="im-user-info__more-menu">
<Dropdown :trigger="['click']" placement="bottomRight" :classes="{ root: 'im-user-info__more-menu' }">
<div
class="flex items-center justify-center w-7 h-7 rounded cursor-pointer hover:bg-[var(--ant-color-fill-secondary)]"
>

View File

@@ -497,7 +497,7 @@ function handleOpenTransferOwner() {
v-model:open="namePopoverVisible"
trigger="click"
placement="leftTop"
:overlay-style="{ width: '280px' }"
:styles="{ root: { width: '280px' } }"
>
<div
class="im-conversation-group-side__row flex flex-col items-stretch gap-1.5 px-4 py-[14px] text-14px min-h-6 cursor-pointer transition-colors duration-150 hover:bg-[var(--ant-color-fill-tertiary)]"
@@ -529,7 +529,7 @@ function handleOpenTransferOwner() {
v-model:open="noticePopoverVisible"
trigger="click"
placement="leftTop"
:overlay-style="{ width: '320px' }"
:styles="{ root: { width: '320px' } }"
>
<div
class="im-conversation-group-side__row flex flex-col items-stretch gap-1.5 px-4 py-[14px] text-14px min-h-6 cursor-pointer transition-colors duration-150 hover:bg-[var(--ant-color-fill-tertiary)]"
@@ -586,7 +586,7 @@ function handleOpenTransferOwner() {
v-model:open="groupRemarkPopoverVisible"
trigger="click"
placement="leftTop"
:overlay-style="{ width: '280px' }"
:styles="{ root: { width: '280px' } }"
>
<div
class="im-conversation-group-side__row flex flex-col items-stretch gap-1.5 px-4 py-[14px] text-14px min-h-6 cursor-pointer transition-colors duration-150 hover:bg-[var(--ant-color-fill-tertiary)]"
@@ -625,7 +625,7 @@ function handleOpenTransferOwner() {
v-model:open="remarkPopoverVisible"
trigger="click"
placement="leftTop"
:overlay-style="{ width: '280px' }"
:styles="{ root: { width: '280px' } }"
>
<div
class="im-conversation-group-side__row flex flex-col items-stretch gap-1.5 px-4 py-[14px] text-14px min-h-6 cursor-pointer transition-colors duration-150 hover:bg-[var(--ant-color-fill-tertiary)]"

View File

@@ -145,7 +145,7 @@ function handleGroupCreated(groupId: number) {
v-if="!friend"
class="flex flex-col items-center justify-center h-full text-13px text-[var(--ant-color-text-placeholder)] bg-[var(--ant-color-bg-container)]"
>
<Spin tip="加载中..." />
<Spin description="加载中..." />
</div>
<div v-else class="flex flex-col h-full bg-[var(--ant-color-bg-container)]">
<div class="flex-1 overflow-y-auto bg-[var(--ant-color-fill-secondary)]">
@@ -184,7 +184,7 @@ function handleGroupCreated(groupId: number) {
v-model:open="displayNamePopoverVisible"
trigger="click"
placement="leftTop"
:overlay-style="{ width: '280px' }"
:styles="{ root: { width: '280px' } }"
>
<div
class="im-conversation-private-side__row flex flex-col items-stretch gap-1.5 px-4 py-[14px] text-14px min-h-6 cursor-pointer transition-colors duration-150 hover:bg-[var(--ant-color-fill-tertiary)]"

View File

@@ -118,7 +118,7 @@ const onClick = async () => {
wrap-class-name="im-material-detail-modal"
destroy-on-hidden
>
<Spin :spinning="detailLoading" wrapper-class-name="w-full">
<Spin :spinning="detailLoading" :classes="{ root: 'w-full' }">
<div class="material-detail-body max-w-[720px] mx-auto px-5 pt-6 pb-20 min-h-[60vh]">
<div class="text-[22px] font-600 leading-[1.4] text-[var(--ant-color-text)] mb-5">
{{ payload.title || '' }}

View File

@@ -569,7 +569,7 @@ function locateMessage(messageId: number) {
v-model:open="datePopoverVisible"
trigger="click"
placement="bottom"
:overlay-style="{ width: '320px' }"
:styles="{ root: { width: '320px' } }"
>
<span
class="im-message-history__tab cursor-pointer"
@@ -600,7 +600,7 @@ function locateMessage(messageId: number) {
v-model:open="memberPopoverVisible"
trigger="click"
placement="bottom"
:overlay-style="{ width: '320px' }"
:styles="{ root: { width: '320px' } }"
>
<span
class="im-message-history__tab cursor-pointer"

View File

@@ -567,9 +567,9 @@ watch(
v-if="isPrivate"
v-model:open="callPopoverVisible"
placement="bottomRight"
:overlay-style="{ width: '140px' }"
:styles="{ root: { width: '140px' } }"
trigger="click"
overlay-class-name="message-panel__call-popover"
:classes="{ root: 'message-panel__call-popover' }"
>
<Icon
icon="ant-design:phone-outlined"

View File

@@ -126,7 +126,7 @@ async function loadReadUsers() {
v-model:open="popVisible"
placement="left"
trigger="click"
:overlay-style="{ width: '320px' }"
:styles="{ root: { width: '320px' } }"
@open-change="(open) => open && loadReadUsers()"
>
<span

View File

@@ -100,7 +100,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
v-if="row.deviceMessage"
placement="topLeft"
:trigger="['hover']"
:overlay-style="{ maxWidth: '600px' }"
:styles="{ root: { maxWidth: '600px' } }"
>
<template #content>
<pre class="text-xs">{{

View File

@@ -331,7 +331,7 @@ onBeforeUnmount(() => {
class="mb-4"
>
<Card
:body-style="{ padding: '0' }"
:styles="{ body: { padding: '0' } }"
class="relative h-full overflow-hidden transition-colors"
>
<!-- 添加渐变背景层 -->

View File

@@ -275,7 +275,7 @@ onMounted(async () => {
<DeviceImportFormModal @success="handleRefresh" />
<!-- 统一搜索工具栏 -->
<Card :body-style="{ padding: '16px' }" class="!mb-2">
<Card :styles="{ body: { padding: '16px' } }" class="!mb-2">
<!-- 搜索表单 -->
<div class="mb-3 flex flex-wrap items-center gap-3">
<Select

View File

@@ -118,11 +118,13 @@ onMounted(() => {
:lg="6"
>
<Card
:body-style="{
padding: '16px',
display: 'flex',
flexDirection: 'column',
height: '100%',
:styles="{
body: {
padding: '16px',
display: 'flex',
flexDirection: 'column',
height: '100%',
},
}"
class="h-full overflow-hidden rounded-lg transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg"
>

View File

@@ -173,7 +173,7 @@ onMounted(() => {
<FormModal @success="handleRefresh" />
<!-- 统一搜索工具栏 -->
<Card :body-style="{ padding: '16px' }" class="!mb-2">
<Card :styles="{ body: { padding: '16px' } }" class="!mb-2">
<!-- 搜索表单 -->
<div class="mb-3 flex items-center gap-3">
<Input

View File

@@ -127,11 +127,13 @@ onMounted(() => {
:lg="6"
>
<Card
:body-style="{
padding: '16px',
display: 'flex',
flexDirection: 'column',
height: '100%',
:styles="{
body: {
padding: '16px',
display: 'flex',
flexDirection: 'column',
height: '100%',
},
}"
class="h-full overflow-hidden rounded-lg transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg"
>

View File

@@ -433,10 +433,10 @@ watch(
<div class="absolute right-2 top-2">
<Popover
placement="leftTop"
:overlay-style="{ width: '450px' }"
:styles="{ root: { width: '450px' } }"
:trigger="['click']"
:arrow="true"
overlay-class-name="json-params-detail-popover"
:classes="{ root: 'json-params-detail-popover' }"
>
<template #content>
<!-- 弹出层内容 -->

View File

@@ -247,10 +247,10 @@ watch(
<Popover
v-if="selectedProperty"
placement="rightTop"
:overlay-style="{ width: '350px' }"
:styles="{ root: { width: '350px' } }"
:trigger="['click']"
:arrow="true"
overlay-class-name="property-detail-popover"
:classes="{ root: 'property-detail-popover' }"
>
<template #content>
<!-- 弹出层内容 -->

View File

@@ -230,7 +230,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
<!-- 统计卡片 -->
<Row :gutter="16" class="mb-4">
<Col :span="6">
<Card :body-style="{ padding: '12px 16px' }">
<Card :styles="{ body: { padding: '12px 16px' } }">
<div class="flex items-center">
<div
class="w-10 h-10 rounded-lg flex items-center justify-center text-xl text-white mr-3 bg-gradient-to-br from-indigo-500 to-purple-600"
@@ -247,7 +247,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
</Card>
</Col>
<Col :span="6">
<Card :body-style="{ padding: '12px 16px' }">
<Card :styles="{ body: { padding: '12px 16px' } }">
<div class="flex items-center">
<div
class="w-10 h-10 rounded-lg flex items-center justify-center text-xl text-white mr-3 bg-gradient-to-br from-pink-400 to-red-500"
@@ -264,7 +264,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
</Card>
</Col>
<Col :span="6">
<Card :body-style="{ padding: '12px 16px' }">
<Card :styles="{ body: { padding: '12px 16px' } }">
<div class="flex items-center">
<div
class="w-10 h-10 rounded-lg flex items-center justify-center text-xl text-white mr-3 bg-gradient-to-br from-cyan-400 to-blue-500"
@@ -281,7 +281,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
</Card>
</Col>
<Col :span="6">
<Card :body-style="{ padding: '12px 16px' }">
<Card :styles="{ body: { padding: '12px 16px' } }">
<div class="flex items-center">
<div
class="w-10 h-10 rounded-lg flex items-center justify-center text-xl text-white mr-3 bg-gradient-to-br from-green-400 to-teal-400"

View File

@@ -119,7 +119,7 @@ async function handleExport() {
</script>
<template>
<Card :bordered="false" title="商品概况" class="h-full">
<Card variant="borderless" title="商品概况" class="h-full">
<template #extra>
<!-- 查询条件 -->
<div class="flex items-center gap-2">

View File

@@ -122,7 +122,7 @@ async function handleExport() {
</script>
<template>
<Card :bordered="false" title="交易状况" class="h-full">
<Card variant="borderless" title="交易状况" class="h-full">
<template #extra>
<!-- 查询条件 -->
<div class="flex items-center gap-2">

View File

@@ -36,7 +36,7 @@ function handleToday() {
<template>
<div>
<CalendarLegend />
<Spin :spinning="loading" wrapper-class-name="block">
<Spin :spinning="loading" :classes="{ root: 'block' }">
<div class="bg-card overflow-hidden rounded-md">
<Calendar v-model:value="currentDate" class="mes-calendar-panel">
<template #headerRender>

View File

@@ -224,7 +224,7 @@ watch(
v-for="item in list"
:key="item.id"
hoverable
:body-style="{ padding: '0px' }"
:styles="{ body: { padding: '0px' } }"
>
<Image
v-if="item.url"

View File

@@ -119,7 +119,7 @@ onMounted(() => {
<IconifyIcon class="size-4" icon="lucide:search" />
</template>
</Input>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<Tree
v-if="itemTypeTree.length > 0"
:default-expand-all="true"

View File

@@ -82,7 +82,7 @@ onMounted(async () => {
<IconifyIcon class="size-4" icon="lucide:search" />
</template>
</Input>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<Tree
v-if="deptTree.length > 0"
v-model:selected-keys="selectedKeys"

View File

@@ -134,7 +134,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
<Modal title="数据权限" class="w-2/5">
<Form class="mx-4">
<template #dataScopeDeptIds="slotProps">
<Spin :spinning="deptLoading" wrapper-class-name="w-full">
<Spin :spinning="deptLoading" :classes="{ root: 'w-full' }">
<Tree
:tree-data="deptTree"
multiple

View File

@@ -142,7 +142,7 @@ function getNodeClass(node: Recordable<any>) {
<Modal title="菜单权限" class="w-2/5">
<Form class="mx-4">
<template #menuIds="slotProps">
<Spin :spinning="menuLoading" wrapper-class-name="w-full">
<Spin :spinning="menuLoading" :classes="{ root: 'w-full' }">
<Tree
:tree-data="menuTree"
multiple

View File

@@ -134,7 +134,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
<Modal :title="getTitle" class="w-2/5">
<Form class="mx-6">
<template #menuIds="slotProps">
<Spin :spinning="menuLoading" wrapper-class-name="w-full">
<Spin :spinning="menuLoading" :classes="{ root: 'w-full' }">
<Tree
class="max-h-96 overflow-y-auto"
:tree-data="menuTree"

View File

@@ -68,7 +68,7 @@ onMounted(async () => {
<IconifyIcon icon="lucide:search" class="size-4" />
</template>
</Input>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<Tree
@select="handleSelect"
v-if="deptTree.length > 0"

View File

@@ -50,7 +50,7 @@ onMounted(() => {
/>
</template>
<div class="flex flex-col gap-2">
<Card :body-style="{ padding: '16px' }">
<Card :styles="{ body: { padding: '16px' } }">
<div class="flex flex-wrap items-center justify-between gap-4">
<div>
<div class="text-xl font-semibold">WMS 首页</div>

View File

@@ -75,7 +75,7 @@ defineExpose({ load });
<template>
<div class="grid grid-cols-2 gap-4 max-lg:grid-cols-1">
<Card :body-style="{ padding: '12px 16px 16px' }">
<Card :styles="{ body: { padding: '12px 16px 16px' } }">
<div class="mb-3">
<div class="font-semibold">货物占比</div>
<div class="text-sm text-muted-foreground">
@@ -92,7 +92,7 @@ defineExpose({ load });
</div>
</div>
</Card>
<Card :body-style="{ padding: '12px 16px 16px' }">
<Card :styles="{ body: { padding: '12px 16px 16px' } }">
<div class="mb-3 flex justify-between">
<div>
<div class="font-semibold">库存分布</div>

View File

@@ -141,7 +141,7 @@ defineExpose({ load });
<Card
v-for="item in summaryList"
:key="item.type"
:body-style="{ padding: '12px 16px 16px' }"
:styles="{ body: { padding: '12px 16px 16px' } }"
class="h-full shadow-sm"
:loading="loading"
:style="{ borderTop: `3px solid ${item.color}` }"

View File

@@ -57,7 +57,7 @@ defineExpose({ load });
</script>
<template>
<Card :body-style="{ padding: '12px 16px 16px' }">
<Card :styles="{ body: { padding: '12px 16px 16px' } }">
<div class="mb-3 flex items-center justify-between">
<div>
<div class="font-semibold">单据趋势</div>

View File

@@ -114,7 +114,7 @@ onMounted(() => {
<IconifyIcon class="size-4" icon="lucide:search" />
</template>
</Input>
<Spin :spinning="loading" wrapper-class-name="w-full">
<Spin :spinning="loading" :classes="{ root: 'w-full' }">
<Tree
v-if="categoryTree.length > 0"
:default-expand-all="true"