Tag: JavaScript
All the articles with the tag "JavaScript".
Vue3 中使用 keep-alive 组件报错:TypeError: parentComponent.ctx.deactivate is not a function 的解决方法
Published: at 07:54 PMVue3 使用 keep-alive 组件时,切换页面报错 TypeError: parentComponent.ctx.deactivate is not a function。文章提供了解决方案:在 keep-alive 和 component 上设置 key 属性进行排序,并附带相关参考文章链接。
JS 将 JSON 格式文件导出为 XLSX 格式文件
Published: at 05:51 PMJavaScript 将 JSON 数据导出为 XLSX 格式文件的几种实现方法,包含简单实现和较为完善的实现,并附带相关资源链接。
Vant 样式覆盖问题及解决方法
Published: at 05:44 PM解决 Vant 组件按需导入导致自定义样式覆盖无效的问题。文章详细介绍了通过全局导入 Vant 样式来解决此问题的方法,并分析了按需导入与全局导入在样式优先级上的差异。
Vue 移动端适配方案
Published: at 05:30 PM本文介绍两种 Vue 移动端适配方案:rem 方案和 viewport 方案,并讲解了如何结合使用以及解决 dpr 引发的字体大小问题。包括 `amfe-flexible`、`postcss-pxtorem`和`postcss-px-to-viewport` 的使用方法和配置。