![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
使用
weixin_46192081
这个作者很懒,什么都没留下…
展开
-
在业务中如何做到在search搜索框中查找推荐处高亮显示
在业务中如何做到在search搜索框中查找高亮显示? 我们通常会使用字符串替换的方式来做到高亮的效果 "iphone12" ------> '<span style="color:red">iph</span>one12' function f (源字符串,要高亮的片段) {} var str = 'iphone12', var keyword = 'iph' f(str, keyword) ===> '<span style="color:red"&原创 2021-06-12 20:10:58 · 152 阅读 · 0 评论 -
什么是防抖节流以及使用
什么是防抖? 代码书写 什么是节流? 代码书写原创 2021-06-12 19:59:14 · 134 阅读 · 0 评论 -
Vuex-map函数用法
如何使用全局state 1.直接使用: this.$store.state.; 2.map辅助函数: computed: { ...mapState(['xxx']), ...mapState({'新名字': 'xxx'}) } 如何使用modules中的 1.直接使用: this.$store.state.模块名.xxx; 2.map辅助函数: computed: { ...mapState('模块名', ['xxx']), ...mapState...原创 2021-06-06 20:55:22 · 1002 阅读 · 3 评论 -
Vuex中内容作用语法等
Vuex - state 作用 : 用来保存公共数据 定义sh原创 2021-06-06 20:45:10 · 80 阅读 · 0 评论 -
如何在项目中使用Vuex
老项目中使用 在老项目中 使用vuex 需要下载vuex包 步骤:原创 2021-06-06 18:16:49 · 177 阅读 · 0 评论