Skip to content

Mention组件使用前缀能否取消。不是bug #7087

@liuhui-netizen

Description

@liuhui-netizen
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.6

Environment

"ant-design-vue": "^4.0.6"

Reproduction link

https://www.antdv.com/components/mentions-cn#mention-option-4-0

Steps to reproduce

这个组件输入prefix触发关键字后。再选中值。然后那个前缀能否不自动带进value呀。我用@select选择后回调再自定义赋值的话会导致值一直就是触发选中后的值进行的双向绑定

What is expected?

希望再选择值之后前缀能够不携带上的这样一个操作

What is actually happening?

<script lang="ts" setup> import { ref, watch } from "vue"; const value = ref("@afc163"); watch(value, () => { console.log("value", value); }); const onSelect = (option: { value: string }) => { value.value = value; };

const options = [
{
value: "afc163",
label: "afc163",
},
{
value: "zombieJ",
label: "zombieJ",
},
{
value: "yesmeck",
label: "yesmeck",
},
];
</script>

@select 选择后赋值 会导致文本框内值 只会是选择后的值了

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions