Comments (3)
const createElement=function({tag,attrs,children}={}){
// const $el = document.createElement(tag);
const $el = '';
/*for (const [k, v] of Object.entries(attrs)) {
$el.setAttribute(k, v);
}
for (const item of children) {
$el.appendChild(render(item));
}*/
return $el;
}
appendHTML(resolve) {
/*// #ifdef H5
window.addEventListener('DOMContentLoaded', () => {
const body = document.querySelector('body');
body.appendChild(html.style);
body.appendChild(html.DOM);
body.appendChild(html.script);
this.toogle('startLodding',true);
})
// #endif*/
resolve()
}
这些代码注释掉就可以用了,并且关掉了小程序的 es6转es5
from uni-simple-router.
transpileDependencies:['uni-simple-router']
vue.config.js添加这行代码 解决了问题
from uni-simple-router.
使用uniapp开发微信小程序,碰到同样的问题,
VM3845 WAService.js:1 Uncaught ReferenceError: regeneratorRuntime is not defined
at hooks.js:62
at Module.<anonymous> (hooks.js:125)
at __webpack_require__ (bootstrap:91)
at Module.<anonymous> (index.js:1)
at Module.<anonymous> (index.js:282)
at __webpack_require__ (bootstrap:91)
at Object.<anonymous> (index.js:2)
at __webpack_require__ (bootstrap:91)
at Object.<anonymous> (main.js:8)
at Object.<anonymous> (main.js:21)
关掉微信开发者工具中的 “ES6转ES5”会报
VM3889 WAService.js:1 Uncaught TypeError: Cannot read property 'createElement' of undefined
at createElement (h5-dom.js:4)
at Module.<anonymous> (h5-dom.js:29)
at __webpack_require__ (bootstrap:89)
at Module.<anonymous> (h5-patch.js:1)
at __webpack_require__ (bootstrap:89)
at Module.<anonymous> (index.js:1)
at Module.<anonymous> (index.js:282)
at __webpack_require__ (bootstrap:89)
at Object.<anonymous> (index.js:1)
at __webpack_require__ (bootstrap:89)
在vue.config.js中添加
transpileDependencies:['uni-simple-router']
也没有解决问题。
请问作者,uni-simple-router 是否支持“微信小程序”,是只面向h5的吗?
from uni-simple-router.
Related Issues (20)
- 完全使用vue-router开发模式下,组件内调用uni.createSelectorQuery()方法报错 HOT 2
- Vue3+Vite支持 HOT 4
- h5项目,路由模式为history,页面跳转正常,但地址栏不再有任何变化,并且控制台报了一个错误 HOT 5
- 网站无法访问 HOT 1
- url传参“/?a=value&b=value2”如果以“&”结尾,路由报错 HOT 1
- web-view不能跳转 HOT 1
- 小程序点击回到首页按钮不触发beforeEach守卫 HOT 1
- 能支持vue3 吗 HOT 4
- 关于支持 vue3 及 vite 的可用版本 HOT 6
- vue3
- H5没有上级页面时,点击导航栏的返回,返回拦截不起作用 HOT 1
- 快手小程序无法正常跳转 HOT 2
- 第三方H5回退会触发 uni-app afterEach HOT 2
- 使用自定义custom-tab-bar 路由监听不到 HOT 3
- h5配置aliasPath无法重定向路由 HOT 1
- uniapp 回退到上一个页面偶现当前页面无法释放 HOT 3
- app端在全局路由前置守卫使用uni.navigateTo不生效 HOT 1
- 循环调用 notRouteTo404 和 navjump HOT 1
- 使用路由守卫功能,点击返回,标题显示错误 HOT 2
- 希望支持快手小程序 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uni-simple-router.