请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
显示全部楼层
286
帖子
2
勋章
7万+
Y币

[多端开发] avm 的安卓端什么时候能支持 transition

[复制链接]
发表于 2021-9-23 20:43:06
avm 的安卓端什么时候能支持 transition,距离上一次提出这个问题,都已经过去半年了都
imo.
283
帖子
4
勋章
4927
Y币
最佳答案
快了,急啥
380
帖子
4
勋章
6
Y币
286
帖子
2
勋章
7万+
Y币

真的等的实在太久了
283
帖子
4
勋章
4927
Y币
快了
71
帖子
2
勋章
3892
Y币

20230309好像还不支持啊
283
帖子
4
勋章
4927
Y币
快了,急啥
20
帖子
1
勋章
7559
Y币
transition已在2021年12月18日的版本中支持:https://community.yonyou.com/thread-205660-1-1.html
286
帖子
2
勋章
7万+
Y币
山谷回音 · 2023-3-9 18:2820230309好像还不支持啊


transition已在2021年12月18日的版本中支持:https://community.yonyou.com/thread-205660-1-1.html
380
帖子
4
勋章
6
Y币
发两个示例:
<template>
    <view class='page'>
                <button onclick="testTransform('translate')">translate</button>
                <button onclick="testTransform('rotate')">rotate</button>
                <button onclick="testTransform('scale')">scale</button>
                <button onclick="testTransform('size')">size</button>
                <view id='view1' class={"polaroid " + transform} onclick='testTransform()'>
                        <span>视图</span>
                </view>
        </view>
</template>
<script>
export default {
    apiready() {},
    data() {
        return {
            showing: true,
                        transform: ''
        };
    },
    methods: {
        testTransform(t) {
                        if(!t){
                                this.data.transform = 'hidden';
                                this.data.showing = false;
                                return;
                        }
                        if(this.data.showing){
                                this.data.transform = 'hidden';
                                this.data.showing = false;
                        }else{
                                this.data.transform = 'show ' + t;
                                this.data.showing = true;
                        }
                        setTimeout(function(){
                                console.log('width: ' + $('#view1').offsetWidth);
                        }, 500);
        }
    }
};
</script>
<style>
.page {
    height: 100%;
        background-color:white;
}
.polaroid {
        width:150px;
        height:150px;
        background-color:#FFC;
        /*box-shadow: 5px 5px 5px rgba(9, 15, 39, 0.5);*/
}
#view1{
        justify-content:center;
        align-items:center;
        transition-property: all;
        transition-duration: 0.5s;
}
.hidden{
        opacity: 0.2;
        width:150px;
        height:150px;
        transform: translate(0px, 0px) rotate(0deg) scale(1.0, 1.0);
        visibility:hidden;
}
.show{
        opacity: 1.0;
        visibility:visible;
}
.rotate{
        transform:rotate(25deg);
}
.scale{
        transform: scale(1.5, 1.5);
}
.translate{
        transform: translate(50px, 50px);
}
.size{
        width:250px;
        height:250px;
}
</style>
380
帖子
4
勋章
6
Y币
<template>
        <view class="page">
                <view>
                        <view class="view1" style={`width: ${viewW}`} @click="clickMe()"></view>
                </view>

        </view>
</template>
<style>
.page {
        width: 100%;
        height: 100%;
}

.view1 {
        height: 100px;
        background: pink;
        transition-property: width;
        transition-duration: 5s;
        transition-delay: 2s;
}

</style>
<script>
export default {
        name: 'test',
        installed() {


        },
        data() {
                return {
                        viewW: '200px'
                }
        },
        methods: {
                clickMe() {
                        this.viewW = '300px'
                }
        }
}
</script>
您需要登录后才可以回帖 登录

本版积分规则