Merge branch 'dev-3.3' of git.mesalab.cn:nezha/nezha-fronted into dev-3.3

This commit is contained in:
zyh
2022-06-20 09:53:00 +08:00
7 changed files with 45 additions and 6 deletions

View File

@@ -182,6 +182,11 @@ export default {
i: {
required: true
},
isGroup: {
type: Boolean,
required: false,
default: false
},
dragIgnoreFrom: {
type: String,
required: false,
@@ -699,12 +704,16 @@ export default {
// (l - m) / (c + m) = x
// x = (left - margin) / (coldWidth + margin)
let x = Math.round((left - this.margin[0]) / (colWidth + this.margin[0]))
let y = (top - this.margin[1]) / (this.rowHeight + this.margin[1])
let y = ''
if (this.isGroup) {
y = Math.round((top - this.margin[1]) / (this.rowHeight + this.margin[1]))
} else {
y = (top - this.margin[1]) / (this.rowHeight + this.margin[1])
}
// Capping
x = Math.max(Math.min(x, this.cols - this.innerW), 0)
y = Math.max(Math.min(y, this.maxRows - this.innerH), 0)
return { x, y }
},
// Helper for generating column width

View File

@@ -28,6 +28,7 @@
:min-h="headerH"
:max-h="12"
:static="item.static"
:isGroup="isGroup"
:class="{
'group-hide-header':item.type === 'group' && item.param.collapse,
'opacityItem': item.static

View File

@@ -209,7 +209,7 @@
<el-form-item :label='$t("webshell.port")' prop="port">
<el-input v-model="customConnect.port" size="small"/>
</el-form-item>
<el-form-item :label='$t("asset.username")' prop="authUsername">
<el-form-item :label='$t("profile.username")' prop="authUsername">
<el-input v-model="customConnect.authUsername" size="small" autocomplete="new-password"/>
</el-form-item>
<el-form-item

View File

@@ -65,6 +65,21 @@ const newcn = {
verifyPlaceholder: '验证码',
bindFail: '绑定失败'
},
asset: {
host: 'Host',
port: '端口',
talon: {
enable: '启用'
}
},
profile: {
username: '用户名'
},
overall: {
system: '系统',
back: '返回'
},
...zhLocale
}
export default newcn

View File

@@ -73,6 +73,20 @@ const newen = {
verifyPlaceholder: 'verify code',
bindFail: 'Binding failure'
},
asset: {
host: 'Host',
port: 'Port',
talon: {
enable: 'Enable'
}
},
profile: {
username: 'User name'
},
overall: {
system: 'System',
back: 'Back'
},
...enLocale
}

View File

@@ -33,7 +33,7 @@
<el-form-item :label='$t("config.mib.credential.writeCommunity")' prop="writeCommunity" v-if="editCredential.type ===1 || editCredential.type === 2">
<el-input placeholder="" autocomplete="new-password" maxlength="64" show-word-limit v-model="editCredential.config.writeCommunity" size="small" id="credential-box-input-writeCommunity" type="password" show-password></el-input>
</el-form-item>
<el-form-item :label='$t("asset.username")' prop="username" v-if="editCredential.type === 3">
<el-form-item :label='$t("profile.username")' prop="username" v-if="editCredential.type === 3">
<el-input placeholder="" maxlength="64" show-word-limit v-model="editCredential.config.username" size="small" id="credential-box-input-username"></el-input>
</el-form-item>
<el-form-item :label='$t("config.mib.credential.contextName")' prop="contextname" v-if="editCredential.type === 3">

View File

@@ -98,7 +98,7 @@
<el-form-item :label="$t('setup.name')" prop="name" key="dbname" >
<el-input v-model="database.name"></el-input>
</el-form-item>
<el-form-item :label="$t('asset.username')" prop="username" key="dbusername" >
<el-form-item :label="$t('profile.username')" prop="username" key="dbusername" >
<el-input v-model="database.username"></el-input>
</el-form-item>
<el-form-item :label="$t('login.pin')" prop="pin" key="dbpassword" >
@@ -141,7 +141,7 @@
<template v-if="activeStep == 3">
<div class="setup-config">
<el-form ref="sys-form" :model="system" label-width="80px" :rules="sysRules" label-position="top" size="small" style="width: 640px" :validate-on-rule-change="false" >
<el-form-item :label="$t('asset.username')" prop="host" key="syshost" >
<el-form-item :label="$t('profile.username')" prop="host" key="syshost" >
<el-input v-model="system.username"></el-input>
</el-form-item>
<el-form-item :label="$t('login.pin')" prop="pin" key="syspassword" >