摘要: 效果图: 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)
摘要: 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)
摘要: 只有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)
摘要: 固定一屏大小,内容超出一屏会显示不全,不可滚动查看内容 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)
摘要: 自己新建的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)