| | |
| | | <script> |
| | | export default { |
| | | name: 'BaseOpera', |
| | | data () { |
| | | return { |
| | | title: '', |
| | |
| | | if (extParams.api == null) { |
| | | throw new Error('Missing config option \'api\'.') |
| | | } |
| | | if(extParams.api.indexOf('@/') ==-1){ |
| | | this.api = require('@/api' + extParams.api) |
| | | }else{ |
| | | if(extParams.api.indexOf('@/',0) === 0){ |
| | | this.api = require(extParams.api) |
| | | }else { |
| | | this.api = require('@/api' + extParams.api) |
| | | } |
| | | extParams['field.id'] && (this.configData['field.id'] = extParams['field.id']) |
| | | }, |
| | |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |