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

Support array of objects in bind-style #1242

Closed
Mat-Moo opened this issue Sep 2, 2015 · 2 comments
Closed

Support array of objects in bind-style #1242

Mat-Moo opened this issue Sep 2, 2015 · 2 comments

Comments

@Mat-Moo
Copy link

Mat-Moo commented Sep 2, 2015

This used to work for me in 0.12 (cFont and cTextAlign are computed functions)
<div v-style="cFont, cTextAlign">
where cFont and cTextAlign return an object with multiple values, however in 1alpha (bind-style) only the last one is used, e.g. my text is aligned but not coloured/styled, and if I reverse them, it's coloured/styled but not aligned.

@yyx990803
Copy link
Member

That's a multiple clause, which is no longer supported in 1.0.0. But we can make bind-style support an array of objects:

<div bind-style="[cFont, cTextAlign]">

For now you should probably use one single computed property instead.

@Mat-Moo
Copy link
Author

Mat-Moo commented Sep 3, 2015

Bind-style taking an array is good, will save lots of additional computed properties just to do achieve the same thing:)

@yyx990803 yyx990803 changed the title bind-style not working as expected Support array of objects in bind-style Sep 3, 2015
@yyx990803 yyx990803 added this to the 1.0.0-alpha milestone Sep 5, 2015
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

2 participants