index.wxs 506 B

123456789101112131415161718192021222324
  1. /* eslint-disable */
  2. var style = require('../wxs/style.wxs');
  3. function wrapStyle(data) {
  4. return style({
  5. transform: data.transform
  6. ? 'translate3d(0, ' + data.transform + 'px, 0)'
  7. : '',
  8. top: data.fixed ? data.offsetTop + 'px' : '',
  9. 'z-index': data.zIndex,
  10. });
  11. }
  12. function containerStyle(data) {
  13. return style({
  14. height: data.fixed ? data.height + 'px' : '',
  15. 'z-index': data.zIndex,
  16. });
  17. }
  18. module.exports = {
  19. wrapStyle: wrapStyle,
  20. containerStyle: containerStyle,
  21. };