fix: antd lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export {default as HttpConfigForm} from './http-config-form.vue';
|
||||
export {default as KafkaMqConfigForm} from './kafka-mq-config-form.vue';
|
||||
export {default as MqttConfigForm} from './mqtt-config-form.vue';
|
||||
export {default as RabbitMqConfigForm} from './rabbit-mq-config-form.vue';
|
||||
export {default as RedisStreamConfigForm} from './redis-stream-config-form.vue';
|
||||
export {default as RocketMqConfigForm} from './rocket-mq-config-form.vue';
|
||||
export { default as HttpConfigForm } from './http-config-form.vue';
|
||||
export { default as KafkaMqConfigForm } from './kafka-mq-config-form.vue';
|
||||
export { default as MqttConfigForm } from './mqtt-config-form.vue';
|
||||
export { default as RabbitMqConfigForm } from './rabbit-mq-config-form.vue';
|
||||
export { default as RedisStreamConfigForm } from './redis-stream-config-form.vue';
|
||||
export { default as RocketMqConfigForm } from './rocket-mq-config-form.vue';
|
||||
|
||||
@@ -225,7 +225,7 @@ watch(
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
class="w-full"
|
||||
/>
|
||||
<div v-else class="text-secondary text-sm">无需设置时间值</div>
|
||||
<div v-else class="text-sm text-secondary">无需设置时间值</div>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
|
||||
@@ -365,10 +365,10 @@ function handlePropertyChange(propertyInfo: any) {
|
||||
|
||||
<!-- 其他触发类型的提示 -->
|
||||
<div v-else class="py-5 text-center">
|
||||
<p class="text-secondary mb-1 text-sm">
|
||||
<p class="mb-1 text-sm text-secondary">
|
||||
当前触发事件类型:{{ getTriggerTypeLabel(triggerType) }}
|
||||
</p>
|
||||
<p class="text-secondary text-xs">此触发类型暂不需要配置额外条件</p>
|
||||
<p class="text-xs text-secondary">此触发类型暂不需要配置额外条件</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -108,18 +108,18 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
||||
>
|
||||
<!-- 条件配置 -->
|
||||
<div
|
||||
class="rounded-3px border-border bg-fill-color-blank border shadow-sm"
|
||||
class="rounded-3px bg-fill-color-blank border border-border shadow-sm"
|
||||
>
|
||||
<div
|
||||
class="rounded-t-1 border-border bg-fill-color-blank flex items-center justify-between border-b p-3"
|
||||
class="rounded-t-1 bg-fill-color-blank flex items-center justify-between border-b border-border p-3"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<div
|
||||
class="bg-primary flex size-5 items-center justify-center rounded-full text-xs font-bold text-white"
|
||||
class="flex size-5 items-center justify-center rounded-full bg-primary text-xs font-bold text-white"
|
||||
>
|
||||
{{ conditionIndex + 1 }}
|
||||
</div>
|
||||
<span class="text-primary text-base font-bold">
|
||||
<span class="text-base font-bold text-primary">
|
||||
条件 {{ conditionIndex + 1 }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
||||
<IconifyIcon icon="lucide:plus" />
|
||||
继续添加条件
|
||||
</Button>
|
||||
<span class="text-secondary mt-2 block text-xs">
|
||||
<span class="mt-2 block text-xs text-secondary">
|
||||
最多可添加 {{ maxConditions }} 个条件
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -451,8 +451,8 @@ watch(
|
||||
<!-- 弹出层内容 -->
|
||||
<div class="json-params-detail-content">
|
||||
<div class="mb-4 flex items-center gap-2">
|
||||
<IconifyIcon :icon="titleIcon" class="text-primary text-lg" />
|
||||
<span class="text-primary text-base font-bold">
|
||||
<IconifyIcon :icon="titleIcon" class="text-lg text-primary" />
|
||||
<span class="text-base font-bold text-primary">
|
||||
{{ title }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -463,9 +463,9 @@ watch(
|
||||
<div class="mb-2 flex items-center gap-2">
|
||||
<IconifyIcon
|
||||
:icon="paramsIcon"
|
||||
class="text-primary text-base"
|
||||
class="text-base text-primary"
|
||||
/>
|
||||
<span class="text-primary text-base font-bold">
|
||||
<span class="text-base font-bold text-primary">
|
||||
{{ paramsLabel }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -473,10 +473,10 @@ watch(
|
||||
<div
|
||||
v-for="param in paramsList"
|
||||
:key="param.identifier"
|
||||
class="bg-card flex items-center justify-between rounded-lg p-2"
|
||||
class="flex items-center justify-between rounded-lg bg-card p-2"
|
||||
>
|
||||
<div class="flex-1">
|
||||
<div class="text-primary text-base font-bold">
|
||||
<div class="text-base font-bold text-primary">
|
||||
{{ param.name }}
|
||||
<Tag
|
||||
v-if="param.required"
|
||||
@@ -487,7 +487,7 @@ watch(
|
||||
{{ JSON_PARAMS_INPUT_CONSTANTS.REQUIRED_TAG }}
|
||||
</Tag>
|
||||
</div>
|
||||
<div class="text-secondary text-xs">
|
||||
<div class="text-xs text-secondary">
|
||||
{{ param.identifier }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -495,7 +495,7 @@ watch(
|
||||
<Tag :type="getParamTypeTag(param.dataType)" size="small">
|
||||
{{ getParamTypeName(param.dataType) }}
|
||||
</Tag>
|
||||
<span class="text-secondary text-xs">
|
||||
<span class="text-xs text-secondary">
|
||||
{{ getExampleValue(param) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -503,11 +503,11 @@ watch(
|
||||
</div>
|
||||
|
||||
<div class="ml-6 mt-3">
|
||||
<div class="text-secondary mb-1 text-xs">
|
||||
<div class="mb-1 text-xs text-secondary">
|
||||
{{ JSON_PARAMS_INPUT_CONSTANTS.COMPLETE_JSON_FORMAT }}
|
||||
</div>
|
||||
<pre
|
||||
class="bg-card border-l-3px border-primary text-primary overflow-x-auto rounded-lg p-3 text-sm"
|
||||
class="border-l-3px overflow-x-auto rounded-lg border-primary bg-card p-3 text-sm text-primary"
|
||||
>
|
||||
<code>{{ generateExampleJson() }}</code>
|
||||
</pre>
|
||||
@@ -517,7 +517,7 @@ watch(
|
||||
<!-- 无参数提示 -->
|
||||
<div v-else>
|
||||
<div class="py-4 text-center">
|
||||
<p class="text-secondary text-sm">
|
||||
<p class="text-sm text-secondary">
|
||||
{{ emptyMessage }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -550,7 +550,7 @@ watch(
|
||||
|
||||
<!-- 快速填充按钮 -->
|
||||
<div v-if="paramsList.length > 0" class="flex items-center gap-2">
|
||||
<span class="text-secondary text-xs">
|
||||
<span class="text-xs text-secondary">
|
||||
{{ JSON_PARAMS_INPUT_CONSTANTS.QUICK_FILL_LABEL }}
|
||||
</span>
|
||||
<Button size="small" type="primary" plain @click="fillExampleJson">
|
||||
|
||||
@@ -196,7 +196,7 @@ watch(
|
||||
class="min-w-0 flex-1"
|
||||
style="width: auto !important"
|
||||
/>
|
||||
<span class="text-secondary whitespace-nowrap text-xs"> 至 </span>
|
||||
<span class="whitespace-nowrap text-xs text-secondary"> 至 </span>
|
||||
<Input
|
||||
v-model="rangeEnd"
|
||||
:type="getInputType()"
|
||||
@@ -231,7 +231,7 @@ watch(
|
||||
v-if="listPreview.length > 0"
|
||||
class="mt-2 flex flex-wrap items-center gap-1"
|
||||
>
|
||||
<span class="text-secondary text-xs"> 解析结果: </span>
|
||||
<span class="text-xs text-secondary"> 解析结果: </span>
|
||||
<Tag
|
||||
v-for="(item, index) in listPreview"
|
||||
:key="index"
|
||||
@@ -282,7 +282,7 @@ watch(
|
||||
:content="`单位:${propertyConfig.unit}`"
|
||||
placement="top"
|
||||
>
|
||||
<span class="text-secondary px-1 text-xs">
|
||||
<span class="px-1 text-xs text-secondary">
|
||||
{{ propertyConfig.unit }}
|
||||
</span>
|
||||
</Tooltip>
|
||||
|
||||
@@ -153,7 +153,7 @@ function onActionTypeChange(action: Action, type: any) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card class="border-primary rounded-lg border" shadow="never">
|
||||
<Card class="rounded-lg border border-primary" shadow="never">
|
||||
<template #title>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="gap-8px flex items-center">
|
||||
@@ -275,14 +275,14 @@ function onActionTypeChange(action: Action, type: any) {
|
||||
action.type ===
|
||||
IotRuleSceneActionTypeEnum.ALERT_TRIGGER.toString()
|
||||
"
|
||||
class="border-border bg-fill-color-blank rounded-lg border p-4"
|
||||
class="bg-fill-color-blank rounded-lg border border-border p-4"
|
||||
>
|
||||
<div class="mb-2 flex items-center gap-2">
|
||||
<IconifyIcon icon="ep:warning" class="text-warning text-base" />
|
||||
<span class="font-600 text-primary text-sm">触发告警</span>
|
||||
<IconifyIcon icon="ep:warning" class="text-base text-warning" />
|
||||
<span class="font-600 text-sm text-primary">触发告警</span>
|
||||
<Tag size="small" type="warning">自动执行</Tag>
|
||||
</div>
|
||||
<div class="text-secondary text-xs leading-relaxed">
|
||||
<div class="text-xs leading-relaxed text-secondary">
|
||||
当触发条件满足时,系统将自动发送告警通知,可在菜单 [告警中心 ->
|
||||
告警配置] 管理。
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,8 @@ import { IconifyIcon } from '@vben/icons';
|
||||
|
||||
import { useVModel } from '@vueuse/core';
|
||||
import { Card, Col, Form, Input, Radio, Row } from 'ant-design-vue';
|
||||
import { DictTag } from "#/components/dict-tag";
|
||||
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
||||
/** 基础信息配置组件 */
|
||||
defineOptions({ name: 'BasicInfoSection' });
|
||||
@@ -26,7 +27,7 @@ const formData = useVModel(props, 'modelValue', emit); // 表单数据
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card class="rounded-8px mb-10px border-primary border" shadow="never">
|
||||
<Card class="rounded-8px mb-10px border border-primary" shadow="never">
|
||||
<template #title>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="gap-8px flex items-center">
|
||||
|
||||
@@ -118,7 +118,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card class="rounded-8px mb-10px border-primary border" shadow="never">
|
||||
<Card class="rounded-8px mb-10px border border-primary" shadow="never">
|
||||
<template #title>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="gap-8px flex items-center">
|
||||
@@ -201,7 +201,7 @@ onMounted(() => {
|
||||
class="gap-16px flex flex-col"
|
||||
>
|
||||
<div
|
||||
class="gap-8px p-12px px-16px rounded-6px border-primary bg-background flex items-center border"
|
||||
class="gap-8px p-12px px-16px rounded-6px flex items-center border border-primary bg-background"
|
||||
>
|
||||
<IconifyIcon
|
||||
icon="lucide:timer"
|
||||
@@ -214,7 +214,7 @@ onMounted(() => {
|
||||
|
||||
<!-- CRON 表达式配置 -->
|
||||
<div
|
||||
class="p-16px rounded-6px border-primary bg-background border"
|
||||
class="p-16px rounded-6px border border-primary bg-background"
|
||||
>
|
||||
<Form.Item label="CRON表达式" required>
|
||||
<CronTab
|
||||
|
||||
@@ -256,7 +256,7 @@ watch(
|
||||
{{ operator.label }}
|
||||
</div>
|
||||
<div
|
||||
class="text-12px px-6px py-2px rounded-4px bg-primary-light-9 text-primary font-mono"
|
||||
class="text-12px px-6px py-2px rounded-4px bg-primary-light-9 font-mono text-primary"
|
||||
>
|
||||
{{ operator.symbol }}
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||
import { Select } from 'ant-design-vue';
|
||||
|
||||
import { getSimpleProductList } from '#/api/iot/product/product';
|
||||
import { DictTag } from "#/components/dict-tag";
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
||||
/** 产品选择器组件 */
|
||||
defineOptions({ name: 'ProductSelector' });
|
||||
@@ -78,7 +78,7 @@ onMounted(() => {
|
||||
{{ product.productKey }}
|
||||
</div>
|
||||
</div>
|
||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="product.status" />
|
||||
<DictTag :type="DICT_TYPE.COMMON_STATUS" :value="product.status" />
|
||||
</div>
|
||||
</Select.Option>
|
||||
</Select>
|
||||
|
||||
@@ -41,6 +41,7 @@ const emit = defineEmits<{
|
||||
(e: 'change', value: { config: any; type: string }): void;
|
||||
}>();
|
||||
|
||||
// TODO 芋艿
|
||||
/** 属性选择器内部使用的统一数据结构 */
|
||||
interface PropertySelectorItem {
|
||||
identifier: string;
|
||||
@@ -296,7 +297,7 @@ watch(
|
||||
:value="property.identifier"
|
||||
>
|
||||
<div class="py-2px flex w-full items-center justify-between">
|
||||
<span class="text-14px font-500 text-primary flex-1 truncate">
|
||||
<span class="text-14px font-500 flex-1 truncate text-primary">
|
||||
{{ property.name }}
|
||||
</span>
|
||||
<Tag
|
||||
@@ -351,10 +352,10 @@ watch(
|
||||
|
||||
<div class="space-y-8px ml-24px">
|
||||
<div class="gap-8px flex items-start">
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
标识符:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ selectedProperty.identifier }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -363,28 +364,28 @@ watch(
|
||||
v-if="selectedProperty.description"
|
||||
class="gap-8px flex items-start"
|
||||
>
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
描述:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ selectedProperty.description }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedProperty.unit" class="gap-8px flex items-start">
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
单位:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ selectedProperty.unit }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedProperty.range" class="gap-8px flex items-start">
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
取值范围:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ selectedProperty.range }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -397,10 +398,10 @@ watch(
|
||||
"
|
||||
class="gap-8px flex items-start"
|
||||
>
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
访问模式:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ getAccessModeLabel(selectedProperty.accessMode) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -412,10 +413,10 @@ watch(
|
||||
"
|
||||
class="gap-8px flex items-start"
|
||||
>
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
事件类型:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ getEventTypeLabel(selectedProperty.eventType) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -427,10 +428,10 @@ watch(
|
||||
"
|
||||
class="gap-8px flex items-start"
|
||||
>
|
||||
<span class="text-12px min-w-60px text-secondary flex-shrink-0">
|
||||
<span class="text-12px min-w-60px flex-shrink-0 text-secondary">
|
||||
调用类型:
|
||||
</span>
|
||||
<span class="text-12px text-primary flex-1">
|
||||
<span class="text-12px flex-1 text-primary">
|
||||
{{ getThingModelServiceCallTypeLabel(selectedProperty.callType) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user