Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-12-26 15:52:18 +08:00
10 changed files with 96 additions and 31 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ export default createComponent({
const style = {};
const { vertical } = parent.props;
style[vertical ? 'height' : 'width'] = `${parent.size.value}px`;
if (parent.size.value) {
style[vertical ? 'height' : 'width'] = `${parent.size.value}px`;
}
if (state.offset) {
style.transform = `translate${vertical ? 'Y' : 'X'}(${state.offset}px)`;