会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lengfang
博客园
首页
新随笔
联系
订阅
管理
2022年10月28日
vue 封装带图标的标题组件
摘要: 效果图: com-item-title.vue组件 <template> <div class="com-item-title"> <div class="com-item-box flex-center-center"> <div class="com-item-cont"> <div class
阅读全文
posted @ 2022-10-28 17:36 性野喜悲
阅读(163)
评论(0)
推荐(0)
2022年10月17日
vue接口请求(get和post)
摘要: get 路由带参数(无参数也参照此写法,替换接口地址就行) this.axios({ method: 'get', headers: { 'Content-Type': 'application/json; charset=utf-8', token: this.answerData.token,/
阅读全文
posted @ 2022-10-17 11:52 性野喜悲
阅读(208)
评论(0)
推荐(0)
2022年8月25日
vue使用rem (手机端PC端通用)
摘要: 只有PC端时 main.js new Vue({ router, store, render: h => h(App), created(){ // 实例创建完成后被立即调用rem换算方法,解决内容闪现问题 setRemPc(); window.addEventListener('resize',
阅读全文
posted @ 2022-08-25 10:26 性野喜悲
阅读(379)
评论(0)
推荐(0)
2022年8月23日
vue 背景图片铺满整个屏幕(适配所有机型)
摘要: 固定一屏大小,内容超出一屏会显示不全,不可滚动查看内容 html: <div id="home"></div> css: <style> #home { width: 100%; height: 100vh; background: url("~@/images/home/h_bg.png") ce
阅读全文
posted @ 2022-08-23 10:53 性野喜悲
阅读(1443)
评论(0)
推荐(0)
2022年8月19日
nuxt.js切换路由滚动至页面顶部
摘要: 自己新建的vue-inject.js // 自定义滚动到顶部 Vue.prototype.customScrollTop = () => { const layout = document.getElementById("__layout"); layout.scrollTo({ top: 0, b
阅读全文
posted @ 2022-08-19 10:26 性野喜悲
阅读(170)
评论(0)
推荐(0)
公告