会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
东城以东
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2022年1月2日
vue3 setup方法
摘要: setup 组合式API 官方定义:通过创建 Vue 组件,我们可以将界面中重复的部分连同其功能一起提取为可重用的代码段。仅此一项就可以使我们的应用在可维护性和灵活性方面走得相当远。然而,我们的经验已经证明,光靠这一点可能并不够,尤其是当你的应用变得非常大的时候——想想几百个组件。处理这样的大型应用
阅读全文
posted @ 2022-01-02 23:20 王小美丶
阅读(1427)
评论(0)
推荐(0)
2021年12月26日
vue 3 Teleport
摘要: 我们在做vue2项目的时候,往往弹窗设置都挺负责的需要各种z-indx,而vue3推荐的做法是使用Teleport <!-- index.html--> <body> <div id="app"></div> <div id="teleport-target"></div> <script type
阅读全文
posted @ 2021-12-26 11:26 王小美丶
阅读(214)
评论(0)
推荐(0)
2021年12月20日
vue3 $parent获取父组件的方法和值
摘要: import { defineAsyncComponent, ref, provide } from 'vue'; // 父组件 const emit = defineAsyncComponent(() => import('../../components/edit/index.vue')) co
阅读全文
posted @ 2021-12-20 22:28 王小美丶
阅读(7881)
评论(0)
推荐(1)
2021年12月15日
echart立体柱状图
摘要: var MyCubeRect = echarts.graphic.extendShape({ shape: { x: 0, y: 0, }, buildPath: function (ctx, shape) { const api = shape.api; const xAxisPoint = ap
阅读全文
posted @ 2021-12-15 15:31 王小美丶
阅读(553)
评论(0)
推荐(0)
2021年12月12日
vue项目打包压缩
摘要: vue项目打包压缩 vue-cli-service build --report 打包完成会产生report.html 通过这个文件可以得知项目体积以及个个依赖大小,打包完成后开启nginx压缩 安装压缩包 npm i compression-webpack-plugin -D vue.config
阅读全文
posted @ 2021-12-12 15:04 王小美丶
阅读(1113)
评论(0)
推荐(0)
2021年12月1日
async错误处理
摘要: (async () => { const fetchData = () => { return new Promise((resolve, reject) => { setTimeout(() => { resolve('fetch data is me') }, 1000) }) } // 抽离成
阅读全文
posted @ 2021-12-01 18:05 王小美丶
阅读(415)
评论(0)
推荐(0)
2021年8月30日
解决代码中大量if/else
摘要: 在编写 JS 代码时,经常会遇到逻辑判断复杂的情况。一般情况下,可以用 if/else 或 switch 来实现多个条件判断,但会出现一个问题:随着逻辑复杂度的增加,代码中的 if/else 和 switch 会越来越臃肿 if (status == 1) { // 逻辑1 } else if (s
阅读全文
posted @ 2021-08-30 16:09 王小美丶
阅读(456)
评论(0)
推荐(0)
2021年8月18日
js数组对象去重求和
摘要: let newArr = [] allMonth.forEach(el=> { const res = newArr.findIndex(ol=> { return el.month ol.month; }); if (res !== -1) { newArr[res].value = newArr
阅读全文
posted @ 2021-08-18 16:53 王小美丶
阅读(331)
评论(0)
推荐(0)
2021年6月8日
下拉搜索框(兼容ie8)
摘要: github上找到的然后自己稍微改了一下,省的后面要找找不到 地址 // 搜索下拉框 var flag = true ; (function(root, factory) { if (typeof exports 'object') { //umd module.exports =factory($
阅读全文
posted @ 2021-06-08 17:21 王小美丶
阅读(160)
评论(0)
推荐(0)
2021年3月31日
小程序App ios底部黑线遮挡问题
摘要: 只需要加上这几个css就好了 bottom: 0; box-sizing: content-box; padding-bottom: constant(safe-area-inset-bottom); // 自定义导航解决ios底部黑线问题 padding-bottom: env(safe-area
阅读全文
posted @ 2021-03-31 15:57 王小美丶
阅读(401)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告