import pages from "uni-pages?{\"type\":\"style\"}"
时间: 2023-08-22 07:04:53 浏览: 122
vite-plugin-pages:基于文件系统的Vite路由生成器
5星 · 资源好评率100%
代码"import pages from "uni-pages?{\"type\":\"style\"}"引用了一个名为pages的变量,该变量来自于文件pages.json中的代码段。在pages.json中,pages是一个数组,包含了多个页面对象。每个页面对象都有一个path属性,表示页面的路径。通过引入uni-pages插件,可以在uniapp小程序中使用这个pages变量来获取页面路径信息。在这段代码中,使用了uni-pages插件的"type":"style"参数,表示获取的是页面的样式信息。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [uni-app 中pages.json pages](https://blog.csdn.net/abcdebb/article/details/124145356)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [插件uni-simple-router,报错Error: /pages/error/* 路径无法在路由表中找到,检查跳转路径及路由表](https://blog.csdn.net/l2345432l/article/details/122898047)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文