fix: ele lint

This commit is contained in:
xingyu4j
2025-11-24 14:34:52 +08:00
parent 50ba0c137a
commit db8d66d046
43 changed files with 97 additions and 88 deletions

View File

@@ -125,7 +125,7 @@ function emitSpuChange() {
<!-- 添加商品按钮 -->
<ElTooltip v-if="canAdd" content="选择商品">
<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"
>
<IconifyIcon icon="ep:plus" class="text-xl text-gray-400" />

View File

@@ -111,6 +111,7 @@ function emitActivityChange() {
>
<ElTooltip :content="activity.name">
<div class="relative h-full w-full">
<!-- TODO @芋艿 -->
<ElImage
:src="activity.picUrl"
class="h-full w-full rounded-lg object-cover"
@@ -131,7 +132,7 @@ function emitActivityChange() {
<!-- 添加活动按钮 -->
<ElTooltip v-if="canAdd" content="选择活动">
<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"
>
<IconifyIcon icon="ep:plus" class="text-xl text-gray-400" />

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

@@ -139,13 +139,13 @@ async function getUserData() {
</script>
<template>
<div class="bg-background flex h-full flex-auto flex-col">
<div class="flex h-full flex-auto flex-col bg-background">
<div
class="mt-4 flex h-12 items-center justify-around before:absolute before:bottom-0 before:left-0 before:h-1 before:w-full before:scale-y-[0.3] before:bg-gray-200 before:content-['']"
>
<div
:class="{
'before:border-primary before:border-b-2': tabActivation('会员信息'),
'before:border-b-2 before:border-primary': tabActivation('会员信息'),
}"
class="relative flex w-full cursor-pointer items-center justify-center before:pointer-events-none before:absolute before:inset-0 before:content-[''] hover:before:border-b-2 hover:before:border-gray-500/50"
@click="handleClick('会员信息')"
@@ -154,7 +154,7 @@ async function getUserData() {
</div>
<div
:class="{
'before:border-primary before:border-b-2': tabActivation('最近浏览'),
'before:border-b-2 before:border-primary': tabActivation('最近浏览'),
}"
class="relative flex w-full cursor-pointer items-center justify-center before:pointer-events-none before:absolute before:inset-0 before:content-[''] hover:before:border-b-2 hover:before:border-gray-500/50"
@click="handleClick('最近浏览')"
@@ -163,7 +163,7 @@ async function getUserData() {
</div>
<div
:class="{
'before:border-primary before:border-b-2': tabActivation('交易订单'),
'before:border-b-2 before:border-primary': tabActivation('交易订单'),
}"
class="relative flex w-full cursor-pointer items-center justify-center before:pointer-events-none before:absolute before:inset-0 before:content-[''] hover:before:border-b-2 hover:before:border-gray-500/50"
@click="handleClick('交易订单')"

View File

@@ -97,7 +97,7 @@ function pushMessage(message: any) {
/** 按照时间倒序,获取消息列表 */
const getMessageList0 = computed(() => {
// 使用展开运算符创建新数组,避免直接修改原数组
return [...messageList.value].sort(
return [...messageList.value].toSorted(
(a: any, b: any) => a.createTime - b.createTime,
);
});
@@ -267,7 +267,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">
@@ -423,7 +423,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">
<ElEmpty 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

@@ -132,7 +132,7 @@ function emitActivityChange() {
<!-- 添加活动按钮 -->
<ElTooltip v-if="canAdd" content="选择活动">
<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"
>
<IconifyIcon icon="ep:plus" class="text-xl text-gray-400" />

View File

@@ -110,6 +110,7 @@ function emitActivityChange() {
>
<ElTooltip :content="activity.name">
<div class="relative h-full w-full">
<!-- TODO @芋艿 -->
<ElImage
:src="activity.picUrl"
class="h-full w-full rounded-lg object-cover"
@@ -130,7 +131,7 @@ function emitActivityChange() {
<!-- 添加活动按钮 -->
<ElTooltip v-if="canAdd" content="选择活动">
<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"
>
<IconifyIcon icon="lucide:plus" class="text-xl text-gray-400" />