diff --git a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue index 85c5c9656b..f716716556 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/VariableList.vue @@ -46,53 +46,53 @@
+ v-loading="loading" + row-key="id" + :data="variables" + :total="variables.length" + :screen-height="screenHeight" + :batch-operators="batchButtons" + :remember-order="true" + :highlightCurrentRow="true" + :fields.sync="fields" + :field-key="tableHeaderKey" + @handleRowClick="handleRowClick" + @refresh="onChange" + ref="variableTable"> + prop="num" + :field="item" + :fields-width="fieldsWidth" + sortable + label="ID" + min-width="60"> + prop="name" + :field="item" + :fields-width="fieldsWidth" + :label="$t('api_test.variable_name')" + min-width="100" + sortable> + prop="type" + :field="item" + :fields-width="fieldsWidth" + :label="$t('test_track.case.type')" + min-width="70" + sortable> + prop="value" + :field="item" + :fields-width="fieldsWidth" + :label="$t('api_test.value')" + sortable> @@ -368,7 +368,7 @@ export default { this.editData = {delimiter: ",", quotedData: 'false', files: []}; this.editData.type = this.selectType; this.showDelete = false; - if (this.editData.type === 'CSV') { + if (this.editData.type === 'CSV' && this.$refs.csv) { this.$refs.csv.cleanPreview(); } this.$refs.variableTable.cancelCurrentRow(); @@ -455,7 +455,7 @@ export default { this.variables.forEach(item => { if (this.searchType && this.searchType != "" && this.selectVariable && this.selectVariable != "") { if ((item.type && item.type.toLowerCase().indexOf(this.searchType.toLowerCase()) == -1 && this.searchType != 'ALL') - || (item.name && item.name.toLowerCase().indexOf(this.selectVariable.toLowerCase()) == -1)) { + || (item.name && item.name.toLowerCase().indexOf(this.selectVariable.toLowerCase()) == -1)) { item.hidden = true; } else { item.hidden = undefined; diff --git a/frontend/src/business/components/common/select-tree/SelectTree.vue b/frontend/src/business/components/common/select-tree/SelectTree.vue index 2aeed0ce70..167f6243a5 100644 --- a/frontend/src/business/components/common/select-tree/SelectTree.vue +++ b/frontend/src/business/components/common/select-tree/SelectTree.vue @@ -1,7 +1,8 @@