index.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { checkVisual } from "@/views/event/components/details/mixins";
  2. export default {
  3. mixins: [checkVisual],
  4. props: {
  5. tableData: {//数据
  6. type: Array,
  7. default: () => {
  8. return [{ name: '123', eventNumber: '手机', projectNumber: '专利数据库一', projectNumber1: [{ name: '事件一' }] },]
  9. }
  10. },
  11. queryParams: {//分页信息
  12. type: Object,
  13. default: () => {
  14. return {
  15. size: 10,
  16. current: 1,
  17. }
  18. }
  19. },
  20. },
  21. computed: {
  22. },
  23. methods: {
  24. // 点击名称等事件
  25. handleItem(row, key) {
  26. },
  27. //操作列事件
  28. handleCommand(option, row) {
  29. if (option == 'e') {//编辑
  30. this.action={
  31. type:'2',
  32. id:row.id
  33. }
  34. }
  35. var isLast = false
  36. if (option == '7') {//删除
  37. this.action={
  38. type:'1',
  39. id:row.id
  40. }
  41. if(this.tableData.length == 1){
  42. isLast = true
  43. }
  44. }
  45. this.$emit('option', { option, row ,isLast:isLast})
  46. },
  47. },
  48. }