diff --git a/api-test/frontend/src/business/definition/components/complete/ApiBaseInfo.vue b/api-test/frontend/src/business/definition/components/complete/ApiBaseInfo.vue index a680119f12..bd2df9036b 100644 --- a/api-test/frontend/src/business/definition/components/complete/ApiBaseInfo.vue +++ b/api-test/frontend/src/business/definition/components/complete/ApiBaseInfo.vue @@ -186,7 +186,7 @@ export default { }, customFieldForm: { handler(v, v1) { - if (v && v1 && this.$store.state.apiMap && this.basicForm.id) { + if (v && v1 && store.apiMap && this.basicForm.id) { this.apiMapStatus(); } }, @@ -245,4 +245,8 @@ export default { diff --git a/project-management/frontend/src/business/menu/common/MsSingleHandleDrag.vue b/project-management/frontend/src/business/menu/common/MsSingleHandleDrag.vue index 0799e74140..4d80639384 100644 --- a/project-management/frontend/src/business/menu/common/MsSingleHandleDrag.vue +++ b/project-management/frontend/src/business/menu/common/MsSingleHandleDrag.vue @@ -2,8 +2,8 @@
- - {{$t('custom_field.add_option')}} + + {{ $t('custom_field.add_option') }} @@ -12,7 +12,7 @@
+ v-for="(element, idx) in data" :key="idx"> - {{$t(element.text)}} + {{ $t(element.text) }} - {{element.text}} + {{ element.text }} @@ -38,13 +38,13 @@ v-model="element.value"/> - {{ (element.value && isKv ? '(' : '') + element.value + (element.value && isKv ? ')' : '')}} + {{ (element.value && isKv ? '(' : '') + element.value + (element.value && isKv ? ')' : '') }} + @click="item.click(element, idx)"/>
@@ -56,6 +56,7 @@ import draggable from "vuedraggable"; import MsInstructionsIcon from "metersphere-frontend/src/components/MsInstructionsIcon"; import {getUUID} from "metersphere-frontend/src/utils"; + export default { name: "MsSingleHandleDrag", components: { @@ -73,15 +74,15 @@ export default { data: { type: Array, default() { - return [ - { name: "John", text: "text", id: 0 }, + return [ + {name: "John", text: "text", id: 0}, ]; } }, operators: { type: Array, default() { - return [ + return [ { id: 1, icon: 'el-icon-edit', @@ -120,6 +121,9 @@ export default { if (!this.isKv) { item.value = getUUID().substring(0, 8); } + while (typeof item.value === 'number') { + item.value = getUUID().substring(0, 8); + } this.data.push(item); this.editIndex = this.data.length - 1; },