Replies: 1 comment 1 reply
-
CLI 和项目依赖都升级到最新版本试试 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
打包成h5后,路由跳转报错:
app.979e9.js:formatted:5733 Uncaught ReferenceError: Taro is not defined
我的navTo方法如下
import { navigateTo } from "@tarojs/taro"; export const navTo = (url: string, linkText?: string): void => { let fixurl = url; const isSecret = url.startsWith("/pages"); const isHTTP = url.startsWith("http"); if (isSecret) { fixurl =
${window.location.origin}${BASE_URL}${url}; } else if (!isHTTP) { fixurl =
${window.location.origin}${url}; } if (isSecret) { navigateTo({ url }); } else { window.location.href = fixurl; } };
不知道大家有没有遇到过
Beta Was this translation helpful? Give feedback.
All reactions