2022年12月

let url = window.URL.createObjectURL(new Blob([文件流(一般为res.data)], { type: 'Blob类型' })) let link = document.creatElement('a') // 创建a标签来下载 link.style.display = 'none' link.href = url link.setAttribute('download', '下载的文件名') document.body.appendChild(link) link.click() document.body.removeChil- 阅读剩余部分 -

最近在把vue2升级vue3过程中遇到了各种bug,这次遇到了在vue2中父子传参的过程中发现showSearch数据不更新问题父组件引用 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> 子组件 this.$emit("update:showSearch", !this.showSearch); 我们需要吧父组件改成v-model:value="value" 模式<r- 阅读剩余部分 -

<svg-icon icon-class="clipboard" class-name="disabled" /> 经过分析是少了个解析插件 svg-sprite-loader ,用npm安装一下,然后需要在vue.config.js中添加配置'use strict' const path = require('path') function resolve(dir) { return path.join(__dirname, dir) } chainWebpack: config => { config- 阅读剩余部分 -