74779191a1fb58e4922de0942fe9315775f945da.svn-base 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import JVxeCellMixins from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins'
  2. // 插槽
  3. export default {
  4. name: 'JVxeSlotCell',
  5. mixins: [JVxeCellMixins],
  6. computed: {
  7. slotProps() {
  8. return {
  9. value: this.innerValue,
  10. row: this.row,
  11. column: this.originColumn,
  12. params: this.params,
  13. $table: this.params.$table,
  14. rowId: this.params.rowid,
  15. index: this.params.rowIndex,
  16. rowIndex: this.params.rowIndex,
  17. columnIndex: this.params.columnIndex,
  18. target: this.renderOptions.target,
  19. caseId: this.renderOptions.target.caseId,
  20. scrolling: this.renderOptions.scrolling,
  21. reloadEffect: this.renderOptions.reloadEffect,
  22. triggerChange: (v) => this.handleChangeCommon(v),
  23. }
  24. },
  25. },
  26. render(h) {
  27. let {slot} = this.renderOptions
  28. if (slot) {
  29. return h('div', {}, slot(this.slotProps))
  30. } else {
  31. return h('div')
  32. }
  33. },
  34. // 【组件增强】注释详见:JVxeCellMixins.js
  35. enhanced: {
  36. switches: {
  37. editRender: false
  38. },
  39. }
  40. }
  41. // :isNotPass="notPassedIds.includes(col.key+row.id)"