使用vue-cli 3.0+Element-ui时候,调用form表单校验时候出现的问题是: Property 'validate' does not exist on type 'Element | Element[] | Vue | Vue[]'. Property 'validate' does not exist on type 'Element'. 解决方案 (this.$refs.form as any).validate((valid: boolean) => { if (vali
downloadFile(url, fileName) { axios.get(url, { responseType: 'blob' }) .then(({ data }) => { // 为了简单起见这里blob的mime类型 固定写死了 let type = 'application/pdf;' //'image/png' let blob = new Blob([data], { type: type }) let link = document.createElement('a');
错误如下: error in ./src/Utils.vue Module build failed: Error: Vue packages version mismatch: - vue@ - vue-template-compiler@ This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simpl