admin 发布的文章
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- 阅读剩余部分 -
利用device-pixel-ratio单独适配像素比@media all
and (-moz-min-device-pixel-ratio: 1.09) and (-moz-max-device-pixel-ratio: 1.18),
(-webkit-min-device-pixel-ratio: 1.09) and (-webkit-max-device-pixel-ratio: 1.18),
(min-resolution: 1.09dppx) and (max-resolution: 1.18dppx) {
:root {
- 阅读剩余部分 -
首先安装vue-i18n包新建locales/i18n.js文件/**
* Created by liweiliang 406320591@QQ.com on 2022/10/14 15:16.
*/
import Vue from "vue";
import VueI18n from "vue-i18n";
import elementZhLocale from "element-ui/lib/locale/lang/zh-CN"; // element-ui lang
import elementEnLoc- 阅读剩余部分 -
- « 前一页
- 1
- ...
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- ...
- 75
- 后一页 »