Closed cevio closed 8 years ago
@cevio :style
has autoprefixer and checks styles in CSSStyleDeclaration
You can ckeck it in different browsers
const props = ['MozBoxFlex', 'webkitBoxFlex', 'webkitFlex', 'msFlex', 'flex'];
const div = document.createElement('div');
console.log(props.filter(s => div.style[s] !== void 0));
Browser puts a value only if it is able to work with it and it is necessary.. So, your code can be simplified
...
computed: {
style: function(){
return {
'boxFlex': this.flex,
'flex': this.flex
};
}
}
...
As @finico said, :style
prefixes your styles automatically for the current browser. If there are any actual issues with that (e.g. no prefix where it should be), then please report these.
@finico @simplesmiler thanks for your help. I have alreay resolve this problem. thanks so much!
I got a problem with vuejs while using
:style="flex:..."
.Here is the code:html:
js:
run it, and i got element like this:
In IOS ,it is right., but in android browser, it is broken.
It should be like this:
I want to get other prefixed properties. How to do it?
sorry , my english is poor. so ...