优化接口下拉列表支持筛选功能, 修复清空接口时获取到undefined问题,修复keepalive页面跳转报错的问题

dev
RogerWork 3 months ago
parent 15f2edc594
commit d16ea26dea
  1. 4
      src/components/ec_api/BasicConfig.vue
  2. 2
      src/components/ec_api/TabArea.vue
  3. 4
      src/layout/index.vue

@ -164,7 +164,7 @@ function handle_api_data() {
})
})
// first_tab_api
store.state.ecApiModule.first_tab_api_id = SelectApi.value[0]['id']
store.state.ecApiModule.first_tab_api_id = SelectApi.value[0] ? SelectApi.value[0]['id'] : 0
// api
SelectApiId.value.forEach(api_id => {
if (ApiParams.value.hasOwnProperty(api_id)) {
@ -293,7 +293,7 @@ onMounted(() => {
<el-col :span="6">
<label class="name-label">接口</label>
<el-select v-model="SelectApiId" placeholder="请选择" style="width: 240px" size="default" multiple collapse-tags
<el-select v-model="SelectApiId" placeholder="请选择" style="width: 240px" size="default" multiple collapse-tags filterable
collapse-tags-tooltip :clearable="true" @change="api_on_change">
<el-option
v-for="item in Api"

@ -305,7 +305,7 @@ const ace_options = {
@select="handleParamsSelect"
>
<el-table-column type="selection" width="50" :selectable="checkboxFilter"/>
<el-table-column label="字段名" width="120">
<el-table-column label="字段名" width="200">
<template v-slot="scope">
<span v-if="scope.row.is_preset">{{ scope.row.param }}</span>
<span v-else><el-input type="text" placeholder="输入字段名" v-model="scope.row.param"></el-input></span>

@ -21,9 +21,9 @@ const route = useRoute()
<el-main>
<router-view v-slot="{Component}">
<keep-alive>
<component :is="Component" v-if="route.meta.keepAlive"/>
<component :is="Component" :key="route.name" v-if="route.meta.keepAlive"/>
</keep-alive>
<component :is="Component" v-if="!route.meta.keepAlive"/>
<component :is="Component" :key="route.name" v-if="!route.meta.keepAlive"/>
</router-view>
</el-main>
</el-container>

Loading…
Cancel
Save