image.png

    1. /**
    2. * @param {Stage} stage
    3. */
    4. module.exports = (stage) => {
    5. console.log('----', stage);
    6. // 翻牌器
    7. const node = stage.get('number-title-flop_KrXYb');
    8. console.log('====', node);
    9. node.render([{ name: '', value: 123909789 }]);
    10. function strMatch(str) {
    11. const reg = /\d+/;
    12. return +str.match(reg)[0];
    13. }
    14. const eventComLeft = strMatch(node.container.parent().css("left"));
    15. const eventComTop = strMatch(node.container.parent().css("top"));
    16. console.log(eventComLeft);
    17. console.log(eventComTop);
    18. }

    stage对象
    image.png

    翻牌器组件对象
    image.png

    image.png

    image.png

    image.png