card.js 476 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @fileoverview card 组件
  3. */
  4. Component({
  5. properties: {
  6. mode: {
  7. type: Boolean,
  8. default: false
  9. },
  10. src: String,
  11. title: String,
  12. desc: String,
  13. url: String,
  14. color: String,
  15. bgcolor: String,
  16. border: String
  17. },
  18. data: {},
  19. methods: {
  20. onClick (e) {
  21. if (this.properties.url && this.properties.url.trim().length > 6 && !this.properties.mode) {
  22. wx.navigateTo({ url: this.properties.url })
  23. }
  24. }
  25. }
  26. })