BillBie

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

05 2022 档案

vue input中会被自动填充数据
摘要:vue3: autocomplete="new-password":readonly="readonly"@blur="readonly = true"@click="readonly = false" 参考自:https://blog.csdn.net/qq_40572419/article/de 阅读全文

posted @ 2022-05-26 19:03 BillBie 阅读(443) 评论(0) 推荐(0) 编辑

vue 的toast组件
摘要:直接使用第三方库:https://github.com/Maronato/vue-toastification 1.npm install --save vue-toastification@next2.在main.js导入和使用 import Toast from "vue-toastificat 阅读全文

posted @ 2022-05-20 00:51 BillBie 阅读(584) 评论(0) 推荐(0) 编辑

vue 同一个组件下路由不同的数据刷新操作
摘要:参考官方文档:https://router.vuejs.org/zh/guide/essentials/dynamic-matching.html#%E5%93%8D%E5%BA%94%E8%B7%AF%E7%94%B1%E5%8F%82%E6%95%B0%E7%9A%84%E5%8F%98%E5% 阅读全文

posted @ 2022-05-18 13:49 BillBie 阅读(309) 评论(0) 推荐(0) 编辑

better-scroll 如果无法滚动,则应该是父级元素的样式问题
摘要: 阅读全文

posted @ 2022-05-17 14:19 BillBie 阅读(10) 评论(0) 推荐(0) 编辑

better-scroll 禁用了鼠标滑动和点击
摘要:mouseWheel: true 改为true click:true 阅读全文

posted @ 2022-05-16 21:51 BillBie 阅读(170) 评论(0) 推荐(0) 编辑

css 图片包含在div中以及等比例缩放
摘要:img标签可设置 object-fit:属性 contain 会将所有包含进去缩放显示,此时注意设置width,height =100% cover 会自适应裁剪 想事项等比例缩放适应宽高,则参考文章:https://blog.csdn.net/IT_lukaifang/article/detail 阅读全文

posted @ 2022-05-15 15:14 BillBie 阅读(491) 评论(0) 推荐(0) 编辑

vue3定义全局变量方法变更及$on废弃
摘要:在vue2中,直接 Vue.prototype.$bus = new Vue() 但是在vue3中,方法改变了(因为$on方法的废弃,需要用到mitt) const app = createApp(App) app.config.globalProperties.$bus = new mitt(); 阅读全文

posted @ 2022-05-14 01:11 BillBie 阅读(1470) 评论(0) 推荐(0) 编辑

vue在子组件向父组件emit时,父组件会警告;
摘要:Extraneous non-emits event listeners (swiperimageload) were passed to component but could not be automatically inherited because component renders fra 阅读全文

posted @ 2022-05-14 00:55 BillBie 阅读(857) 评论(0) 推荐(0) 编辑

data动态获取props 中的数据
摘要:props是在开发时,预先设置好,传给组件的。在运行过程中,这些设置是一锤子买卖,以后就不起作用了。假如我们想调用该组件的一个方法,而该方法又依赖于props,问题就出来了:props是旧的。 在组件内部,应该依赖于data,而data的初始值来自于props 当前data 想从props 进行初始 阅读全文

posted @ 2022-05-12 11:37 BillBie 阅读(1128) 评论(0) 推荐(0) 编辑

js 中NaN 的特性
摘要:NaN 是一种数据类型,表明为 不是数字的类型 常出现在 使用Number(),parseInt() 转换为数字中,当不是数字时,则返回NaN 在实际应用中 需要判断能否转换成功,无法使用。xx NaN 的方式,因为都是返回false js提供了一个方法:isNaN 阅读全文

posted @ 2022-05-10 23:43 BillBie 阅读(190) 评论(0) 推荐(0) 编辑

vue3文件中 scoped 的作用及穿透
摘要:在vue文件中的style标签上,有一个特殊的属性:scoped。当一个style标签拥有scoped属性时,它的CSS样式就只能作用于当前的组件,也就是说,该样式只能适用于当前组件元素。通过该属性,可以使得组件之间的样式不互相污染。如果一个项目中的所有style标签全部加上了scoped,相当于实 阅读全文

posted @ 2022-05-10 22:40 BillBie 阅读(740) 评论(0) 推荐(0) 编辑

css 设置文本 水平垂直居中
摘要:display: flex;justify-content: center;align-items: center; 阅读全文

posted @ 2022-05-10 18:41 BillBie 阅读(21) 评论(0) 推荐(0) 编辑

git 常见命令
摘要:git remote rm origin -- 删除远程仓库 remote add origin 仓库地址 -- 新增远程仓库 git commit -m 'update' --提交 git push -u origin master -- push到远程仓库 阅读全文

posted @ 2022-05-10 13:40 BillBie 阅读(10) 评论(0) 推荐(0) 编辑

vue中axios跨域问题
摘要:在新版本的vue中使用的是和package.json同级别路径中的vue.config.js module.exports = { devServer: { proxy: 'https://api.xxx.com/v1' }} 转载自:https://blog.csdn.net/lpwmm/arti 阅读全文

posted @ 2022-05-10 10:52 BillBie 阅读(26) 评论(0) 推荐(0) 编辑

vuex 中异步请求和同步请求更改store
摘要:同步请求使用:mutations mutations: { increment(state){ state.counter++ }, incrementcounter(state,count){ state.counter+=count }, addper(state,student){ state 阅读全文

posted @ 2022-05-09 21:57 BillBie 阅读(803) 评论(0) 推荐(0) 编辑

vue3 slot具名插槽需要使用v-slot
摘要:在vue 2.x中 <template> <div class="tab-bar-item" @click="btnclick"> <div><slot name="item1"></slot></div> <div><slot name="item2"></slot></div> </div></ 阅读全文

posted @ 2022-05-08 15:00 BillBie 阅读(289) 评论(0) 推荐(0) 编辑

vue-router4 中router-link,tag(v3)相关应用
摘要:在vue-router 3.x中,router-link标签中会被渲染为a标签,实际应用中,有可能需要将a标签改为其它标签 可以使用tag="button"这种方式, 但是在vue-router 4.x中,移除了tag,为了实现这样的效果, <router-link to="/home" custo 阅读全文

posted @ 2022-05-05 15:32 BillBie 阅读(315) 评论(0) 推荐(0) 编辑

webpack编译vue时vue-loader 和 vue-template-compiler 问题
摘要:在使用webpack编译vue 时,需要在npm 安装 vue-template-compiler和vue-loader,此时出现过这样的问题 之前未注意安装顺序,都安装成功了,但是编译时,提示保存 TypeError: compiler.parseComponent is not a functi 阅读全文

posted @ 2022-05-04 12:37 BillBie 阅读(1062) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示