SilurianYang / uni-simple-router

A simple, lightweight 'uni-app' routing plugin
https://v2.hhyang.cn/v2/
MIT License
749 stars 163 forks source link

typescript+vuecli报错TypeError: Cannot read properties of null (reading 'replace') #406

Closed xieyu376 closed 2 years ago

xieyu376 commented 2 years ago

问题描述 image image

复现步骤 [复现问题的步骤]

  1. router.ts如下 image

2.pages.json如下 image

系统信息:

补充信息 image

xieyu376 commented 2 years ago

解决了,main.ts里要这样 image ,不能全按照文档说明的这种 const app = new Vue({ ...App }) 写法来

szq233 commented 2 years ago

好家伙,原来是这样解决的!

348800199 commented 2 years ago

good job

hewson99 commented 2 years ago

为啥我在router.ts ROURES未定义 编译不过

imaxing commented 2 years ago

我这么写不得行, 还是报错

image

image


已解决:

image