提交 f66dbde8 authored 作者: taojinlong's avatar taojinlong

refactor: API 数据源样式调整

上级 340dd613
...@@ -369,14 +369,14 @@ export default { ...@@ -369,14 +369,14 @@ export default {
<style scoped> <style scoped>
.ms-query { .ms-query {
background: #783887; background: #409EFF;
color: white; color: white;
height: 18px; height: 18px;
border-radius: 42%; border-radius: 42%;
} }
.ms-header { .ms-header {
background: #783887; background: #409EFF;
color: white; color: white;
height: 18px; height: 18px;
border-radius: 42%; border-radius: 42%;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="kv-row item" v-for="(item, index) in items" :key="index"> <div class="kv-row item" v-for="(item, index) in items" :key="index">
<el-row type="flex" :gutter="20" justify="space-between" align="middle"> <el-row type="flex" :gutter="20" justify="space-between" align="middle">
<span style="margin-left: 10px"></span>
<i class="el-icon-top" style="cursor:pointer" @click="moveTop(index)"/> <i class="el-icon-top" style="cursor:pointer" @click="moveTop(index)"/>
<i class="el-icon-bottom" style="cursor:pointer;" @click="moveBottom(index)"/> <i class="el-icon-bottom" style="cursor:pointer;" @click="moveBottom(index)"/>
......
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-dialog v-dialogDrag :title="api_table_title" :visible="edit_api_item" :before-close="closeEditItem" width="70%" class="dialog-css" append-to-body> <el-dialog :title="api_table_title" :visible="edit_api_item" :before-close="closeEditItem" width="60%" class="dialog-css" append-to-body>
<el-steps :active="active" align-center> <el-steps :active="active" align-center>
<el-step title="步骤 1"></el-step> <el-step title="步骤 1"></el-step>
<el-step title="步骤 2"></el-step> <el-step title="步骤 2"></el-step>
</el-steps> </el-steps>
<el-row v-show="active === 1"> <el-row v-show="active === 1">
<el-form ref="apiItem" :model="apiItem" label-width="100px" :rules="rule"> <el-form ref="apiItem" size="small" :model="apiItem" label-width="100px" :rules="rule">
<p class="tip">{{ $t('datasource.base_info') }} </p> <p class="tip">{{ $t('datasource.base_info') }} </p>
<el-form-item :label="$t('commons.name')" prop="name"> <el-form-item :label="$t('commons.name')" prop="name">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<el-form-item :label="$t('datasource.data_path')" prop="dataPath"> <el-form-item :label="$t('datasource.data_path')" prop="dataPath">
<el-input :placeholder="$t('datasource.data_path_desc')" v-model="apiItem.dataPath" autocomplete="off"/> <el-input :placeholder="$t('datasource.data_path_desc')" v-model="apiItem.dataPath" autocomplete="off"/>
</el-form-item> </el-form-item>
<el-button style="margin-top: 12px;" @click="validateApi(undefined)" v-show="active === 1">{{ $t('commons.validate') }}</el-button> <!-- <el-button style="margin-top: 12px;" @click="validateApi(undefined)" v-show="active === 1">{{ $t('commons.validate') }}</el-button>-->
</el-form> </el-form>
</el-row> </el-row>
<el-row v-show="active === 2"> <el-row v-show="active === 2">
...@@ -165,9 +165,9 @@ ...@@ -165,9 +165,9 @@
</el-tabs> </el-tabs>
</el-row> </el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button style="margin-top: 12px;" @click="next" v-show="active === 1">{{ $t('fu.steps.next') }}</el-button> <el-button @click="next" v-show="active === 1">{{ $t('fu.steps.next') }}</el-button>
<el-button style="margin-top: 12px;" @click="before" v-show="active === 2">{{ $t('fu.steps.prev') }}</el-button> <el-button @click="before" v-show="active === 2">{{ $t('fu.steps.prev') }}</el-button>
<el-button style="margin-top: 12px;" @click="saveItem" v-show="active === 2">{{ $t('commons.save') }}</el-button> <el-button @click="saveItem" v-show="active === 2">{{ $t('commons.save') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -315,8 +315,8 @@ export default { ...@@ -315,8 +315,8 @@ export default {
apiConfiguration: [] apiConfiguration: []
}, },
rule: { rule: {
name: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'blur'}, name: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'change'},
{min: 2, max: 25, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur'}], {min: 2, max: 25, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'change'}],
desc: [{min: 2, max: 50, message: i18n.t('datasource.input_limit_2_50'), trigger: 'blur'}], desc: [{min: 2, max: 50, message: i18n.t('datasource.input_limit_2_50'), trigger: 'blur'}],
type: [{required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'change'}], type: [{required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'change'}],
'configuration.dataBase': [{ 'configuration.dataBase': [{
...@@ -416,7 +416,7 @@ export default { ...@@ -416,7 +416,7 @@ export default {
url: '', url: '',
method: 'GET', method: 'GET',
request: { request: {
headers: [], headers: [{}],
body: { body: {
"type": "", "type": "",
"raw": "", "raw": "",
...@@ -781,38 +781,41 @@ export default { ...@@ -781,38 +781,41 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style scoped>
.el-input {
width: 300px;
}
.el-select {
width: 300px;
}
.ms-http-input {
width: 500px;
margin-top: 5px;
}
.tip {
padding: 3px 5px;
font-size: 16px;
border-radius: 0;
border-left: 4px solid #409EFF;
margin: 5px 5px 10px 5px;
}
.el-select>>>input{
padding-right: 10px;
}
.el-select>>>.el-input__suffix{
right: 0;
}
.back-button { .dialog-css>>>.el-dialog__header {
cursor: pointer; padding: 10px 20px 0px;
margin-right: 10px; }
font-weight: 600;
&:active { .dialog-css>>>.el-dialog__body {
transform: scale(0.85); padding: 10px 20px 10px;
} }
}
.el-input { .dialog-footer>>> .el-dialog__footer {
width: 300px; padding: 10px 10px 10px;
} }
.el-select {
width: 300px;
}
.ms-http-input {
width: 500px;
margin-top: 5px;
}
.tip {
padding: 3px 5px;
font-size: 16px;
border-radius: 0;
border-left: 4px solid #783887;
margin: 5px 5px 10px 5px;
}
.el-select>>>input{
padding-right: 10px;
}
.el-select>>>.el-input__suffix{
right: 0;
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论