-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support to rename test suite and case
- Loading branch information
1 parent
72c53c2
commit 8d5fad6
Showing
20 changed files
with
1,210 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script setup lang="ts"> | ||
import { nextTick, ref } from 'vue' | ||
import { ElInput } from 'element-plus' | ||
import type { InputInstance } from 'element-plus' | ||
const props = defineProps({ | ||
value: String, | ||
}) | ||
const emit = defineEmits(['changed']) | ||
const inputVisible = ref(false) | ||
const inputValue = ref('') | ||
const InputRef = ref<InputInstance>() | ||
const showInput = () => { | ||
inputVisible.value = true | ||
inputValue.value = props.value ?? '' | ||
nextTick(() => { | ||
InputRef.value!.input!.focus() | ||
}) | ||
} | ||
const handleInputConfirm = () => { | ||
if (inputValue.value && props.value !== inputValue.value) { | ||
emit('changed', inputValue.value) | ||
} | ||
inputVisible.value = false | ||
inputValue.value = '' | ||
} | ||
</script> | ||
|
||
<template> | ||
<span class="flex gap-2"> | ||
<el-input | ||
v-if="inputVisible" | ||
ref="InputRef" | ||
v-model="inputValue" | ||
class="w-20" | ||
style="width: 200px" | ||
@keyup.enter="handleInputConfirm" | ||
@blur="handleInputConfirm" | ||
/> | ||
<el-button v-else class="button-new-tag" size="small" @click="showInput"> | ||
{{ value }} | ||
</el-button> | ||
</span> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.