|
很早已经支持了。
<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> |
|