mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-04-22 05:18:04 +08:00
perf: support double click to modify match keyword #149
This commit is contained in:
parent
c0415fe23d
commit
e1f022908c
@ -68,6 +68,11 @@ const onClearFilter = () => {
|
||||
onClearMatch()
|
||||
}
|
||||
|
||||
const onUpdateMatch = () => {
|
||||
inputData.filter = inputData.match
|
||||
onClearMatch()
|
||||
}
|
||||
|
||||
const onClearMatch = () => {
|
||||
const changed = !isEmpty(inputData.match)
|
||||
inputData.match = ''
|
||||
@ -97,9 +102,9 @@ defineExpose({
|
||||
@keyup.enter="onKeyup">
|
||||
<template #prefix>
|
||||
<slot name="prefix" />
|
||||
<n-tooltip v-if="hasMatch">
|
||||
<n-tooltip v-if="hasMatch" placement="bottom">
|
||||
<template #trigger>
|
||||
<n-tag closable size="small" @close="onClearMatch">
|
||||
<n-tag closable size="small" @close="onClearMatch" @dblclick="onUpdateMatch">
|
||||
{{ inputData.match }}
|
||||
</n-tag>
|
||||
</template>
|
||||
@ -141,4 +146,11 @@ defineExpose({
|
||||
</n-input-group>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
//:deep(.n-input__prefix) {
|
||||
// max-width: 50%;
|
||||
//}
|
||||
//:deep(.n-tag__content) {
|
||||
// overflow: hidden;
|
||||
//}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user