Merge pull request #223 from DevDengChao/codex/lint-iot-ai

chore: fix ai and iot lint
pull/881/head
芋道源码 2026-05-23 22:06:03 +08:00 committed by GitHub
commit 31a7f6248a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 152 additions and 131 deletions

View File

@ -60,12 +60,12 @@
class="py-0.5 px-2.5" class="py-0.5 px-2.5"
style=" style="
max-width: 220px; max-width: 220px;
overflow: hidden;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: var(--el-text-color-regular); color: var(--el-text-color-regular);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap;
" "
> >
{{ conversation.title }} {{ conversation.title }}
@ -103,9 +103,9 @@
<div <div
class="absolute bottom-0 left-0 right-0 px-5 leading-8.75 flex justify-between items-center" class="absolute bottom-0 left-0 right-0 px-5 leading-8.75 flex justify-between items-center"
style=" style="
color: var(--el-text-color);
background-color: var(--el-fill-color-extra-light); background-color: var(--el-fill-color-extra-light);
box-shadow: 0 0 1px 1px var(--el-border-color-lighter); box-shadow: 0 0 1px 1px var(--el-border-color-lighter);
color: var(--el-text-color);
" "
> >
<div <div

View File

@ -53,10 +53,10 @@
<Icon :icon="getFileIcon(file.name)" class="text-blue-500 mr-2 flex-shrink-0" /> <Icon :icon="getFileIcon(file.name)" class="text-blue-500 mr-2 flex-shrink-0" />
<span <span
class="font-medium text-gray-900 mr-1 overflow-hidden text-ellipsis whitespace-nowrap flex-1" class="font-medium text-gray-900 mr-1 overflow-hidden text-ellipsis whitespace-nowrap flex-1"
>{{ file.name }}</span >{{ file.name }}</span
> >
<span class="text-gray-500 flex-shrink-0 text-11px" <span class="text-gray-500 flex-shrink-0 text-11px"
>({{ formatFileSize(file.size) }})</span >({{ formatFileSize(file.size) }})</span
> >
</div> </div>
<div class="flex items-center gap-1 flex-shrink-0 ml-2"> <div class="flex items-center gap-1 flex-shrink-0 ml-2">
@ -286,27 +286,29 @@ onUnmounted(() => {
--el-button-border-color: transparent; --el-button-border-color: transparent;
--el-button-hover-bg-color: var(--el-fill-color-light); --el-button-hover-bg-color: var(--el-fill-color-light);
--el-button-hover-border-color: transparent; --el-button-hover-border-color: transparent;
color: var(--el-text-color-regular); color: var(--el-text-color-regular);
} }
.upload-btn.has-files { .upload-btn.has-files {
color: var(--el-color-primary);
--el-button-hover-bg-color: var(--el-color-primary-light-9); --el-button-hover-bg-color: var(--el-color-primary-light-9);
color: var(--el-color-primary);
} }
.file-tooltip { .file-tooltip {
position: absolute; position: absolute;
bottom: calc(100% + 8px); bottom: calc(100% + 8px);
left: 50%; left: 50%;
transform: translateX(-50%); z-index: 1000;
max-width: 320px;
min-width: 240px;
padding: 8px;
background: white; background: white;
border: 1px solid var(--el-border-color-light); border: 1px solid var(--el-border-color-light);
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transform: translateX(-50%);
z-index: 1000; box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
min-width: 240px;
max-width: 320px;
padding: 8px;
animation: fadeInDown 0.2s ease; animation: fadeInDown 0.2s ease;
} }
@ -314,25 +316,25 @@ onUnmounted(() => {
position: absolute; position: absolute;
bottom: -5px; bottom: -5px;
left: 50%; left: 50%;
transform: translateX(-50%);
width: 0; width: 0;
height: 0; height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid var(--el-border-color-light); border-top: 5px solid var(--el-border-color-light);
border-right: 5px solid transparent;
border-left: 5px solid transparent;
transform: translateX(-50%);
} }
/* Tooltip 箭头伪元素 */ /* Tooltip 箭头伪元素 */
.tooltip-arrow::after { .tooltip-arrow::after {
content: '';
position: absolute; position: absolute;
bottom: 1px; bottom: 1px;
left: -4px; left: -4px;
width: 0; width: 0;
height: 0; height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid white; border-top: 4px solid white;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: '';
} }
@keyframes fadeInDown { @keyframes fadeInDown {
@ -340,6 +342,7 @@ onUnmounted(() => {
opacity: 0; opacity: 0;
transform: translateX(-50%) translateY(4px); transform: translateX(-50%) translateY(4px);
} }
to { to {
opacity: 1; opacity: 1;
transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0);
@ -351,6 +354,7 @@ onUnmounted(() => {
opacity: 0; opacity: 0;
transform: translateX(-50%) translateY(4px); transform: translateX(-50%) translateY(4px);
} }
to { to {
opacity: 1; opacity: 1;
transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0);
@ -374,6 +378,7 @@ onUnmounted(() => {
.file-list::-webkit-scrollbar-thumb:hover { .file-list::-webkit-scrollbar-thumb:hover {
background: var(--el-border-color); background: var(--el-border-color);
} }
/* 滚动条样式 */ /* 滚动条样式 */
.file-list::-webkit-scrollbar { .file-list::-webkit-scrollbar {
width: 4px; width: 4px;

View File

@ -79,11 +79,11 @@ const toggleExpanded = () => {
} }
.max-h-300px::-webkit-scrollbar-thumb { .max-h-300px::-webkit-scrollbar-thumb {
background: rgba(156, 163, 175, 0.4); background: rgb(156 163 175 / 40%);
border-radius: 2px; border-radius: 2px;
} }
.max-h-300px::-webkit-scrollbar-thumb:hover { .max-h-300px::-webkit-scrollbar-thumb:hover {
background: rgba(156, 163, 175, 0.6); background: rgb(156 163 175 / 60%);
} }
</style> </style>

View File

@ -228,8 +228,8 @@ onMounted(async () => {
} }
.el-tabs__header { .el-tabs__header {
margin: 0 !important;
padding: 0 !important; padding: 0 !important;
margin: 0 !important;
} }
.el-tabs__nav-wrap { .el-tabs__nav-wrap {
@ -241,6 +241,6 @@ onMounted(async () => {
} }
.el-tab-pane { .el-tab-pane {
padding: 8px 0 0 0 !important; padding: 8px 0 0 !important;
} }
</style> </style>

View File

@ -57,16 +57,16 @@
class="content-expand" class="content-expand"
style=" style="
padding: 10px 20px; padding: 10px 20px;
white-space: pre-wrap;
line-height: 1.5; line-height: 1.5;
white-space: pre-wrap;
background-color: #f9f9f9; background-color: #f9f9f9;
border-radius: 4px;
border-left: 3px solid #409eff; border-left: 3px solid #409eff;
border-radius: 4px;
" "
> >
<div <div
class="content-title" class="content-title"
style="margin-bottom: 8px; color: #606266; font-size: 14px; font-weight: bold" style="margin-bottom: 8px; font-size: 14px; font-weight: bold; color: #606266"
> >
完整内容 完整内容
</div> </div>

View File

@ -143,11 +143,12 @@ defineExpose({
flex-direction: column; flex-direction: column;
:deep(.el-card__body) { :deep(.el-card__body) {
@extend .hide-scroll-bar;
padding: 0;
overflow-y: auto;
box-sizing: border-box; box-sizing: border-box;
flex-grow: 1; flex-grow: 1;
overflow-y: auto;
padding: 0;
@extend .hide-scroll-bar;
} }
} }

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="flex h-full items-stretch"> <div class="flex h-full items-stretch">
<!-- 模式 --> <!-- 模式 -->
<Mode class="flex-none" @generate-music="generateMusic"/> <Mode class="flex-none" @generate-music="generateMusic" />
<!-- 音频列表 --> <!-- 音频列表 -->
<List ref="listRef" class="flex-auto"/> <List ref="listRef" class="flex-auto" />
</div> </div>
</template> </template>

View File

@ -2,33 +2,33 @@
<div class="flex items-center justify-between px-2 h-72px bg-[var(--el-bg-color-overlay)] b-solid b-1 b-[var(--el-border-color)] b-l-none"> <div class="flex items-center justify-between px-2 h-72px bg-[var(--el-bg-color-overlay)] b-solid b-1 b-[var(--el-border-color)] b-l-none">
<!-- 歌曲信息 --> <!-- 歌曲信息 -->
<div class="flex gap-[10px]"> <div class="flex gap-[10px]">
<el-image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" class="w-[45px]"/> <el-image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" class="w-[45px]" />
<div> <div>
<div>{{currentSong.name}}</div> <div>{{ currentSong.name }}</div>
<div class="text-[12px] text-gray-400">{{currentSong.singer}}</div> <div class="text-[12px] text-gray-400">{{ currentSong.singer }}</div>
</div> </div>
</div> </div>
<!-- 音频controls --> <!-- 音频controls -->
<div class="flex gap-[12px] items-center"> <div class="flex gap-[12px] items-center">
<Icon icon="majesticons:back-circle" :size="20" class="text-gray-300 cursor-pointer"/> <Icon icon="majesticons:back-circle" :size="20" class="text-gray-300 cursor-pointer" />
<Icon :icon="audioProps.paused ? 'mdi:arrow-right-drop-circle' : 'solar:pause-circle-bold'" :size="30" class=" cursor-pointer" @click="toggleStatus('paused')"/> <Icon :icon="audioProps.paused ? 'mdi:arrow-right-drop-circle' : 'solar:pause-circle-bold'" :size="30" class=" cursor-pointer" @click="toggleStatus('paused')" />
<Icon icon="majesticons:next-circle" :size="20" class="text-gray-300 cursor-pointer"/> <Icon icon="majesticons:next-circle" :size="20" class="text-gray-300 cursor-pointer" />
<div class="flex gap-[16px] items-center"> <div class="flex gap-[16px] items-center">
<span>{{audioProps.currentTime}}</span> <span>{{ audioProps.currentTime }}</span>
<el-slider v-model="audioProps.duration" color="#409eff" class="w-[160px!important] "/> <el-slider v-model="audioProps.duration" color="#409eff" class="w-[160px!important] " />
<span>{{ audioProps.duration }}</span> <span>{{ audioProps.duration }}</span>
</div> </div>
<!-- 音频 --> <!-- 音频 -->
<audio v-bind="audioProps" ref="audioRef" controls v-show="!audioProps" @timeupdate="audioTimeUpdate"> <audio v-bind="audioProps" ref="audioRef" controls v-show="!audioProps" @timeupdate="audioTimeUpdate">
<source :src="audioUrl"/> <source :src="audioUrl" />
</audio> </audio>
</div> </div>
<!-- 音量控制器 --> <!-- 音量控制器 -->
<div class="flex gap-[16px] items-center"> <div class="flex gap-[16px] items-center">
<Icon :icon="audioProps.muted ? 'tabler:volume-off' : 'tabler:volume'" :size="20" class="cursor-pointer" @click="toggleStatus('muted')"/> <Icon :icon="audioProps.muted ? 'tabler:volume-off' : 'tabler:volume'" :size="20" class="cursor-pointer" @click="toggleStatus('muted')" />
<el-slider v-model="audioProps.volume" color="#409eff" class="w-[160px!important] "/> <el-slider v-model="audioProps.volume" color="#409eff" class="w-[160px!important] " />
</div> </div>
</div> </div>
</template> </template>

View File

@ -6,26 +6,26 @@
<el-tab-pane v-loading="loading" label="我的创作" name="mine"> <el-tab-pane v-loading="loading" label="我的创作" name="mine">
<el-row v-if="mySongList.length" :gutter="12"> <el-row v-if="mySongList.length" :gutter="12">
<el-col v-for="song in mySongList" :key="song.id" :span="24"> <el-col v-for="song in mySongList" :key="song.id" :span="24">
<songCard :songInfo="song" @play="setCurrentSong(song)"/> <songCard :songInfo="song" @play="setCurrentSong(song)" />
</el-col> </el-col>
</el-row> </el-row>
<el-empty v-else description="暂无音乐"/> <el-empty v-else description="暂无音乐" />
</el-tab-pane> </el-tab-pane>
<!-- 试听广场 --> <!-- 试听广场 -->
<el-tab-pane v-loading="loading" label="试听广场" name="square"> <el-tab-pane v-loading="loading" label="试听广场" name="square">
<el-row v-if="squareSongList.length" v-loading="loading" :gutter="12"> <el-row v-if="squareSongList.length" v-loading="loading" :gutter="12">
<el-col v-for="song in squareSongList" :key="song.id" :span="24"> <el-col v-for="song in squareSongList" :key="song.id" :span="24">
<songCard :songInfo="song" @play="setCurrentSong(song)"/> <songCard :songInfo="song" @play="setCurrentSong(song)" />
</el-col> </el-col>
</el-row> </el-row>
<el-empty v-else description="暂无音乐"/> <el-empty v-else description="暂无音乐" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- songInfo --> <!-- songInfo -->
<songInfo class="flex-none"/> <songInfo class="flex-none" />
</div> </div>
<audioBar class="flex-none"/> <audioBar class="flex-none" />
</div> </div>
</template> </template>
@ -100,6 +100,7 @@ defineExpose({
:deep(.el-tabs) { :deep(.el-tabs) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.el-tabs__content { .el-tabs__content {
padding: 0 7px; padding: 0 7px;
overflow: auto; overflow: auto;

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="flex bg-[var(--el-bg-color-overlay)] p-12px mb-12px rounded-1"> <div class="flex bg-[var(--el-bg-color-overlay)] p-12px mb-12px rounded-1">
<div class="relative" @click="playSong"> <div class="relative" @click="playSong">
<el-image :src="songInfo.imageUrl" class="flex-none w-80px"/> <el-image :src="songInfo.imageUrl" class="flex-none w-80px" />
<div class="bg-black bg-op-40 absolute top-0 left-0 w-full h-full flex items-center justify-center cursor-pointer"> <div class="bg-black bg-op-40 absolute top-0 left-0 w-full h-full flex items-center justify-center cursor-pointer">
<Icon :icon="currentSong.id === songInfo.id ? 'solar:pause-circle-bold':'mdi:arrow-right-drop-circle'" :size="30" /> <Icon :icon="currentSong.id === songInfo.id ? 'solar:pause-circle-bold':'mdi:arrow-right-drop-circle'" :size="30" />
</div> </div>
</div> </div>
<div class="ml-8px"> <div class="ml-8px">

View File

@ -1,6 +1,6 @@
<template> <template>
<ContentWrap class="w-300px mb-[0!important] line-height-24px"> <ContentWrap class="w-300px mb-[0!important] line-height-24px">
<el-image :src="currentSong.imageUrl"/> <el-image :src="currentSong.imageUrl" />
<div class="">{{ currentSong.title }}</div> <div class="">{{ currentSong.title }}</div>
<div class="text-[var(--el-text-color-secondary)] text-12px line-clamp-1"> <div class="text-[var(--el-text-color-secondary)] text-12px line-clamp-1">
{{ currentSong.desc }} {{ currentSong.desc }}

View File

@ -14,7 +14,7 @@
<Title title="纯音乐" desc="创建一首没有歌词的歌曲"> <Title title="纯音乐" desc="创建一首没有歌词的歌曲">
<template #extra> <template #extra>
<el-switch v-model="formData.pure" size="small"/> <el-switch v-model="formData.pure" size="small" />
</template> </template>
</Title> </Title>

View File

@ -14,7 +14,7 @@
<Title title="音乐风格"> <Title title="音乐风格">
<el-space class="flex-wrap"> <el-space class="flex-wrap">
<el-tag v-for="tag in tags" :key="tag" round class="mb-8px">{{tag}}</el-tag> <el-tag v-for="tag in tags" :key="tag" round class="mb-8px">{{ tag }}</el-tag>
</el-space> </el-space>
<el-button <el-button
@ -40,7 +40,7 @@
</Title> </Title>
<Title title="音乐/歌曲名称"> <Title title="音乐/歌曲名称">
<el-input v-model="formData.name" placeholder="请输入音乐/歌曲名称"/> <el-input v-model="formData.name" placeholder="请输入音乐/歌曲名称" />
</Title> </Title>
<Title title="版本"> <Title title="版本">

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="mb-12px"> <div class="mb-12px">
<div class="flex text-[var(--el-text-color-primary)] justify-between items-center"> <div class="flex text-[var(--el-text-color-primary)] justify-between items-center">
<span>{{title}}</span> <span>{{ title }}</span>
<slot name="extra"></slot> <slot name="extra"></slot>
</div> </div>
<div class="text-[var(--el-text-color-secondary)] text-12px my-8px"> <div class="text-[var(--el-text-color-secondary)] text-12px my-8px">
{{desc}} {{ desc }}
</div> </div>
<slot></slot> <slot></slot>
</div> </div>

View File

@ -48,7 +48,7 @@
<el-text type="danger">{{ error }}</el-text> <el-text type="danger">{{ error }}</el-text>
</div> </div>
<pre v-else-if="testResult" class="result-content" <pre v-else-if="testResult" class="result-content"
>{{ JSON.stringify(testResult, null, 2) }} >{{ JSON.stringify(testResult, null, 2) }}
</pre> </pre>
<div v-else> <el-text type="info">点击运行查看结果</el-text> </div> <div v-else> <el-text type="info">点击运行查看结果</el-text> </div>
</div> </div>
@ -237,14 +237,14 @@ defineExpose({
<style lang="css" scoped> <style lang="css" scoped>
.result-content { .result-content {
background: white;
padding: 12px;
border-radius: 4px;
max-height: 300px; max-height: 300px;
padding: 12px;
overflow: auto; overflow: auto;
font-family: Monaco, Consolas, monospace; font-family: Monaco, Consolas, monospace;
font-size: 14px; font-size: 14px;
line-height: 1.5; line-height: 1.5;
white-space: pre-wrap; white-space: pre-wrap;
background: white;
border-radius: 4px;
} }
</style> </style>

View File

@ -110,11 +110,12 @@ watch(copied, (val) => {
flex-direction: column; flex-direction: column;
:deep(.el-card__body) { :deep(.el-card__body) {
@extend .hide-scroll-bar;
padding: 0;
overflow-y: auto;
box-sizing: border-box; box-sizing: border-box;
flex-grow: 1; flex-grow: 1;
overflow-y: auto;
padding: 0;
@extend .hide-scroll-bar;
} }
} }
</style> </style>

View File

@ -16,7 +16,7 @@
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
tags: { label: string; value: string }[] tags?: { label: string; value: string }[]
modelValue: string modelValue: string
[k: string]: any [k: string]: any
}>(), }>(),

View File

@ -3,44 +3,44 @@
<div> <div>
<ContentWrap> <ContentWrap>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item label="产品名称">{{ product.name }}</el-descriptions-item> <el-descriptions-item label="产品名称">{{ product.name }}</el-descriptions-item>
<el-descriptions-item label="ProductKey">{{ product.productKey }}</el-descriptions-item> <el-descriptions-item label="ProductKey">{{ product.productKey }}</el-descriptions-item>
<el-descriptions-item label="设备类型"> <el-descriptions-item label="设备类型">
<dict-tag :type="DICT_TYPE.IOT_PRODUCT_DEVICE_TYPE" :value="product.deviceType" /> <dict-tag :type="DICT_TYPE.IOT_PRODUCT_DEVICE_TYPE" :value="product.deviceType" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="DeviceName">{{ device.deviceName }}</el-descriptions-item> <el-descriptions-item label="DeviceName">{{ device.deviceName }}</el-descriptions-item>
<el-descriptions-item label="备注名称">{{ device.nickname }}</el-descriptions-item> <el-descriptions-item label="备注名称">{{ device.nickname }}</el-descriptions-item>
<el-descriptions-item label="当前状态"> <el-descriptions-item label="当前状态">
<dict-tag :type="DICT_TYPE.IOT_DEVICE_STATE" :value="device.state" /> <dict-tag :type="DICT_TYPE.IOT_DEVICE_STATE" :value="device.state" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="创建时间"> <el-descriptions-item label="创建时间">
{{ formatDate(device.createTime) }} {{ formatDate(device.createTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="激活时间"> <el-descriptions-item label="激活时间">
{{ formatDate(device.activeTime) }} {{ formatDate(device.activeTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="最后上线时间"> <el-descriptions-item label="最后上线时间">
{{ formatDate(device.onlineTime) }} {{ formatDate(device.onlineTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="最后离线时间"> <el-descriptions-item label="最后离线时间">
{{ formatDate(device.offlineTime) }} {{ formatDate(device.offlineTime) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="设备位置"> <el-descriptions-item label="设备位置">
<template v-if="hasLocation"> <template v-if="hasLocation">
<span class="mr-2">{{ device.longitude }}, {{ device.latitude }}</span> <span class="mr-2">{{ device.longitude }}, {{ device.latitude }}</span>
<el-button type="primary" link @click="openMapDialog"> <el-button type="primary" link @click="openMapDialog">
<Icon icon="ep:location" class="mr-1" /> <Icon icon="ep:location" class="mr-1" />
查看地图 查看地图
</el-button>
</template>
<span v-else class="text-[var(--el-text-color-secondary)]">暂无位置信息</span>
</el-descriptions-item>
<el-descriptions-item label="认证信息">
<el-button type="primary" @click="handleAuthInfoDialogOpen" plain size="small">
查看
</el-button> </el-button>
</el-descriptions-item> </template>
</el-descriptions> <span v-else class="text-[var(--el-text-color-secondary)]">暂无位置信息</span>
</el-descriptions-item>
<el-descriptions-item label="认证信息">
<el-button type="primary" @click="handleAuthInfoDialogOpen" plain size="small">
查看
</el-button>
</el-descriptions-item>
</el-descriptions>
</ContentWrap> </ContentWrap>
<!-- 认证信息弹框 --> <!-- 认证信息弹框 -->

View File

@ -36,7 +36,9 @@
inline-prompt inline-prompt
active-text="定时刷新" active-text="定时刷新"
inactive-text="定时刷新" inactive-text="定时刷新"
style="--el-switch-on-color: #13ce66" style="
--el-switch-on-color: #13ce66"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -40,7 +40,9 @@
inline-prompt inline-prompt
active-text="定时刷新" active-text="定时刷新"
inactive-text="定时刷新" inactive-text="定时刷新"
style="--el-switch-on-color: #13ce66" style="
--el-switch-on-color: #13ce66"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -131,22 +131,22 @@ onMounted(() => {
.terminal-card { .terminal-card {
margin-top: 32px; margin-top: 32px;
margin-bottom: 8px; margin-bottom: 8px;
border-radius: 12px;
background-color: #1a1b26;
box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
border: 1px solid #24283b;
overflow: hidden; overflow: hidden;
font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, monospace; font-family: 'Fira Code', 'JetBrains Mono', Consolas, Monaco, monospace;
background-color: #1a1b26;
border: 1px solid #24283b;
border-radius: 12px;
box-shadow: 0 10px 30px -10px rgb(0 0 0 / 40%);
} }
.terminal-header { .terminal-header {
position: relative;
display: flex; display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px; padding: 12px 16px;
background-color: #24283b; background-color: #24283b;
border-bottom: 1px solid #16161e; border-bottom: 1px solid #16161e;
position: relative; align-items: center;
justify-content: space-between;
} }
.terminal-dots { .terminal-dots {
@ -160,53 +160,59 @@ onMounted(() => {
border-radius: 50%; border-radius: 50%;
transition: transform 0.2s ease; transition: transform 0.2s ease;
} }
.dot:hover { .dot:hover {
transform: scale(1.2); transform: scale(1.2);
} }
.dot.red { .dot.red {
background-color: #f7768e; background-color: #f7768e;
box-shadow: 0 0 5px rgba(247, 118, 142, 0.4); box-shadow: 0 0 5px rgb(247 118 142 / 40%);
} }
.dot.yellow { .dot.yellow {
background-color: #e0af68; background-color: #e0af68;
box-shadow: 0 0 5px rgba(224, 175, 104, 0.4); box-shadow: 0 0 5px rgb(224 175 104 / 40%);
} }
.dot.green { .dot.green {
background-color: #9ece6a; background-color: #9ece6a;
box-shadow: 0 0 5px rgba(158, 206, 106, 0.4); box-shadow: 0 0 5px rgb(158 206 106 / 40%);
} }
.terminal-title { .terminal-title {
color: #a9b1d6; position: absolute;
left: 50%;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 600;
letter-spacing: 0.8px; letter-spacing: 0.8px;
position: absolute; color: #a9b1d6;
left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.terminal-copy-btn { .terminal-copy-btn {
display: flex;
padding: 6px 12px;
font-family: inherit;
font-size: 12px;
color: #a9b1d6;
cursor: pointer;
background: transparent; background: transparent;
border: 1px solid #414868; border: 1px solid #414868;
color: #a9b1d6;
border-radius: 6px; border-radius: 6px;
padding: 6px 12px;
font-size: 12px;
cursor: pointer;
transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
font-family: inherit;
} }
.terminal-copy-btn:hover { .terminal-copy-btn:hover {
color: #1a1b26;
background: #bb9af7; background: #bb9af7;
border-color: #bb9af7; border-color: #bb9af7;
color: #1a1b26;
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(187, 154, 247, 0.3); box-shadow: 0 4px 12px rgb(187 154 247 / 30%);
} }
.terminal-copy-btn:active { .terminal-copy-btn:active {
transform: translateY(0); transform: translateY(0);
} }
@ -217,17 +223,17 @@ onMounted(() => {
.terminal-body { .terminal-body {
padding: 20px; padding: 20px;
color: #c0caf5;
font-size: 13px; font-size: 13px;
line-height: 1.6; line-height: 1.6;
color: #c0caf5;
} }
.terminal-desc { .terminal-desc {
color: #7dcfff; padding-bottom: 16px;
margin-bottom: 16px; margin-bottom: 16px;
font-family: var(--el-font-family); font-family: var(--el-font-family);
font-size: 13px; font-size: 13px;
padding-bottom: 16px; color: #7dcfff;
border-bottom: 1px dashed #292e42; border-bottom: 1px dashed #292e42;
} }
@ -237,9 +243,9 @@ onMounted(() => {
} }
.terminal-code { .terminal-code {
min-width: max-content;
margin: 0; margin: 0;
white-space: pre; white-space: pre;
min-width: max-content;
} }
.terminal-code code { .terminal-code code {
@ -267,13 +273,16 @@ onMounted(() => {
.terminal-code-wrapper::-webkit-scrollbar { .terminal-code-wrapper::-webkit-scrollbar {
height: 8px; height: 8px;
} }
.terminal-code-wrapper::-webkit-scrollbar-thumb { .terminal-code-wrapper::-webkit-scrollbar-thumb {
background: #414868; background: #414868;
border-radius: 4px; border-radius: 4px;
} }
.terminal-code-wrapper::-webkit-scrollbar-thumb:hover { .terminal-code-wrapper::-webkit-scrollbar-thumb:hover {
background: #565f89; background: #565f89;
} }
.terminal-code-wrapper::-webkit-scrollbar-track { .terminal-code-wrapper::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }

View File

@ -36,7 +36,7 @@
{{ conditionIndex + 1 }} {{ conditionIndex + 1 }}
</div> </div>
<span class="text-12px font-500 text-[var(--el-text-color-primary)]" <span class="text-12px font-500 text-[var(--el-text-color-primary)]"
>条件 {{ conditionIndex + 1 }}</span >条件 {{ conditionIndex + 1 }}</span
> >
</div> </div>
<el-button <el-button

View File

@ -75,7 +75,7 @@
> >
<Icon icon="ep:timer" class="text-[var(--el-color-danger)] text-18px" /> <Icon icon="ep:timer" class="text-[var(--el-color-danger)] text-18px" />
<span class="text-14px font-500 text-[var(--el-text-color-primary)]" <span class="text-14px font-500 text-[var(--el-text-color-primary)]"
>定时触发配置</span >定时触发配置</span
> >
</div> </div>

View File

@ -107,7 +107,7 @@
<div <div
v-if=" v-if="
selectedProperty.type === IoTThingModelTypeEnum.PROPERTY && selectedProperty.type === IoTThingModelTypeEnum.PROPERTY &&
selectedProperty.accessMode selectedProperty.accessMode
" "
class="flex items-start gap-8px" class="flex items-start gap-8px"
> >