自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 Typescript+vite+element-plus按需引入后ElMessage报红问题

在使用ElMessage或ElMessageBox是vscode开发工具会报红,原因是找不到,但是页面能正常使用。

2022-08-17 17:50:37 2507 2

原创 vue3 element-plus按需引入(vite)优雅用法

一、安装相应依赖二、vite.config.js配置三、删除全局引入

2022-07-04 12:08:19 2664

原创 vue3+element-plus 报错:Cannot read properties of null (reading ‘insertBefore‘)

原因:el-table-column渲染时报错Error: Cannot read properties of null (reading 'insertBefore')<el-table-column align="center" :width="100" label="查看详情"> <template #default="scope"> <el-button v-if="scope.row.detail.length

2022-02-10 18:12:33 7167 1

原创 vue3 element-plus按需引入(webpack)优雅用法

1.安装npm install -D unplugin-vue-components unplugin-auto-import2.配置vue.config.js注意要放在configureWebpack里,不然会报错“plugins” is not allowed,这里官网未提示const AutoImport = require('unplugin-auto-import/webpack')const Components = require('unplugin-vue-components/w

2022-01-12 11:17:40 3718 3

原创 vue使用XSLX,用CDN引入后下载的excel文件无法打开的解决办法

使用npm打包的体积:引用cdn打包后的体积:使用npm安装在项目里下载的文件是没问题的,但发现了引入CDN后下载的文件无法打开;解决办法:查看node_modules里插件的readme文件,引入<script src="https://unpkg.com/xlsx/dist/xlsx.full.min.js"></script>问题解决。原因:之前引入的是应该引入带full的链接(xlsx.full.min.js)...

2022-01-10 12:04:28 1678

原创 vue使用CDN方式引入插件,优化加载速度

一、引入资源在index.html引入所需的CDN的资源链接<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script><script src="https://cdn.bootcdn.net/ajax/libs/axios/0.24.0/axios.min.js"></script><script src="https://cdn.bootcdn.

2022-01-06 17:35:57 1969 6

原创 微信小程序云开发-command指令

const db = wx.cloud.database();const _ = db.command;command 指令查询指令eq 严格相等,表示字段等于某值neq 严格不相等,表示字段不等于某值lt 表示小于某个值lte 表示小于等于某个值gt 表示大于某个值gte 表示大于等于某个值in 查询筛选条件,表示字段的值需在给定的数组内。 如:查找北京和上海的文章,article: _.in(["北京", "上海"]) and 查询指令,用于表示逻辑“与”的关系,表

2022-01-05 16:23:11 1385 1

原创 小程序开发工具代码保存编译后,程序没变

app.json里删除"lazyCodeLoading": “requiredComponents”解决问题。

2021-12-14 16:57:28 10049

原创 vue echarts5.0版本使用appendData大数据量分片加载60万个GPS点

需求:将大量GPS数据点渲染在中国地图上 (后续数据量可达百万级,目前未实验,国庆节以后再进行测试)数据格式: [[118.17681,39.66119], [117.88331, 33.195477], ...]echarts版本:5.0.2效果(10W)。渲染速度非常快,这与我们设置的large和largeThreshold有关;<script>// charts实例不要放在data里,echarts.init原型链绑一大堆对性能不友好let charts = null;

2021-09-30 21:07:18 3102 3

原创 Vue3.x的新特性

安装# 最新稳定版$ npm install vue@next# 最新版本的 @vue/cli:$ npm install -g @vue/cli@nextimport App from "./App.vue";// vue 2.xnew Vue({ el: '#app', render: (h) => h(App)});// vue 3.xcreateApp(App).mount("#app");

2021-03-26 10:42:56 376 3

转载 前端图片压缩

compression(file, size = 20, device = 4) { if (file[0]) { return Promise.all(Array.from(file).map(e => Vue.prototype.$compression(e, size))) // 如果是 file 数组返回 Promise 数组 } else { return new Promise((resolve) => {

2021-03-04 11:07:49 101 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除