diff --git a/src/components/MqttProperties.vue b/src/components/MqttProperties.vue index 70932069d..18001c5db 100644 --- a/src/components/MqttProperties.vue +++ b/src/components/MqttProperties.vue @@ -15,7 +15,10 @@ />

@@ -38,6 +41,7 @@ interface PropertyField { export default class MqttProperties extends Vue { @Prop({ required: true }) public properties!: PushPropertiesModel @Prop({ default: '' }) public direction!: string + @Prop({ default: true }) public showColon!: boolean private propertyFields: PropertyField[] = [ { key: 'subscriptionIdentifier' }, diff --git a/src/widgets/TreeNodeInfo.vue b/src/widgets/TreeNodeInfo.vue index 86e099704..7e5941798 100644 --- a/src/widgets/TreeNodeInfo.vue +++ b/src/widgets/TreeNodeInfo.vue @@ -54,6 +54,11 @@
+ @@ -64,8 +69,13 @@ import { Getter } from 'vuex-class' import { findSubTopics, findFullTopicPath, isPayloadEmpty } from '@/utils/topicTree' import Prism from 'prismjs' import { jsonStringify, jsonParse } from '@/utils/jsonUtils' +import MqttProperties from '@/components/MqttProperties.vue' -@Component +@Component({ + components: { + MqttProperties, + }, +}) export default class TreeNodeInfo extends Vue { @Prop() private node!: TopicTreeNode @Prop() private treeData!: TopicTreeNode[] @@ -182,5 +192,30 @@ body.night { word-wrap: break-word; } } + .mqtt-properties.tree-node-info-mqtt-properties { + margin-top: 12px; + .properties { + .property-item { + display: flex; + flex-direction: column; + margin: 6px 0 12px 0; + .value { + background-color: var(--color-bg-select_lang); + padding: 6px 12px; + border-radius: 8px; + margin-top: 6px; + } + } + &.user-properties { + .editor-header { + margin-bottom: 6px; + } + .el-textarea.is-disabled .el-textarea__inner { + color: var(--color-text-default); + border: 1px solid var(--color-border-default); + } + } + } + } }