You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
641 B

  1. <template>
  2. <view>
  3. <view class="r-canvas-component" :style="{width:canvas_width/scale+'px',height:canvas_height/scale+'px'}" :class="{'hidden':hidden}">
  4. <canvas class="r-canvas" v-if="canvas_id" :canvas-id="canvas_id" :id="canvas_id" :style="{width:canvas_width+'px',height:canvas_height+'px','transform': `scale(${r_canvas_scale})`}"></canvas>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import rCanvasJS from "./r-canvas.js"
  10. export default {
  11. mixins:[rCanvasJS]
  12. }
  13. </script>
  14. <style>
  15. .r-canvas{
  16. transform-origin: 0 0;
  17. }
  18. .r-canvas-component{
  19. overflow: hidden;
  20. }
  21. .r-canvas-component.hidden{
  22. position: fixed;
  23. top:-5000upx;
  24. }
  25. </style>