Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 1 Jahr
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import baseComponent from '../helpers/baseComponent'
  2. import classNames from '../helpers/classNames'
  3. baseComponent({
  4. relations: {
  5. '../row/index': {
  6. type: 'parent',
  7. },
  8. },
  9. properties: {
  10. prefixCls: {
  11. type: String,
  12. value: 'wux-col',
  13. },
  14. span: {
  15. value: 0,
  16. type: Number,
  17. },
  18. offset: {
  19. value: 0,
  20. type: Number,
  21. },
  22. pull: {
  23. value: 0,
  24. type: Number,
  25. },
  26. push: {
  27. value: 0,
  28. type: Number,
  29. },
  30. },
  31. data: {
  32. colStyle: '',
  33. },
  34. computed: {
  35. classes: ['prefixCls, span, offset, pull, push', function(prefixCls, span, offset, pull, push) {
  36. const wrap = classNames(prefixCls, {
  37. [`${prefixCls}--span-${span}`]: span,
  38. [`${prefixCls}--offset-${offset}`]: offset,
  39. [`${prefixCls}--pull-${pull}`]: pull,
  40. [`${prefixCls}--push-${push}`]: push,
  41. })
  42. return {
  43. wrap,
  44. }
  45. }],
  46. },
  47. methods: {
  48. updateStyle(colStyle) {
  49. if (this.data.colStyle !== colStyle) {
  50. this.setData({
  51. colStyle,
  52. })
  53. }
  54. },
  55. },
  56. })