Skip to content

Commit

Permalink
feat(connection): add unit for connection form
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Dec 8, 2021
1 parent 4fdc73e commit 8776ac3
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions src/views/connections/ConnectionForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,7 @@
<el-card v-show="advancedVisible" shadow="never" class="info-body item-card">
<el-row :gutter="10">
<el-col :span="22">
<el-form-item
:label="`${$t('connections.connectionTimeout')} (${$t('common.unitS')})`"
prop="connectTimeout"
>
<el-form-item :label="$t('connections.connectionTimeout')" prop="connectTimeout">
<el-input-number
size="mini"
type="number"
Expand All @@ -253,9 +250,11 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
<el-col :span="2"
><div class="unit">({{ $t('common.unitS') }})</div></el-col
>
<el-col :span="22">
<el-form-item :label="`Keep Alive (${$t('common.unitS')})`" prop="keepalive">
<el-form-item label="Keep Alive" prop="keepalive">
<el-input-number
size="mini"
type="number"
Expand All @@ -266,7 +265,9 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="2"> </el-col>
<el-col :span="2"
><div class="unit">({{ $t('common.unitS') }})</div></el-col
>
<el-col :span="22">
<el-form-item :label="$t('connections.cleanSession')" prop="clean">
<el-radio-group v-model="record.clean">
Expand Down Expand Up @@ -315,14 +316,14 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
<el-col :span="2"><div class="unit">(Byte)</div></el-col>
<el-col :span="22">
<el-form-item :label="$t('connections.maximumPacketSize')" prop="maximumPacketSize">
<el-input size="mini" type="number" :min="100" v-model.number="record.properties.maximumPacketSize">
</el-input>
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
<el-col :span="2"><div class="unit">(Byte)</div></el-col>
<el-col :span="22">
<el-form-item :label="$t('connections.topicAliasMaximum')" prop="topicAliasMaximum">
<el-input size="mini" type="number" :min="1" v-model.number="record.properties.topicAliasMaximum">
Expand Down Expand Up @@ -433,7 +434,7 @@
<template v-if="record.mqttVersion === '5.0'">
<el-col :span="22">
<el-form-item
label-width="185px"
label-width="175px"
:label="$t('connections.payloadFormatIndicator')"
prop="payloadFormatIndicator"
>
Expand All @@ -446,8 +447,8 @@
<el-col :span="2"></el-col>
<el-col :span="22">
<el-form-item
label-width="185px"
:label="`${$t('connections.willDelayInterval')}(${$t('common.unitS')})`"
label-width="175px"
:label="$t('connections.willDelayInterval')"
prop="willDelayInterval"
>
<el-input
Expand All @@ -459,11 +460,13 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
<el-col :span="2"
><div class="unit">({{ $t('common.unitS') }})</div></el-col
>
<el-col :span="22">
<el-form-item
label-width="185px"
:label="`${$t('connections.messageExpiryInterval')}(${$t('common.unitS')})`"
label-width="175px"
:label="$t('connections.messageExpiryInterval')"
props="messageExpiryInterval"
>
<el-input
Expand All @@ -475,11 +478,13 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="2"></el-col>
<el-col :span="2"
><div class="unit">({{ $t('common.unitS') }})</div></el-col
>
<el-col :span="22">
<el-form-item
class="content-type-item"
label-width="185px"
label-width="175px"
:label="$t('connections.contentType')"
prop="contentType"
>
Expand All @@ -490,7 +495,7 @@
<el-col :span="22">
<el-form-item
class="content-type-item"
label-width="185px"
label-width="175px"
:label="$t('connections.responseTopic')"
prop="responseTopic"
>
Expand All @@ -501,7 +506,7 @@
<el-col :span="22">
<el-form-item
class="content-type-item"
label-width="185px"
label-width="175px"
:label="$t('connections.correlationData')"
prop="correlationData"
>
Expand Down Expand Up @@ -795,6 +800,11 @@ export default class ConnectionForm extends Vue {
color: var(--color-main-green);
}
}
.unit {
color: var(--color-text-default);
line-height: 43px;
font-size: 12px;
}
// icon style without fake class such as `:hover` style
.icon-oper-pure {
color: var(--color-text-default);
Expand Down

0 comments on commit 8776ac3

Please sign in to comment.