Skip to content

IE9-BUG,transform值变化,页面没有变化 #2567

@redhat

Description

@redhat

vue版本v1.0.19

例子如下

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
    <div>
        <div :style="{ transform: 'translate(0,'+top+'px)' }">
            <h1>1</h1>
            <h1>2</h1>
            <h1>3</h1>
            <h1>4</h1>
            <h1>5</h1>
            <h1>6</h1>
        </div>
    </div>
    <script type="text/javascript" src="vue.min.js"></script>
    <script type="text/javascript">
        new Vue({
            el: 'body',
            data: {
                top: 0
            },
            ready: function() {
                setInterval(function() {
                    this.top -= 22;
                }.bind(this), 1000);
            }
        });
    </script>
</body>
</html>

上面那个例子,vue也会把它渲染成-ms-transform: translate(0, -22px),而且在IE9调试工具下,查看页面那个值,它也有变化, 只是页面没有变化,好像没有触发重绘的样子,如果这样子

div.style.msTransform = "translate(0,-100px)"

这样那个div就会移动

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions