index.wxs 506 Bytes
Newer Older
李嘉林 committed
1
/* eslint-disable */
程默 committed
2
var style = require('../wxs/style.wxs');
李嘉林 committed
3

程默 committed
4 5 6 7 8 9 10 11
function wrapStyle(data) {
  return style({
    transform: data.transform
      ? 'translate3d(0, ' + data.transform + 'px, 0)'
      : '',
    top: data.fixed ? data.offsetTop + 'px' : '',
    'z-index': data.zIndex,
  });
李嘉林 committed
12 13 14
}

function containerStyle(data) {
程默 committed
15 16 17 18
  return style({
    height: data.fixed ? data.height + 'px' : '',
    'z-index': data.zIndex,
  });
李嘉林 committed
19 20 21 22
}

module.exports = {
  wrapStyle: wrapStyle,
程默 committed
23
  containerStyle: containerStyle,
李嘉林 committed
24
};