资讯中心

页面自适应

📅 2026/9/26 18:57:46
页面自适应
1. 安装autofit.js组件npmi autofit.js在App.vue中编辑templatetransitionnamefaderouter-view/router-view/transition/templatescriptimportautofit fromautofit.jsexportdefault{mounted(){this.$nextTick((){autofit.init({el:body, dw:1920, dh:1080, resize:true})})}}/script2. 安装auto-elementui组件npminstallauto-element-S在main.js中编辑importAutoElement fromauto-elementVue.use(AutoElement,{offset:body})

看完文章,想为自己的企业也做一次专业网站诊断?

尧图顾问免费为您评估现有网站,并给出建站/改版建议与报价方案。

免费获取方案