qq.js 597 B

1234567891011121314151617181920212223242526272829303132
  1. Component({
  2. properties: {
  3. // changyouhuashi | gift
  4. name: {
  5. type: String,
  6. },
  7. // string | string[]
  8. color: {
  9. type: null,
  10. observer: function(color) {
  11. this.setData({
  12. isStr: typeof color === 'string',
  13. });
  14. }
  15. },
  16. size: {
  17. type: Number,
  18. value: 18,
  19. observer: function(size) {
  20. this.setData({
  21. svgSize: size / 750 * qq.getSystemInfoSync().windowWidth,
  22. });
  23. },
  24. },
  25. },
  26. data: {
  27. svgSize: 18 / 750 * qq.getSystemInfoSync().windowWidth,
  28. quot: '"',
  29. isStr: true,
  30. },
  31. });