experience.js 535 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // components/jianli/experience.js
  2. import {
  3. imgServerUrl
  4. } from '../../config/config.js'
  5. Component({
  6. /**
  7. * 组件的属性列表
  8. */
  9. properties: {
  10. list: { //工作经历列表
  11. type: Array,
  12. value: []
  13. },
  14. edit: { // 是否可编辑
  15. type: Boolean,
  16. value: false
  17. }
  18. },
  19. /**
  20. * 组件的初始数据
  21. */
  22. data: {
  23. imgServerUrl
  24. },
  25. /**
  26. * 组件的方法列表
  27. */
  28. methods: {
  29. // 提交编辑事件
  30. edit(e) {
  31. const { index } = e.currentTarget.dataset;
  32. this.triggerEvent('edit', { index })
  33. }
  34. }
  35. })