fix: antd lint

This commit is contained in:
xingyu4j
2025-11-24 14:34:38 +08:00
parent 709afe9a83
commit 50ba0c137a
76 changed files with 220 additions and 205 deletions

View File

@@ -123,7 +123,7 @@ function emitSpuChange() {
<!-- 添加商品按钮 -->
<Tooltip v-if="canAdd" title="选择商品">
<div
class="hover:border-primary hover:bg-primary/5 flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed transition-colors"
class="flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed transition-colors hover:border-primary hover:bg-primary/5"
@click="handleOpenSpuSelect"
>
<!-- TODO @AI还是使用 IconifyIcon使用自己的 + 图标 -->

View File

@@ -111,6 +111,7 @@ function emitActivityChange() {
>
<Tooltip :title="activity.name">
<div class="relative h-full w-full">
<!-- TODO @芋艿 -->
<Image
:src="activity.picUrl"
class="h-full w-full rounded-lg object-cover"
@@ -128,7 +129,7 @@ function emitActivityChange() {
<!-- 添加活动按钮 -->
<Tooltip v-if="canAdd" title="选择活动">
<div
class="hover:border-primary hover:bg-primary/5 flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed transition-colors"
class="flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed transition-colors hover:border-primary hover:bg-primary/5"
@click="handleOpenActivitySelect"
>
<PlusOutlined class="text-xl text-gray-400" />

View File

@@ -12,7 +12,7 @@ defineProps<{ property: ImageBarProperty }>();
</script>
<template>
<div
class="bg-card flex h-12 items-center justify-center"
class="flex h-12 items-center justify-center bg-card"
v-if="!property.imgUrl"
>
<IconifyIcon icon="lucide:image" class="text-3xl text-gray-600" />

View File

@@ -94,7 +94,7 @@ function calculateWidth() {
ref="containerRef"
>
<div
class="bg-card relative box-content flex flex-row flex-wrap overflow-hidden"
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-card"
:style="{
...calculateSpace(index),
...calculateWidth(),

View File

@@ -101,7 +101,7 @@ function calculateWidth() {
borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
borderBottomRightRadius: `${property.borderRadiusBottom}px`,
}"
class="bg-card relative box-content flex flex-row flex-wrap overflow-hidden"
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-card"
>
<!-- 角标 -->
<div

View File

@@ -91,7 +91,7 @@ function calculateWidth() {
ref="containerRef"
>
<div
class="bg-card relative box-content flex flex-row flex-wrap overflow-hidden"
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-card"
:style="{
...calculateSpace(index),
...calculateWidth(),

View File

@@ -21,7 +21,7 @@ defineProps<{ property: UserCardProperty }>();
</div>
<IconifyIcon icon="tdesign:qrcode" :size="20" />
</div>
<div class="bg-card flex items-center justify-between px-5 py-2 text-xs">
<div class="flex items-center justify-between bg-card px-5 py-2 text-xs">
<span class="text-orange-500">点击绑定手机号</span>
<span class="rounded-lg bg-orange-500 px-2 py-1 text-white">
去绑定

View File

@@ -297,7 +297,7 @@ onMounted(() => {
<template>
<Page auto-content-height>
<!-- 顶部工具栏 -->
<Row class="bg-card flex max-h-12 rounded-lg">
<Row class="flex max-h-12 rounded-lg bg-card">
<!-- 左侧操作区 -->
<Col :span="8">
<slot name="toolBarLeft"></slot>
@@ -350,7 +350,7 @@ onMounted(() => {
<!-- 手机顶部 -->
<div class="mx-auto flex w-96 flex-col">
<!-- 手机顶部状态栏 -->
<img alt="" class="bg-card h-6" :src="statusBarImg" />
<img alt="" class="h-6 bg-card" :src="statusBarImg" />
<!-- 手机顶部导航栏 -->
<ComponentContainer
v-if="showNavigationBar"

View File

@@ -58,7 +58,7 @@ const handleDelete = function (index: number) {
<div class="mb-1 flex flex-col gap-1 rounded border border-gray-200 p-2">
<!-- 操作按钮区 -->
<div
class="bg-secondary -m-2 mb-1 flex flex-row items-center justify-between rounded-t p-2"
class="-m-2 mb-1 flex flex-row items-center justify-between rounded-t bg-secondary p-2"
>
<Tooltip title="拖动排序">
<IconifyIcon

View File

@@ -202,7 +202,7 @@ function eachCube(callback: (x: number, y: number, cube: Cube) => void) {
<td
v-for="(cube, col) in rowCubes"
:key="col"
class="active:bg-primary-200 hover:bg-primary-100 box-border cursor-pointer border text-center align-middle"
class="box-border cursor-pointer border text-center align-middle hover:bg-primary-100 active:bg-primary-200"
:class="[{ active: cube.active }]"
:style="{
width: `${cubeSize}px`,
@@ -219,7 +219,7 @@ function eachCube(callback: (x: number, y: number, cube: Cube) => void) {
<div
v-for="(hotArea, index) in hotAreas"
:key="index"
class="bg-primary-200 border-primary absolute box-border flex items-center justify-center border"
class="absolute box-border flex items-center justify-center border border-primary bg-primary-200"
:style="{
top: `${cubeSize * hotArea.top}px`,
left: `${cubeSize * hotArea.left}px`,
@@ -232,12 +232,12 @@ function eachCube(callback: (x: number, y: number, cube: Cube) => void) {
<!-- 右上角热区删除按钮 -->
<div
v-if="selectedHotAreaIndex === index && hotArea.width && hotArea.height"
class="bg-card absolute -right-2 -top-2 z-[1] size-6 h-4 w-4 items-center rounded-lg"
class="absolute -right-2 -top-2 z-[1] size-6 h-4 w-4 items-center rounded-lg bg-card"
@click="handleDeleteHotArea(index)"
>
<IconifyIcon
icon="lucide:x"
class="bg-primary inset-0 items-center text-white"
class="inset-0 items-center bg-primary text-white"
/>
</div>
<span v-if="hotArea.width">

View File

@@ -159,7 +159,7 @@ onBeforeUnmount(() => {
<template>
<div
class="bg-background flex flex-shrink-0 flex-col border-r border-gray-200 p-4"
class="flex flex-shrink-0 flex-col border-r border-gray-200 bg-background p-4"
>
<div class="flex h-12 w-full flex-row items-center justify-between">
<span class="text-lg font-bold">会话记录</span>
@@ -213,7 +213,7 @@ onBeforeUnmount(() => {
<ul
v-show="showRightMenu"
:style="rightMenuStyle"
class="bg-background absolute z-[9999] m-0 w-32 list-none rounded-xl p-1 shadow-md"
class="absolute z-[9999] m-0 w-32 list-none rounded-xl bg-background p-1 shadow-md"
>
<li
v-show="!rightClickConversation.adminPinned"

View File

@@ -91,7 +91,7 @@ function pushMessage(message: any) {
/** 按照时间倒序,获取消息列表 */
const getMessageList0 = computed(() => {
// 使用展开运算符创建新数组,避免直接修改原数组
return [...messageList.value].sort(
return [...messageList.value].toSorted(
(a: any, b: any) => a.createTime - b.createTime,
);
});
@@ -261,7 +261,7 @@ function showTime(item: MallKefuMessageApi.Message, index: number) {
<template>
<div
v-if="showMessageList()"
class="bg-background flex h-full flex-auto flex-col p-4"
class="flex h-full flex-auto flex-col bg-background p-4"
>
<div class="flex h-full flex-auto flex-shrink-0 flex-col">
<div class="flex h-12 w-full flex-row items-center justify-between">
@@ -415,7 +415,7 @@ function showTime(item: MallKefuMessageApi.Message, index: number) {
</div>
</div>
</div>
<div v-else class="bg-background relative">
<div v-else class="relative bg-background">
<Empty description="请选择左侧的一个会话后开始" class="mt-[20%]" />
</div>
</template>

View File

@@ -78,7 +78,7 @@ function formatOrderStatus(order: any) {
<div class="flex flex-row text-sm">
<div>订单号</div>
<span
class="text-primary cursor-pointer hover:underline"
class="cursor-pointer text-primary hover:underline"
@click="openDetail(getMessageContent.id)"
>
{{ getMessageContent.no }}

View File

@@ -32,7 +32,7 @@ function handleSelect(item: Emoji) {
v-for="(item, index) in emojiList"
:key="index"
:title="item.name"
class="w-1/10 border-primary m-2 flex cursor-pointer items-center justify-center border border-solid p-2"
class="w-1/10 m-2 flex cursor-pointer items-center justify-center border border-solid border-primary p-2"
@click="handleSelect(item)"
>
<img :src="item.url" class="size-4" />

View File

@@ -12,7 +12,9 @@ import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */
const userStore = useUserStore();
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.DeliveryPickUpStore[]>([]);
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.DeliveryPickUpStore[]>(
[],
);
getSimpleDeliveryPickUpStoreList().then((res) => {
pickUpStoreList.value = res;
// 移除自己无法核销的门店

View File

@@ -113,7 +113,8 @@ const [Modal, modalApi] = useVbenModal({
return;
}
// 加载数据
const data = modalApi.getData<MallDeliveryPickUpStoreApi.DeliveryPickUpStore>();
const data =
modalApi.getData<MallDeliveryPickUpStoreApi.DeliveryPickUpStore>();
if (!data || !data.id) {
// 初始化地图
await initTencentLbsMap();