|
|
@@ -1,38 +1,75 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="alarm-example">示例样式</div>
|
|
|
+ <div class="alarm-example">
|
|
|
+ <div>示例样式</div>
|
|
|
+ <div class="exampleTip">
|
|
|
+ <el-tooltip placement="top-start" content="示例样式仅供参考,最终展示以线上为准">
|
|
|
+ <el-icon size="16px"><InfoFilled /></el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-tabs v-model="activeName" class="alarm-example-tabs">
|
|
|
- <el-tab-pane label="平台侧" :name="0">
|
|
|
+ <!-- <el-tab-pane label="平台侧" :name="0">
|
|
|
<AlarmExamplePlatform />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="蓝信侧" :name="1">
|
|
|
<AlarmExampleMobile />
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="企业微信侧" :name="2">
|
|
|
+ <AlarmExampleWecom />
|
|
|
+ </el-tab-pane> -->
|
|
|
+
|
|
|
+ <div v-for="(example, index) in noticeChannel" :key="index">
|
|
|
+ <el-tab-pane :label="AlarmChannelLabelMap[example]" :name="index">
|
|
|
+ <component :is="exampleComponentMap[example]"></component>
|
|
|
+ </el-tab-pane>
|
|
|
+ </div>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import AlarmExamplePlatform from './AlarmExamplePlatform.vue';
|
|
|
-import AlarmExampleMobile from './AlarmExampleMobile.vue';
|
|
|
-import { ref } from 'vue';
|
|
|
+ import AlarmExamplePlatform from './AlarmExamplePlatform.vue';
|
|
|
+ import AlarmExampleMobile from './AlarmExampleMobile.vue';
|
|
|
+ import AlarmExampleWecom from './AlarmExampleWecom.vue';
|
|
|
+ import { ref } from 'vue';
|
|
|
+ import { ElTooltip, ElIcon } from 'element-plus';
|
|
|
+ import { InfoFilled } from '@element-plus/icons-vue';
|
|
|
+ import { useGlobSetting } from '@/hooks/setting';
|
|
|
+ import { AlarmChannelLabelMap } from '../types';
|
|
|
+
|
|
|
+ const activeName = ref<number>(0);
|
|
|
+ const { noticeChannel } = useGlobSetting();
|
|
|
|
|
|
-const activeName = ref<number>(0);
|
|
|
+ const exampleComponentMap = {
|
|
|
+ lanxin: AlarmExampleMobile,
|
|
|
+ platform: AlarmExamplePlatform,
|
|
|
+ wecom: AlarmExampleWecom,
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.alarm-example {
|
|
|
- padding: 18px 0 0 20px;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(0, 0, 0, 0.85);
|
|
|
- line-height: 22px;
|
|
|
-}
|
|
|
+ .alarm-example {
|
|
|
+ padding: 18px 0 0 20px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ line-height: 22px;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .exampleTip {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: #8c8c8c;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-:deep(.el-tabs__nav-scroll) {
|
|
|
- padding: 0 20px 0;
|
|
|
-}
|
|
|
-:deep(.el-tabs__nav-wrap::after) {
|
|
|
- height: 0px;
|
|
|
-}
|
|
|
+ :deep(.el-tabs__nav-scroll) {
|
|
|
+ padding: 0 20px 0;
|
|
|
+ }
|
|
|
+ :deep(.el-tabs__nav-wrap::after) {
|
|
|
+ height: 0px;
|
|
|
+ }
|
|
|
</style>
|