index.js 980 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. var _component = require("../common/component");
  3. (0, _component.VantComponent)({
  4. classes: ["avatar-class", "title-class", "row-class"],
  5. props: {
  6. row: {
  7. type: Number,
  8. value: 0,
  9. observer: function observer(value) {
  10. this.setData({
  11. rowArray: Array.from({
  12. length: value
  13. })
  14. });
  15. }
  16. },
  17. title: Boolean,
  18. avatar: Boolean,
  19. loading: {
  20. type: Boolean,
  21. value: true
  22. },
  23. animate: {
  24. type: Boolean,
  25. value: true
  26. },
  27. avatarSize: {
  28. type: String,
  29. value: "32px"
  30. },
  31. avatarShape: {
  32. type: String,
  33. value: "round"
  34. },
  35. titleWidth: {
  36. type: String,
  37. value: "40%"
  38. },
  39. rowWidth: {
  40. type: null,
  41. value: "100%",
  42. observer: function observer(val) {
  43. this.setData({
  44. isArray: val instanceof Array
  45. });
  46. }
  47. }
  48. },
  49. data: {
  50. isArray: false,
  51. rowArray: []
  52. }
  53. });