WXML:
< button bindtap = 'tapHandler' >change size</ button > < movable-area class = "move_container" style = "width:{{width}}px;height:{{height}}px;" > < movable-view class = "move_item" style = "width:{{length}}px; height:{{length}}px;" direction = "all" x = "{{x-length/2}}" y = "{{y-length/2}}" ></ movable-view > </ movable-area > |
WXSS:
.move_container { /* position: absolute; */ margin : 0 auto ; border : 2 rpx solid red ; } .move_item { opacity: 0.7 ; background : red ; border-radius: 50% ; } |
JS:
Page({ data: { width: 100, height: 100, length: 50, x: 22, y: 22, }, onLoad: function (options) { }, tapHandler: function () { this .setData({ width: 300, height: 300, x: 111, y: 111 }) }, )} |
有官方能看下嘛?