Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-model 的 textarea 不支持吗? #29

Open
youyi1314 opened this issue Dec 4, 2017 · 7 comments
Open

v-model 的 textarea 不支持吗? #29

youyi1314 opened this issue Dec 4, 2017 · 7 comments

Comments

@youyi1314
Copy link

<at-ta at="@" :members="members" name-key="name">
	<template slot="item" slot-scope="s">
		<span v-text="s.item.display"></span>
	</template>
	<textarea class="form-control m-input" v-model.trim="messages" rows="3"></textarea>
</at-ta>
export default {
           data() {
            return {
                        messages: 'This is message'
                        members: [
                                            {
                                                name:'first_name',
	                                        display: 'Customer First Name',
                                            },
	                                    {
                                                name:'last_name',
		                                 display: 'Customer Last Name',
                                            },
	                                    {
                                                name:'full_name',
                                                display: 'Customer Full Name',
                                           }
                       ],
            }
           }
}

当输入@的时候会显示列表,但是点击后却没有输入 name 到框内 只保留了 @。
我的messages data是一个修改框。
就是说会将服务器内的数据库显示再 messages data内。
我测试了 只要去掉

v-model.trim="messages"
就可以正常使用。我也尝试换成

:value="messages"
换成 value 后 就连 @ 的列表都闪关
我这个情况下还有什么方式可以使用吗?
因为我的 messages 是动态框 所以必须用 :value 或者 v-model

@sentiasa
Copy link

sentiasa commented Dec 4, 2017

I am not sure about what you are exactly trying to achieve but I think I need the same thing. Customised list view (images & names) with textarea. Is this what you are trying to do too?

@youyi1314
Copy link
Author

customize list you can try the code above.
But the problem i face is ,ehen i select the item from the list, it dont effect.
It alway show @ only ,it cant input @first_name after i choose the Customer First Name from list.

@youyi1314
Copy link
Author

@sentiasa for your part, u may check here.
https://fritx.github.io/vue-at/#/en/customtemplates

@fritx
Copy link
Owner

fritx commented Dec 5, 2017

@youyi1314 yeah, v-model is not supported for now.

Related issues: #8 (comment), #22 (comment), #38 (PR)

@fritx
Copy link
Owner

fritx commented Dec 5, 2017

I think we could work out a proper way to solve the problem, stay in tune.

@fritx fritx added the need docs label Dec 5, 2017
@fritx fritx mentioned this issue Dec 6, 2017
33 tasks
@fritx fritx self-assigned this Jan 8, 2018
@fritx
Copy link
Owner

fritx commented Jan 8, 2018

v-model is not supported yet,
but now I'm very interested in landing it: <at v-model="text"></a> ??

a related PR: #38

@fritx fritx added the fixed label Apr 13, 2018
@fritx fritx removed their assignment Apr 13, 2018
@fritx
Copy link
Owner

fritx commented Apr 19, 2020

这个现在应该是支持的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants