mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
feat: API数据源支持输入jsonpath
This commit is contained in:
@@ -538,9 +538,9 @@
|
||||
|
||||
<el-form-item
|
||||
:label="$t('datasource.isUseJsonPath')"
|
||||
prop="url"
|
||||
>
|
||||
<el-input
|
||||
:disabled="!apiItem.useJsonPath"
|
||||
v-model="apiItem.jsonPath"
|
||||
:placeholder="$t('datasource.jsonpath_info')"
|
||||
class="input-with-select"
|
||||
@@ -1103,6 +1103,10 @@ export default {
|
||||
this.$message.error(i18n.t('datasource.has_repeat_name'))
|
||||
return
|
||||
}
|
||||
if (this.apiItem.useJsonPath && !this.apiItem.jsonPath) {
|
||||
this.$message.error(i18n.t('datasource.please_input_dataPath'))
|
||||
return
|
||||
}
|
||||
this.$refs.apiItemBasicInfo.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Base64.encode(JSON.stringify(this.apiItem))
|
||||
|
||||
Reference in New Issue
Block a user