MrShi
2 天以前 39fc2d6754953e41a7334a2166347baacfcfb40a
admin/src/components/base/BaseOpera.vue
@@ -1,6 +1,5 @@
<script>
export default {
  name: 'BaseOpera',
  data () {
    return {
      title: '',
@@ -33,7 +32,11 @@
      if (extParams.api == null) {
        throw new Error('Missing config option \'api\'.')
      }
      this.api = require('@/api' + extParams.api)
      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'])
    },
    /**
@@ -88,7 +91,7 @@
            this.$emit('success')
          })
          .catch(e => {
            this.$tip.apiFailed(e)
            // this.$tip.apiFailed(e)
          })
          .finally(() => {
            this.isWorking = false
@@ -110,7 +113,7 @@
            this.$emit('success')
          })
          .catch(e => {
            this.$tip.apiFailed(e)
            // this.$tip.apiFailed(e)
          })
          .finally(() => {
            this.isWorking = false