| | |
| | | <script> |
| | | import func from "@/util/func"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {doAction} from '@/actions/base/BaseAction'; |
| | | |
| | | export default { |
| | | name: "dynamic-button", |
| | |
| | | this.$refs.dynamicForm.form = row; |
| | | }, |
| | | buttonClick(item) { |
| | | // 根据 type 条件动态引入不同的JS文件,并传递 item this 参数 |
| | | if (this.type === 'table') { |
| | | import('@/views/base/buttonTable').then(module => { |
| | | const buttonClickTable = module.default; |
| | | buttonClickTable.buttonClick(item,this); |
| | | }) |
| | | } else if (this.type === 'form') { |
| | | import('@/views/base/buttonForm').then(module => { |
| | | const buttonClickForm = module.default; |
| | | buttonClickForm.buttonClick(item,this); |
| | | }) |
| | | } |
| | | doAction(item,{ |
| | | paramVOS: item.paramVOS, |
| | | dataStore: [], |
| | | sourceData: {}, |
| | | callback: function (){ |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | } |