Coder Social home page Coder Social logo

Comments (3)

alamhubb avatar alamhubb commented on May 14, 2024
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.

alamhubb avatar alamhubb commented on May 14, 2024
transpileDependencies:['uni-simple-router']

vue.config.js添加这行代码 解决了问题

from uni-simple-router.

jianzi0307 avatar jianzi0307 commented on May 14, 2024

使用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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.