main全局引入
import mixin from './mixins/mixin'
Vue.mixin(mixin)
import { stages } from '../config' export default { methods: { jumpToStage (stage, param) { param ? this.$router.push({name: stages[stage + 2], params: param}) : this.$router.push({name: stages[stage + 2]}) }, downloadFile (target) { let iframe = document.getElementById('iframe_used_to_downloadFile') if (!iframe) { iframe = document.createElement('iframe') iframe.id = 'iframe_used_to_downloadFile' iframe.style.display = 'none' document.body.appendChild(iframe) } iframe.src = target } } }