会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Mica's blog
My only resume:
`Mica`s resume`
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
13
下一页
2021年11月19日
js map遍历与promise一起使用会出现的问题,以及解决方案
摘要: 开篇解释一下async /await 与 Primise的关系 async/await是Promise的语法糖所以这里我会直接使用async/await替换Promise let result = await func() // => 等价于 func().then(result => { // c
阅读全文
posted @ 2021-11-19 14:23 Mica
阅读(3877)
评论(2)
推荐(2)
2021年5月11日
Vue3 getCurrentInstance与ts结合使用的问题
摘要: 关于Vue3里面的getCurrentInstance:可以获取挂载在全局的属性和获取上下文 这里会碰到几个问题: 一、不能使用getCurrentInstance的ctx 我们在获取Vue3中全局挂载的方法时会这么写: 这里的ctx不是setup提供的ctx const { ctx } = get
阅读全文
posted @ 2021-05-11 17:32 Mica
阅读(7700)
评论(2)
推荐(3)
Vue3 更改setup中定义的值不渲染到视图上【Vue2.x向Vue3.x的迁移(踩坑)日记】
摘要: 最近用vue3 重构vue2.x的项目,真是一坑未平,一波又起,话不多说 上代码 <template> <div>{{ loadingStatus }}</div> </template> ... setup(props, context) { // @ts-ignore const { proxy
阅读全文
posted @ 2021-05-11 15:47 Mica
阅读(2417)
评论(0)
推荐(0)
Vue3 中组件传值emit【Vue2.x向Vue3.x的迁移日记】
摘要: 子组件 child.vue <template> <div> <p>hello world</p> <button @click="handleClick">click</button> </div> </template> <script lang="ts"> import { defineCom
阅读全文
posted @ 2021-05-11 15:14 Mica
阅读(1029)
评论(0)
推荐(0)
2021年2月23日
vue js 模糊匹配搜索查询
摘要: 大家应该平时涉及到查询基本上都是调用后端接口就完事,传入字符串~调用接口~返回数据~~~ 但是不少场景也需要前端自己做匹配查询 那么今天就简单做一个吧! 废话不多说 直接上代码: 1. 封装方法: export function filterSearch({ oldList = [], search
阅读全文
posted @ 2021-02-23 17:24 Mica
阅读(1435)
评论(0)
推荐(0)
2020年12月16日
uniapp支付宝小程序上传图片转base64
摘要: 最近使用uniapp涉及到一个上传图片的功能,原本看官方文档api觉得没问题,正常开发, 1. 首先微信端没问题 uni.getFileSystemManager().readFile({ filePath: url, //选择图片返回的相对路径 encoding: "base64", //编码格式
阅读全文
posted @ 2020-12-16 10:04 Mica
阅读(1628)
评论(0)
推荐(1)
2020年7月1日
input file禁用手机本地文件选择,只允许拍照上传图片 capture="camera"
摘要: <input type="file" accept="image/*" capture="camera"> <input type="file" accept="video/*" capture="camcorder"> <input type="file" accept="audio/*" cap
阅读全文
posted @ 2020-07-01 08:59 Mica
阅读(6995)
评论(0)
推荐(0)
2020年4月14日
Vue 锚点跳转双向绑定监听滚动
摘要: 最近碰到一个常见的需求,今天来整理一下思路 点击锚点 页面滚动到指定位置,这个很常见 当需要滚动页面的时候 点击栏(菜单栏) 同步展示高亮 这个怎么完成呢? 话不多说 贴代码 1. 这是头部点击跳转部分 <template> <div class="privilege-head"> <ul> <li
阅读全文
posted @ 2020-04-14 17:36 Mica
阅读(3255)
评论(0)
推荐(1)
2019年12月9日
三种动态加载js的jquery实例代码另附去除js方法
摘要: !-- 这里为你提供了三种动态加载js的jquery实例代码哦,由于jquery是为用户提供方便的,所以利用jquery动态加载文件只要一句话$.getscript("test.js");就ok了。 <!doctype html public "-//w3c//dtd xhtml 1.0 trans
阅读全文
posted @ 2019-12-09 09:18 Mica
阅读(894)
评论(0)
推荐(0)
2019年12月5日
JS 一位数左边补零
摘要:
阅读全文
posted @ 2019-12-05 09:34 Mica
阅读(3555)
评论(0)
推荐(0)
1
2
3
4
5
···
13
下一页
公告