feat: style
This commit is contained in:
@@ -246,7 +246,7 @@ watch(
|
|||||||
<Input
|
<Input
|
||||||
v-model:value="condition"
|
v-model:value="condition"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
style="width: calc(100% - 100px)"
|
class="w-[calc(100vw-25%)]"
|
||||||
:readonly="type !== 'duration' && type !== 'cycle'"
|
:readonly="type !== 'duration' && type !== 'cycle'"
|
||||||
@focus="handleInputFocus"
|
@focus="handleInputFocus"
|
||||||
@blur="updateNode"
|
@blur="updateNode"
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ function handleAuthInfoDialogClose() {
|
|||||||
style="width: calc(100% - 80px)"
|
style="width: calc(100% - 80px)"
|
||||||
/>
|
/>
|
||||||
<Button @click="copyToClipboard(authInfo.clientId)" type="primary">
|
<Button @click="copyToClipboard(authInfo.clientId)" type="primary">
|
||||||
<IconifyIcon icon="ph:copy" />
|
<IconifyIcon icon="lucide:copy" />
|
||||||
</Button>
|
</Button>
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -193,7 +193,7 @@ function handleAuthInfoDialogClose() {
|
|||||||
style="width: calc(100% - 80px)"
|
style="width: calc(100% - 80px)"
|
||||||
/>
|
/>
|
||||||
<Button @click="copyToClipboard(authInfo.username)" type="primary">
|
<Button @click="copyToClipboard(authInfo.username)" type="primary">
|
||||||
<IconifyIcon icon="ph:copy" />
|
<IconifyIcon icon="lucide:copy" />
|
||||||
</Button>
|
</Button>
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -210,11 +210,11 @@ function handleAuthInfoDialogClose() {
|
|||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
:icon="authPasswordVisible ? 'ph:eye-slash' : 'ph:eye'"
|
:icon="authPasswordVisible ? 'lucide:eye-off' : 'lucide:eye'"
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button @click="copyToClipboard(authInfo.password)" type="primary">
|
<Button @click="copyToClipboard(authInfo.password)" type="primary">
|
||||||
<IconifyIcon icon="ph:copy" />
|
<IconifyIcon icon="lucide:copy" />
|
||||||
</Button>
|
</Button>
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="gap-16px flex flex-col">
|
<div class="flex flex-col gap-4">
|
||||||
<Row :gutter="16">
|
<Row :gutter="16">
|
||||||
<!-- 时间操作符选择 -->
|
<!-- 时间操作符选择 -->
|
||||||
<Col :span="8">
|
<Col :span="8">
|
||||||
@@ -190,7 +190,7 @@ watch(
|
|||||||
:value="option.value"
|
:value="option.value"
|
||||||
>
|
>
|
||||||
<div class="flex w-full items-center justify-between">
|
<div class="flex w-full items-center justify-between">
|
||||||
<div class="gap-8px flex items-center">
|
<div class="flex items-center gap-2">
|
||||||
<IconifyIcon :icon="option.icon" :class="option.iconClass" />
|
<IconifyIcon :icon="option.icon" :class="option.iconClass" />
|
||||||
<span>{{ option.label }}</span>
|
<span>{{ option.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -225,9 +225,7 @@ watch(
|
|||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
/>
|
||||||
<div v-else class="text-14px text-[var(--el-text-color-placeholder)]">
|
<div v-else class="text-secondary text-sm">无需设置时间值</div>
|
||||||
无需设置时间值
|
|
||||||
</div>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ function handlePropertyChange(propertyInfo: any) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="space-y-16px">
|
<div class="space-y-4">
|
||||||
<!-- 触发事件类型选择 -->
|
<!-- 触发事件类型选择 -->
|
||||||
<Form.Item label="触发事件类型" required>
|
<Form.Item label="触发事件类型" required>
|
||||||
<Select
|
<Select
|
||||||
@@ -192,7 +192,7 @@ function handlePropertyChange(propertyInfo: any) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<!-- 设备属性条件配置 -->
|
<!-- 设备属性条件配置 -->
|
||||||
<div v-if="isDevicePropertyTrigger" class="space-y-16px">
|
<div v-if="isDevicePropertyTrigger" class="space-y-4">
|
||||||
<!-- 产品设备选择 -->
|
<!-- 产品设备选择 -->
|
||||||
<Row :gutter="16">
|
<Row :gutter="16">
|
||||||
<Col :span="12">
|
<Col :span="12">
|
||||||
@@ -292,7 +292,7 @@ function handlePropertyChange(propertyInfo: any) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 设备状态条件配置 -->
|
<!-- 设备状态条件配置 -->
|
||||||
<div v-else-if="isDeviceStatusTrigger" class="space-y-16px">
|
<div v-else-if="isDeviceStatusTrigger" class="space-y-4">
|
||||||
<!-- 设备状态触发器使用简化的配置 -->
|
<!-- 设备状态触发器使用简化的配置 -->
|
||||||
<Row :gutter="16">
|
<Row :gutter="16">
|
||||||
<Col :span="12">
|
<Col :span="12">
|
||||||
@@ -364,13 +364,11 @@ function handlePropertyChange(propertyInfo: any) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 其他触发类型的提示 -->
|
<!-- 其他触发类型的提示 -->
|
||||||
<div v-else class="py-20px text-center">
|
<div v-else class="py-5 text-center">
|
||||||
<p class="text-14px mb-4px text-[var(--el-text-color-secondary)]">
|
<p class="text-secondary mb-1 text-sm">
|
||||||
当前触发事件类型:{{ getTriggerTypeLabel(triggerType) }}
|
当前触发事件类型:{{ getTriggerTypeLabel(triggerType) }}
|
||||||
</p>
|
</p>
|
||||||
<p class="text-12px text-[var(--el-text-color-placeholder)]">
|
<p class="text-secondary text-xs">此触发类型暂不需要配置额外条件</p>
|
||||||
此触发类型暂不需要配置额外条件
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -83,27 +83,24 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-16px">
|
<div class="p-4">
|
||||||
<!-- 空状态 -->
|
<!-- 空状态 -->
|
||||||
<div v-if="!subGroup || subGroup.length === 0" class="py-24px text-center">
|
<div v-if="!subGroup || subGroup.length === 0" class="py-6 text-center">
|
||||||
<div class="gap-12px flex flex-col items-center">
|
<div class="flex flex-col items-center gap-3">
|
||||||
<IconifyIcon
|
<IconifyIcon icon="lucide:plus" class="text-8 text-secondary" />
|
||||||
icon="ep:plus"
|
<div class="text-secondary">
|
||||||
class="text-32px text-[var(--el-text-color-placeholder)]"
|
<p class="mb-1 text-base font-bold">暂无条件</p>
|
||||||
/>
|
<p class="text-xs">点击下方按钮添加第一个条件</p>
|
||||||
<div class="text-[var(--el-text-color-secondary)]">
|
|
||||||
<p class="text-14px font-500 mb-4px">暂无条件</p>
|
|
||||||
<p class="text-12px">点击下方按钮添加第一个条件</p>
|
|
||||||
</div>
|
</div>
|
||||||
<Button type="primary" @click="addCondition">
|
<Button type="primary" @click="addCondition">
|
||||||
<IconifyIcon icon="ep:plus" />
|
<IconifyIcon icon="lucide:plus" />
|
||||||
添加条件
|
添加条件
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 条件列表 -->
|
<!-- 条件列表 -->
|
||||||
<div v-else class="space-y-16px">
|
<div v-else class="space-y-4">
|
||||||
<div
|
<div
|
||||||
v-for="(condition, conditionIndex) in subGroup"
|
v-for="(condition, conditionIndex) in subGroup"
|
||||||
:key="`condition-${conditionIndex}`"
|
:key="`condition-${conditionIndex}`"
|
||||||
@@ -111,20 +108,18 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
|||||||
>
|
>
|
||||||
<!-- 条件配置 -->
|
<!-- 条件配置 -->
|
||||||
<div
|
<div
|
||||||
class="rounded-6px border border-[var(--el-border-color-lighter)] bg-[var(--el-fill-color-blank)] shadow-sm"
|
class="rounded-3px border-border bg-fill-color-blank border shadow-sm"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="p-12px rounded-t-4px flex items-center justify-between border-b border-[var(--el-border-color-lighter)] bg-[var(--el-fill-color-light)]"
|
class="rounded-t-1 border-border bg-fill-color-blank flex items-center justify-between border-b p-3"
|
||||||
>
|
>
|
||||||
<div class="gap-8px flex items-center">
|
<div class="flex items-center gap-2">
|
||||||
<div
|
<div
|
||||||
class="w-20px h-20px text-10px flex items-center justify-center rounded-full bg-blue-500 font-bold text-white"
|
class="bg-primary flex size-5 items-center justify-center rounded-full text-xs font-bold text-white"
|
||||||
>
|
>
|
||||||
{{ conditionIndex + 1 }}
|
{{ conditionIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span class="text-primary text-base font-bold">
|
||||||
class="text-12px font-500 text-[var(--el-text-color-primary)]"
|
|
||||||
>
|
|
||||||
条件 {{ conditionIndex + 1 }}
|
条件 {{ conditionIndex + 1 }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -140,7 +135,7 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-12px">
|
<div class="p-3">
|
||||||
<ConditionConfig
|
<ConditionConfig
|
||||||
:model-value="condition"
|
:model-value="condition"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
@@ -158,15 +153,13 @@ function updateCondition(index: number, condition: TriggerCondition) {
|
|||||||
v-if="
|
v-if="
|
||||||
subGroup && subGroup.length > 0 && subGroup.length < maxConditions
|
subGroup && subGroup.length > 0 && subGroup.length < maxConditions
|
||||||
"
|
"
|
||||||
class="py-16px text-center"
|
class="py-4 text-center"
|
||||||
>
|
>
|
||||||
<Button type="primary" plain @click="addCondition">
|
<Button type="primary" plain @click="addCondition">
|
||||||
<IconifyIcon icon="ep:plus" />
|
<IconifyIcon icon="lucide:plus" />
|
||||||
继续添加条件
|
继续添加条件
|
||||||
</Button>
|
</Button>
|
||||||
<span
|
<span class="text-secondary mt-2 block text-xs">
|
||||||
class="mt-8px text-12px block text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
最多可添加 {{ maxConditions }} 个条件
|
最多可添加 {{ maxConditions }} 个条件
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ watch(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 参数配置 -->
|
<!-- 参数配置 -->
|
||||||
<div class="space-y-12px w-full">
|
<div class="w-full space-y-3">
|
||||||
<!-- JSON 输入框 -->
|
<!-- JSON 输入框 -->
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
@@ -427,7 +427,7 @@ watch(
|
|||||||
:class="{ 'is-error': jsonError }"
|
:class="{ 'is-error': jsonError }"
|
||||||
/>
|
/>
|
||||||
<!-- 查看详细示例弹出层 -->
|
<!-- 查看详细示例弹出层 -->
|
||||||
<div class="top-8px right-8px absolute">
|
<div class="absolute right-2 top-2">
|
||||||
<Popover
|
<Popover
|
||||||
placement="leftTop"
|
placement="leftTop"
|
||||||
:width="450"
|
:width="450"
|
||||||
@@ -450,79 +450,64 @@ watch(
|
|||||||
|
|
||||||
<!-- 弹出层内容 -->
|
<!-- 弹出层内容 -->
|
||||||
<div class="json-params-detail-content">
|
<div class="json-params-detail-content">
|
||||||
<div class="gap-8px mb-16px flex items-center">
|
<div class="mb-4 flex items-center gap-2">
|
||||||
<IconifyIcon
|
<IconifyIcon :icon="titleIcon" class="text-primary text-lg" />
|
||||||
:icon="titleIcon"
|
<span class="text-primary text-base font-bold">
|
||||||
class="text-18px text-[var(--el-color-primary)]"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
class="text-16px font-600 text-[var(--el-text-color-primary)]"
|
|
||||||
>
|
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="space-y-16px">
|
<div class="space-y-4">
|
||||||
<!-- 参数列表 -->
|
<!-- 参数列表 -->
|
||||||
<div v-if="paramsList.length > 0">
|
<div v-if="paramsList.length > 0">
|
||||||
<div class="gap-8px mb-8px flex items-center">
|
<div class="mb-2 flex items-center gap-2">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
:icon="paramsIcon"
|
:icon="paramsIcon"
|
||||||
class="text-14px text-[var(--el-color-primary)]"
|
class="text-primary text-base"
|
||||||
/>
|
/>
|
||||||
<span
|
<span class="text-primary text-base font-bold">
|
||||||
class="text-14px font-500 text-[var(--el-text-color-primary)]"
|
|
||||||
>
|
|
||||||
{{ paramsLabel }}
|
{{ paramsLabel }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-22px space-y-8px">
|
<div class="ml-6 space-y-2">
|
||||||
<div
|
<div
|
||||||
v-for="param in paramsList"
|
v-for="param in paramsList"
|
||||||
:key="param.identifier"
|
:key="param.identifier"
|
||||||
class="p-8px rounded-4px flex items-center justify-between bg-[var(--el-fill-color-lighter)]"
|
class="bg-card flex items-center justify-between rounded-lg p-2"
|
||||||
>
|
>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<div
|
<div class="text-primary text-base font-bold">
|
||||||
class="text-12px font-500 text-[var(--el-text-color-primary)]"
|
|
||||||
>
|
|
||||||
{{ param.name }}
|
{{ param.name }}
|
||||||
<Tag
|
<Tag
|
||||||
v-if="param.required"
|
v-if="param.required"
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
class="ml-4px"
|
class="ml-1"
|
||||||
>
|
>
|
||||||
{{ JSON_PARAMS_INPUT_CONSTANTS.REQUIRED_TAG }}
|
{{ JSON_PARAMS_INPUT_CONSTANTS.REQUIRED_TAG }}
|
||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="text-secondary text-xs">
|
||||||
class="text-11px text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
{{ param.identifier }}
|
{{ param.identifier }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gap-8px flex items-center">
|
<div class="flex items-center gap-2">
|
||||||
<Tag :type="getParamTypeTag(param.dataType)" size="small">
|
<Tag :type="getParamTypeTag(param.dataType)" size="small">
|
||||||
{{ getParamTypeName(param.dataType) }}
|
{{ getParamTypeName(param.dataType) }}
|
||||||
</Tag>
|
</Tag>
|
||||||
<span
|
<span class="text-secondary text-xs">
|
||||||
class="text-11px text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
{{ getExampleValue(param) }}
|
{{ getExampleValue(param) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-12px ml-22px">
|
<div class="ml-6 mt-3">
|
||||||
<div
|
<div class="text-secondary mb-1 text-xs">
|
||||||
class="text-12px mb-6px text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
{{ JSON_PARAMS_INPUT_CONSTANTS.COMPLETE_JSON_FORMAT }}
|
{{ JSON_PARAMS_INPUT_CONSTANTS.COMPLETE_JSON_FORMAT }}
|
||||||
</div>
|
</div>
|
||||||
<pre
|
<pre
|
||||||
class="p-12px rounded-4px text-11px border-l-3px overflow-x-auto border-[var(--el-color-primary)] bg-[var(--el-fill-color-light)] text-[var(--el-text-color-primary)]"
|
class="bg-card border-l-3px border-primary text-primary overflow-x-auto rounded-lg p-3 text-sm"
|
||||||
>
|
>
|
||||||
<code>{{ generateExampleJson() }}</code>
|
<code>{{ generateExampleJson() }}</code>
|
||||||
</pre>
|
</pre>
|
||||||
@@ -531,8 +516,8 @@ watch(
|
|||||||
|
|
||||||
<!-- 无参数提示 -->
|
<!-- 无参数提示 -->
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="py-16px text-center">
|
<div class="py-4 text-center">
|
||||||
<p class="text-14px text-[var(--el-text-color-secondary)]">
|
<p class="text-secondary text-sm">
|
||||||
{{ emptyMessage }}
|
{{ emptyMessage }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -545,37 +530,29 @@ watch(
|
|||||||
|
|
||||||
<!-- 验证状态和错误提示 -->
|
<!-- 验证状态和错误提示 -->
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="gap-8px flex items-center">
|
<div class="flex items-center gap-2">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
:icon="
|
:icon="
|
||||||
jsonError
|
jsonError
|
||||||
? JSON_PARAMS_INPUT_ICONS.STATUS_ICONS.ERROR
|
? JSON_PARAMS_INPUT_ICONS.STATUS_ICONS.ERROR
|
||||||
: JSON_PARAMS_INPUT_ICONS.STATUS_ICONS.SUCCESS
|
: JSON_PARAMS_INPUT_ICONS.STATUS_ICONS.SUCCESS
|
||||||
"
|
"
|
||||||
:class="
|
:class="jsonError ? 'text-danger' : 'text-success'"
|
||||||
jsonError
|
class="text-sm"
|
||||||
? 'text-[var(--el-color-danger)]'
|
|
||||||
: 'text-[var(--el-color-success)]'
|
|
||||||
"
|
|
||||||
class="text-14px"
|
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
:class="
|
:class="jsonError ? 'text-danger' : 'text-success'"
|
||||||
jsonError
|
class="text-xs"
|
||||||
? 'text-[var(--el-color-danger)]'
|
|
||||||
: 'text-[var(--el-color-success)]'
|
|
||||||
"
|
|
||||||
class="text-12px"
|
|
||||||
>
|
>
|
||||||
{{ jsonError || JSON_PARAMS_INPUT_CONSTANTS.JSON_FORMAT_CORRECT }}
|
{{ jsonError || JSON_PARAMS_INPUT_CONSTANTS.JSON_FORMAT_CORRECT }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 快速填充按钮 -->
|
<!-- 快速填充按钮 -->
|
||||||
<div v-if="paramsList.length > 0" class="gap-8px flex items-center">
|
<div v-if="paramsList.length > 0" class="flex items-center gap-2">
|
||||||
<span class="text-12px text-[var(--el-text-color-secondary)]">{{
|
<span class="text-secondary text-xs">
|
||||||
JSON_PARAMS_INPUT_CONSTANTS.QUICK_FILL_LABEL
|
{{ JSON_PARAMS_INPUT_CONSTANTS.QUICK_FILL_LABEL }}
|
||||||
}}</span>
|
</span>
|
||||||
<Button size="small" type="primary" plain @click="fillExampleJson">
|
<Button size="small" type="primary" plain @click="fillExampleJson">
|
||||||
{{ JSON_PARAMS_INPUT_CONSTANTS.EXAMPLE_DATA_BUTTON }}
|
{{ JSON_PARAMS_INPUT_CONSTANTS.EXAMPLE_DATA_BUTTON }}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ watch(
|
|||||||
operator ===
|
operator ===
|
||||||
IotRuleSceneTriggerConditionParameterOperatorEnum.BETWEEN.value
|
IotRuleSceneTriggerConditionParameterOperatorEnum.BETWEEN.value
|
||||||
"
|
"
|
||||||
class="w-full! gap-8px flex items-center"
|
class="w-full! flex items-center gap-2"
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
v-model="rangeStart"
|
v-model="rangeStart"
|
||||||
@@ -196,11 +196,7 @@ watch(
|
|||||||
class="min-w-0 flex-1"
|
class="min-w-0 flex-1"
|
||||||
style="width: auto !important"
|
style="width: auto !important"
|
||||||
/>
|
/>
|
||||||
<span
|
<span class="text-secondary whitespace-nowrap text-xs"> 至 </span>
|
||||||
class="text-12px whitespace-nowrap text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
至
|
|
||||||
</span>
|
|
||||||
<Input
|
<Input
|
||||||
v-model="rangeEnd"
|
v-model="rangeEnd"
|
||||||
:type="getInputType()"
|
:type="getInputType()"
|
||||||
@@ -226,18 +222,16 @@ watch(
|
|||||||
<Tooltip content="多个值用逗号分隔,如:1,2,3" placement="top">
|
<Tooltip content="多个值用逗号分隔,如:1,2,3" placement="top">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
icon="ep:question-filled"
|
icon="ep:question-filled"
|
||||||
class="cursor-help text-[var(--el-text-color-placeholder)]"
|
class="cursor-help text-gray-400"
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
<div
|
<div
|
||||||
v-if="listPreview.length > 0"
|
v-if="listPreview.length > 0"
|
||||||
class="mt-8px gap-6px flex flex-wrap items-center"
|
class="mt-2 flex flex-wrap items-center gap-1"
|
||||||
>
|
>
|
||||||
<span class="text-12px text-[var(--el-text-color-secondary)]">
|
<span class="text-secondary text-xs"> 解析结果: </span>
|
||||||
解析结果:
|
|
||||||
</span>
|
|
||||||
<Tag
|
<Tag
|
||||||
v-for="(item, index) in listPreview"
|
v-for="(item, index) in listPreview"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -288,7 +282,7 @@ watch(
|
|||||||
:content="`单位:${propertyConfig.unit}`"
|
:content="`单位:${propertyConfig.unit}`"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<span class="text-12px px-4px text-[var(--el-text-color-secondary)]">
|
<span class="text-secondary px-1 text-xs">
|
||||||
{{ propertyConfig.unit }}
|
{{ propertyConfig.unit }}
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ function onActionTypeChange(action: Action, type: any) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Card class="rounded-8px border-primary border" shadow="never">
|
<Card class="border-primary rounded-lg border" shadow="never">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="gap-8px flex items-center">
|
<div class="gap-8px flex items-center">
|
||||||
@@ -186,18 +186,18 @@ function onActionTypeChange(action: Action, type: any) {
|
|||||||
<div
|
<div
|
||||||
v-for="(action, index) in actions"
|
v-for="(action, index) in actions"
|
||||||
:key="`action-${index}`"
|
:key="`action-${index}`"
|
||||||
class="rounded-8px border-2 border-blue-200 bg-blue-50 shadow-sm transition-shadow hover:shadow-md"
|
class="rounded-lg border-2 border-blue-200 bg-blue-50 shadow-sm transition-shadow hover:shadow-md"
|
||||||
>
|
>
|
||||||
<!-- 执行器头部 - 蓝色主题 -->
|
<!-- 执行器头部 - 蓝色主题 -->
|
||||||
<div
|
<div
|
||||||
class="p-16px rounded-t-6px flex items-center justify-between border-b border-blue-200 bg-gradient-to-r from-blue-50 to-sky-50"
|
class="flex items-center justify-between rounded-t-lg border-b border-blue-200 bg-gradient-to-r from-blue-50 to-sky-50 p-4"
|
||||||
>
|
>
|
||||||
<div class="gap-12px flex items-center">
|
<div class="gap-12px flex items-center">
|
||||||
<div
|
<div
|
||||||
class="gap-8px text-16px font-600 flex items-center text-blue-700"
|
class="font-600 flex items-center gap-2 text-base text-blue-700"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="w-24px h-24px text-12px flex items-center justify-center rounded-full bg-blue-500 font-bold text-white"
|
class="flex size-6 items-center justify-center rounded-full bg-blue-500 text-xs font-bold text-white"
|
||||||
>
|
>
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</div>
|
</div>
|
||||||
@@ -275,16 +275,14 @@ function onActionTypeChange(action: Action, type: any) {
|
|||||||
action.type ===
|
action.type ===
|
||||||
IotRuleSceneActionTypeEnum.ALERT_TRIGGER.toString()
|
IotRuleSceneActionTypeEnum.ALERT_TRIGGER.toString()
|
||||||
"
|
"
|
||||||
class="rounded-6px p-16px border-border bg-fill-color-blank border"
|
class="border-border bg-fill-color-blank rounded-lg border p-4"
|
||||||
>
|
>
|
||||||
<div class="gap-8px mb-8px flex items-center">
|
<div class="mb-2 flex items-center gap-2">
|
||||||
<IconifyIcon icon="ep:warning" class="text-16px text-warning" />
|
<IconifyIcon icon="ep:warning" class="text-warning text-base" />
|
||||||
<span class="text-14px font-600 text-primary">触发告警</span>
|
<span class="font-600 text-primary text-sm">触发告警</span>
|
||||||
<Tag size="small" type="warning">自动执行</Tag>
|
<Tag size="small" type="warning">自动执行</Tag>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="text-secondary text-xs leading-relaxed">
|
||||||
class="text-12px leading-relaxed text-[var(--el-text-color-secondary)]"
|
|
||||||
>
|
|
||||||
当触发条件满足时,系统将自动发送告警通知,可在菜单 [告警中心 ->
|
当触发条件满足时,系统将自动发送告警通知,可在菜单 [告警中心 ->
|
||||||
告警配置] 管理。
|
告警配置] 管理。
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -96,7 +96,9 @@ const handleDeleteComponent = () => {
|
|||||||
<div :style="style">
|
<div :style="style">
|
||||||
<component :is="component.id" :property="component.property" />
|
<component :is="component.id" :property="component.property" />
|
||||||
</div>
|
</div>
|
||||||
<div class="component-wrap absolute -left-0.5 top-1 block h-full w-full">
|
<div
|
||||||
|
class="component-wrap absolute -bottom-1 -left-0.5 -right-0.5 -top-1 block h-full w-full"
|
||||||
|
>
|
||||||
<!-- 左侧:组件名(悬浮的小贴条) -->
|
<!-- 左侧:组件名(悬浮的小贴条) -->
|
||||||
<div class="component-name" v-if="component.name">
|
<div class="component-name" v-if="component.name">
|
||||||
{{ component.name }}
|
{{ component.name }}
|
||||||
@@ -169,7 +171,7 @@ $toolbar-position: -55px;
|
|||||||
.component-wrap {
|
.component-wrap {
|
||||||
/* 鼠标放到组件上时 */
|
/* 鼠标放到组件上时 */
|
||||||
&:hover {
|
&:hover {
|
||||||
border: $hover-border-width dashed var(--primary);
|
border: $hover-border-width dashed hsl(var(--primary));
|
||||||
box-shadow: 0 0 5px 0 rgb(24 144 255 / 30%);
|
box-shadow: 0 0 5px 0 rgb(24 144 255 / 30%);
|
||||||
|
|
||||||
.component-name {
|
.component-name {
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 手机宽度
|
// 手机宽度
|
||||||
const phoneWidth = ref(375);
|
const phoneWidth = ref(384);
|
||||||
// 容器
|
// 容器
|
||||||
const containerRef = ref();
|
const containerRef = ref();
|
||||||
// 滚动条宽度
|
// 滚动条宽度
|
||||||
const scrollbarWidth = ref('100%');
|
const scrollbarWidth = ref('100%');
|
||||||
// 优惠券的宽度
|
// 优惠券的宽度
|
||||||
const couponWidth = ref(375);
|
const couponWidth = ref(384);
|
||||||
// 计算布局参数
|
// 计算布局参数
|
||||||
watch(
|
watch(
|
||||||
() => [props.property, phoneWidth, couponList.value.length],
|
() => [props.property, phoneWidth, couponList.value.length],
|
||||||
@@ -58,7 +58,7 @@ watch(
|
|||||||
);
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 提取手机宽度
|
// 提取手机宽度
|
||||||
phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 375;
|
phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 384;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ const handleOpenEditDialog = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #fff;
|
color: hsl(var(--text-color));
|
||||||
cursor: move;
|
cursor: move;
|
||||||
background: #409effbf;
|
background: color-mix(in srgb, hsl(var(--primary)) 30%, transparent);
|
||||||
border: 1px solid var(--el-color-primary);
|
border: 1px solid hsl(var(--primary));
|
||||||
|
|
||||||
/* 控制点 */
|
/* 控制点 */
|
||||||
.ctrl-dot {
|
.ctrl-dot {
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ const cellList = computed(() =>
|
|||||||
// 单元格宽度
|
// 单元格宽度
|
||||||
const cellWidth = computed(() => {
|
const cellWidth = computed(() => {
|
||||||
return props.property._local?.previewMp
|
return props.property._local?.previewMp
|
||||||
? (375 - 80 - 86) / 6
|
? (384 - 80 - 86) / 6
|
||||||
: (375 - 90) / 8;
|
: (384 - 90) / 8;
|
||||||
});
|
});
|
||||||
// 获得单元格样式
|
// 获得单元格样式
|
||||||
const getCellStyle = (cell: NavigationBarCellProperty) => {
|
const getCellStyle = (cell: NavigationBarCellProperty) => {
|
||||||
|
|||||||
@@ -44,17 +44,26 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<RadioGroup v-model:value="formData.layoutType">
|
<RadioGroup v-model:value="formData.layoutType">
|
||||||
<Tooltip title="单列大图" placement="bottom">
|
<Tooltip title="单列大图" placement="bottom">
|
||||||
<RadioButton value="oneColBigImg">
|
<RadioButton value="oneColBigImg">
|
||||||
<IconifyIcon icon="fluent:text-column-one-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-one-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="单列小图" placement="bottom">
|
<Tooltip title="单列小图" placement="bottom">
|
||||||
<RadioButton value="oneColSmallImg">
|
<RadioButton value="oneColSmallImg">
|
||||||
<IconifyIcon icon="fluent:text-column-two-left-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-left-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="双列" placement="bottom">
|
<Tooltip title="双列" placement="bottom">
|
||||||
<RadioButton value="twoCol">
|
<RadioButton value="twoCol">
|
||||||
<IconifyIcon icon="fluent:text-column-two-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ watch(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
// 手机宽度
|
// 手机宽度
|
||||||
const phoneWidth = ref(375);
|
const phoneWidth = ref(384);
|
||||||
// 容器
|
// 容器
|
||||||
const containerRef = ref();
|
const containerRef = ref();
|
||||||
// 商品的列数
|
// 商品的列数
|
||||||
@@ -69,7 +69,7 @@ watch(
|
|||||||
);
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 提取手机宽度
|
// 提取手机宽度
|
||||||
phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 375;
|
phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 384;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -46,17 +46,23 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<RadioGroup v-model:value="formData.layoutType">
|
<RadioGroup v-model:value="formData.layoutType">
|
||||||
<Tooltip title="双列" placement="bottom">
|
<Tooltip title="双列" placement="bottom">
|
||||||
<RadioButton value="twoCol">
|
<RadioButton value="twoCol">
|
||||||
<IconifyIcon icon="fluent:text-column-two-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="三列" placement="bottom">
|
<Tooltip title="三列" placement="bottom">
|
||||||
<RadioButton value="threeCol">
|
<RadioButton value="threeCol">
|
||||||
<IconifyIcon icon="fluent:text-column-three-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-three-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="水平滑动" placement="bottom">
|
<Tooltip title="水平滑动" placement="bottom">
|
||||||
<RadioButton value="horizSwiper">
|
<RadioButton value="horizSwiper">
|
||||||
<IconifyIcon icon="system-uicons:carousel" />
|
<IconifyIcon icon="system-uicons:carousel" class="size-6" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -27,7 +27,5 @@ watch(
|
|||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="min-h-[30px]" v-dompurify-html="article?.content"></div>
|
<div class="min-h-8" v-dompurify-html="article?.content"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -64,5 +64,3 @@ onMounted(() => {
|
|||||||
</Form>
|
</Form>
|
||||||
</ComponentContainerProperty>
|
</ComponentContainerProperty>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -97,11 +97,11 @@ const calculateWidth = () => {
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="box-content flex min-h-[30px] w-full flex-row flex-wrap"
|
class="box-content flex min-h-8 w-full flex-row flex-wrap"
|
||||||
ref="containerRef"
|
ref="containerRef"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
|
class="bg-card relative box-content flex flex-row flex-wrap overflow-hidden"
|
||||||
:style="{
|
:style="{
|
||||||
...calculateSpace(index),
|
...calculateSpace(index),
|
||||||
...calculateWidth(),
|
...calculateWidth(),
|
||||||
@@ -118,19 +118,15 @@ const calculateWidth = () => {
|
|||||||
v-if="property.badge.show"
|
v-if="property.badge.show"
|
||||||
class="absolute left-0 top-0 z-[1] items-center justify-center"
|
class="absolute left-0 top-0 z-[1] items-center justify-center"
|
||||||
>
|
>
|
||||||
<Image
|
<Image fit="cover" :src="property.badge.imgUrl" class="h-6 w-8" />
|
||||||
fit="cover"
|
|
||||||
:src="property.badge.imgUrl"
|
|
||||||
class="h-[26px] w-[38px]"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 商品封面图 -->
|
<!-- 商品封面图 -->
|
||||||
<div
|
<div
|
||||||
class="h-[140px]"
|
class="h-36"
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||||
'w-[140px]': property.layoutType === 'oneColSmallImg',
|
'w-36': property.layoutType === 'oneColSmallImg',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
@@ -141,7 +137,7 @@ const calculateWidth = () => {
|
|||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||||
'w-[calc(100%-140px-16px)]':
|
'w-[calc(100vw-36px-16px)]':
|
||||||
property.layoutType === 'oneColSmallImg',
|
property.layoutType === 'oneColSmallImg',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@@ -149,7 +145,7 @@ const calculateWidth = () => {
|
|||||||
<!-- 商品名称 -->
|
<!-- 商品名称 -->
|
||||||
<div
|
<div
|
||||||
v-if="property.fields.name.show"
|
v-if="property.fields.name.show"
|
||||||
class="text-[14px]"
|
class="text-sm"
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
truncate: property.layoutType !== 'oneColSmallImg',
|
truncate: property.layoutType !== 'oneColSmallImg',
|
||||||
@@ -164,7 +160,7 @@ const calculateWidth = () => {
|
|||||||
<!-- 商品简介 -->
|
<!-- 商品简介 -->
|
||||||
<div
|
<div
|
||||||
v-if="property.fields.introduction.show"
|
v-if="property.fields.introduction.show"
|
||||||
class="truncate text-[12px]"
|
class="truncate text-xs"
|
||||||
:style="{ color: property.fields.introduction.color }"
|
:style="{ color: property.fields.introduction.color }"
|
||||||
>
|
>
|
||||||
{{ spu.introduction }}
|
{{ spu.introduction }}
|
||||||
@@ -173,7 +169,7 @@ const calculateWidth = () => {
|
|||||||
<!-- 价格 -->
|
<!-- 价格 -->
|
||||||
<span
|
<span
|
||||||
v-if="property.fields.price.show"
|
v-if="property.fields.price.show"
|
||||||
class="text-[16px]"
|
class="text-base"
|
||||||
:style="{ color: property.fields.price.color }"
|
:style="{ color: property.fields.price.color }"
|
||||||
>
|
>
|
||||||
¥{{ fenToYuan(spu.price || Infinity) }}
|
¥{{ fenToYuan(spu.price || Infinity) }}
|
||||||
@@ -181,13 +177,13 @@ const calculateWidth = () => {
|
|||||||
<!-- 市场价 -->
|
<!-- 市场价 -->
|
||||||
<span
|
<span
|
||||||
v-if="property.fields.marketPrice.show && spu.marketPrice"
|
v-if="property.fields.marketPrice.show && spu.marketPrice"
|
||||||
class="ml-[4px] text-[10px] line-through"
|
class="ml-1 text-xs line-through"
|
||||||
:style="{ color: property.fields.marketPrice.color }"
|
:style="{ color: property.fields.marketPrice.color }"
|
||||||
>
|
>
|
||||||
¥{{ fenToYuan(spu.marketPrice) }}
|
¥{{ fenToYuan(spu.marketPrice) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-[12px]">
|
<div class="text-xs">
|
||||||
<!-- 销量 -->
|
<!-- 销量 -->
|
||||||
<span
|
<span
|
||||||
v-if="property.fields.salesCount.show"
|
v-if="property.fields.salesCount.show"
|
||||||
@@ -205,11 +201,11 @@ const calculateWidth = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 购买按钮 -->
|
<!-- 购买按钮 -->
|
||||||
<div class="absolute bottom-[8px] right-[8px]">
|
<div class="absolute bottom-2 right-2">
|
||||||
<!-- 文字按钮 -->
|
<!-- 文字按钮 -->
|
||||||
<span
|
<span
|
||||||
v-if="property.btnBuy.type === 'text'"
|
v-if="property.btnBuy.type === 'text'"
|
||||||
class="rounded-full px-[12px] py-[4px] text-[12px] text-white"
|
class="rounded-full px-3 py-1 text-sm text-white"
|
||||||
:style="{
|
:style="{
|
||||||
background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`,
|
background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`,
|
||||||
}"
|
}"
|
||||||
@@ -219,7 +215,7 @@ const calculateWidth = () => {
|
|||||||
<!-- 图片按钮 -->
|
<!-- 图片按钮 -->
|
||||||
<Image
|
<Image
|
||||||
v-else
|
v-else
|
||||||
class="h-[28px] w-[28px] rounded-full"
|
class="size-7 rounded-full"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:src="property.btnBuy.imgUrl"
|
:src="property.btnBuy.imgUrl"
|
||||||
/>
|
/>
|
||||||
@@ -227,5 +223,3 @@ const calculateWidth = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -60,17 +60,26 @@ onMounted(async () => {
|
|||||||
<RadioGroup v-model:value="formData.layoutType">
|
<RadioGroup v-model:value="formData.layoutType">
|
||||||
<Tooltip title="单列大图" placement="bottom">
|
<Tooltip title="单列大图" placement="bottom">
|
||||||
<RadioButton value="oneColBigImg">
|
<RadioButton value="oneColBigImg">
|
||||||
<IconifyIcon icon="fluent:text-column-one-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-one-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="单列小图" placement="bottom">
|
<Tooltip title="单列小图" placement="bottom">
|
||||||
<RadioButton value="oneColSmallImg">
|
<RadioButton value="oneColSmallImg">
|
||||||
<IconifyIcon icon="fluent:text-column-two-left-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-left-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="双列" placement="bottom">
|
<Tooltip title="双列" placement="bottom">
|
||||||
<RadioButton value="twoCol">
|
<RadioButton value="twoCol">
|
||||||
<IconifyIcon icon="fluent:text-column-two-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -42,17 +42,26 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<RadioGroup v-model:value="formData.layoutType">
|
<RadioGroup v-model:value="formData.layoutType">
|
||||||
<Tooltip title="单列大图" placement="bottom">
|
<Tooltip title="单列大图" placement="bottom">
|
||||||
<RadioButton value="oneColBigImg">
|
<RadioButton value="oneColBigImg">
|
||||||
<IconifyIcon icon="fluent:text-column-one-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-one-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="单列小图" placement="bottom">
|
<Tooltip title="单列小图" placement="bottom">
|
||||||
<RadioButton value="oneColSmallImg">
|
<RadioButton value="oneColSmallImg">
|
||||||
<IconifyIcon icon="fluent:text-column-two-left-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-left-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="双列" placement="bottom">
|
<Tooltip title="双列" placement="bottom">
|
||||||
<RadioButton value="twoCol">
|
<RadioButton value="twoCol">
|
||||||
<IconifyIcon icon="fluent:text-column-two-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -116,19 +116,15 @@ const calculateWidth = () => {
|
|||||||
v-if="property.badge.show"
|
v-if="property.badge.show"
|
||||||
class="absolute left-0 top-0 z-[1] items-center justify-center"
|
class="absolute left-0 top-0 z-[1] items-center justify-center"
|
||||||
>
|
>
|
||||||
<Image
|
<Image fit="cover" :src="property.badge.imgUrl" class="h-6 w-8" />
|
||||||
fit="cover"
|
|
||||||
:src="property.badge.imgUrl"
|
|
||||||
class="h-[26px] w-[38px]"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 商品封面图 -->
|
<!-- 商品封面图 -->
|
||||||
<div
|
<div
|
||||||
class="h-[140px]"
|
class="h-36"
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||||
'w-[140px]': property.layoutType === 'oneColSmallImg',
|
'w-36': property.layoutType === 'oneColSmallImg',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
@@ -139,7 +135,7 @@ const calculateWidth = () => {
|
|||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||||
'w-[calc(100%-140px-16px)]':
|
'w-[calc(100vw-140px-16px)]':
|
||||||
property.layoutType === 'oneColSmallImg',
|
property.layoutType === 'oneColSmallImg',
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
|
|||||||
@@ -45,17 +45,26 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<RadioGroup v-model:value="formData.layoutType">
|
<RadioGroup v-model:value="formData.layoutType">
|
||||||
<Tooltip title="单列大图" placement="bottom">
|
<Tooltip title="单列大图" placement="bottom">
|
||||||
<RadioButton value="oneColBigImg">
|
<RadioButton value="oneColBigImg">
|
||||||
<IconifyIcon icon="fluent:text-column-one-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-one-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="单列小图" placement="bottom">
|
<Tooltip title="单列小图" placement="bottom">
|
||||||
<RadioButton value="oneColSmallImg">
|
<RadioButton value="oneColSmallImg">
|
||||||
<IconifyIcon icon="fluent:text-column-two-left-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-left-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="双列" placement="bottom">
|
<Tooltip title="双列" placement="bottom">
|
||||||
<RadioButton value="twoCol">
|
<RadioButton value="twoCol">
|
||||||
<IconifyIcon icon="fluent:text-column-two-24-filled" />
|
<IconifyIcon
|
||||||
|
icon="fluent:text-column-two-24-filled"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -54,12 +54,18 @@ const rules = {}; // 表单校验
|
|||||||
<RadioGroup v-model:value="formData!.textAlign">
|
<RadioGroup v-model:value="formData!.textAlign">
|
||||||
<Tooltip title="居左" placement="top">
|
<Tooltip title="居左" placement="top">
|
||||||
<RadioButton value="left">
|
<RadioButton value="left">
|
||||||
<IconifyIcon icon="ant-design:align-left-outlined" />
|
<IconifyIcon
|
||||||
|
icon="ant-design:align-left-outlined"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title="居中" placement="top">
|
<Tooltip title="居中" placement="top">
|
||||||
<RadioButton value="center">
|
<RadioButton value="center">
|
||||||
<IconifyIcon icon="ant-design:align-center-outlined" />
|
<IconifyIcon
|
||||||
|
icon="ant-design:align-center-outlined"
|
||||||
|
class="size-6"
|
||||||
|
/>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ defineProps<{ property: UserCardProperty }>();
|
|||||||
</div>
|
</div>
|
||||||
<IconifyIcon icon="lucide:qr-code" class="size-5" />
|
<IconifyIcon icon="lucide:qr-code" class="size-5" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between bg-white px-5 py-2 text-xs">
|
<div class="bg-card flex items-center justify-between px-5 py-2 text-xs">
|
||||||
<span class="text-orange-500">点击绑定手机号</span>
|
<span class="text-orange-500">点击绑定手机号</span>
|
||||||
<span class="rounded-lg bg-orange-500 px-2 py-1 text-white">
|
<span class="rounded-lg bg-orange-500 px-2 py-1 text-white">
|
||||||
去绑定
|
去绑定
|
||||||
|
|||||||
@@ -16,5 +16,3 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<template>
|
<template>
|
||||||
<ComponentContainerProperty v-model="formData.style" />
|
<ComponentContainerProperty v-model="formData.style" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -13,5 +13,3 @@ defineProps<{ property: UserCouponProperty }>();
|
|||||||
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle.png"
|
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/couponCardStyle.png"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -16,5 +16,3 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<template>
|
<template>
|
||||||
<ComponentContainerProperty v-model="formData.style" />
|
<ComponentContainerProperty v-model="formData.style" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -13,5 +13,3 @@ defineProps<{ property: UserOrderProperty }>();
|
|||||||
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/orderCardStyle.png"
|
src="https://shopro.sheepjs.com/admin/static/images/shop/decorate/orderCardStyle.png"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -16,5 +16,3 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
<template>
|
<template>
|
||||||
<ComponentContainerProperty v-model="formData.style" />
|
<ComponentContainerProperty v-model="formData.style" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -56,5 +56,3 @@ const formData = useVModel(props, 'modelValue', emit);
|
|||||||
</Form>
|
</Form>
|
||||||
</ComponentContainerProperty>
|
</ComponentContainerProperty>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ defineOptions({ name: 'VerticalButtonGroup' });
|
|||||||
// TODO @AI:圆角的样式不太对!
|
// TODO @AI:圆角的样式不太对!
|
||||||
.ant-btn-group > :deep(.ant-btn:first-child) {
|
.ant-btn-group > :deep(.ant-btn:first-child) {
|
||||||
border-bottom-color: transparent;
|
border-bottom-color: transparent;
|
||||||
border-radius: var(--ant-border-radius) var(--ant-border-radius) 0 0;
|
border-radius: hsl(var(--radius)) hsl(var(--radius)) 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-group > :deep(.ant-btn:last-child) {
|
.ant-btn-group > :deep(.ant-btn:last-child) {
|
||||||
border-top-color: transparent;
|
border-top-color: transparent;
|
||||||
border-radius: 0 0 var(--ant-border-radius) var(--ant-border-radius);
|
border-radius: 0 0 hsl(var(--radius)) hsl(var(--radius));
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-btn-group :deep(.ant-btn:not(:first-child):not(:last-child)) {
|
.ant-btn-group :deep(.ant-btn:not(:first-child):not(:last-child)) {
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ function handleSelect(item: Emoji) {
|
|||||||
v-for="(item, index) in emojiList"
|
v-for="(item, index) in emojiList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:style="{
|
:style="{
|
||||||
borderColor: 'var(--primary)',
|
borderColor: 'hsl(var(--primary))',
|
||||||
color: 'var(--primary)',
|
color: 'hsl(var(--primary))',
|
||||||
}"
|
}"
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
class="icon-item w-1/10 mr-2 mt-1 flex cursor-pointer items-center justify-center border border-solid p-2"
|
class="icon-item w-1/10 mr-2 mt-1 flex cursor-pointer items-center justify-center border border-solid p-2"
|
||||||
|
|||||||
Reference in New Issue
Block a user