props.js 690 B

12345678910111213141516171819202122232425262728293031323334
  1. import { defineProps } from '../../libs/util/props';
  2. export default defineProps('canvas', {
  3. // 宽度
  4. width: {
  5. type: [Number, String],
  6. default: 375
  7. },
  8. // 高度
  9. height: {
  10. type: [Number, String],
  11. default: ''
  12. },
  13. // canvas类型
  14. type: {
  15. type: String,
  16. // #ifdef MP-WEIXIN || MP-TOUTIAO
  17. default: '2d',
  18. // #endif
  19. //#ifndef MP-WEIXIN || MP-TOUTIAO
  20. default: 'webgl',
  21. // #endif
  22. },
  23. // 是否禁用滚动
  24. disableScroll: {
  25. type: Boolean,
  26. default: false
  27. },
  28. // 是否启用高清
  29. hidpi: {
  30. type: Boolean,
  31. default: true
  32. }
  33. })