GithubHelp home page GithubHelp logo

Comments (7)

ccqgithub avatar ccqgithub commented on July 20, 2024

vue版本号是多少, 配置runtimeOnly 为true还是false ?
还有,能贴一下具体报错信息么

from fis3-parser-vue-component.

imstone avatar imstone commented on July 20, 2024

OTS parsing error: invalid version tag
backend.js:1 [vue-devtools] Ready. Detected Vue v2.1.4

没有错误信息 貌似 直接忽略了,应该是不允许往tr里增加除了td之外其他的元素,但是webpack的loader可以

如果runtimeOnly 为true
则 下面

Cannot use as component root element because it may contain multiple nodes:

<slot></slot><table class="h2w-table" :class="h2wClasses">
    <thead>
        <tr>

        </tr>
    </thead>
    <tbody class="">
         <tr class="" v-for="item in data">
            <td v-for="td in item">{{td}}</td>
         </tr>
    </tbody>

</table>

[ERROR] parser.vue-component: Vue template compilation failed [/Users/ruixing/work/gerrit/yjs5-fe/src/h2w/packages/table/table.vue]

from fis3-parser-vue-component.

imstone avatar imstone commented on July 20, 2024

我在插件的86行

if (type == 'template') {
            console.log(node.content)
      content = parse5.serialize(node.content);
      console.log(content)

写了 输出

输出如下,发现吧slot挪到了外面

 { nodeName: '#document-fragment',
  quirksMode: false,
  childNodes:
   [ { nodeName: '#text',
       value: '\n',
       parentNode: [Circular],
       __location: [Object] },
     { nodeName: 'slot',
       tagName: 'slot',
       attrs: [],
       namespaceURI: 'http://www.w3.org/1999/xhtml',
       childNodes: [],
       parentNode: [Circular],
       __location: [Object] },
     { nodeName: 'table',
       tagName: 'table',
       attrs: [Object],
       namespaceURI: 'http://www.w3.org/1999/xhtml',
       childNodes: [Object],
       parentNode: [Circular],
       __location: [Object] },
     { nodeName: '#text',
       value: '\n',
       parentNode: [Circular],
       __location: [Object] } ],
  __location: null }

<slot></slot><table class="h2w-table" :class="h2wClasses">
    <thead>
        <tr>

        </tr>
    </thead>
    <tbody class="">
         <tr class="" v-for="item in data">
            <td v-for="td in item">{{td}}</td>
         </tr>
    </tbody>

</table>

from fis3-parser-vue-component.

ccqgithub avatar ccqgithub commented on July 20, 2024

知道问题出在哪了,会尽快修复。。

from fis3-parser-vue-component.

imstone avatar imstone commented on July 20, 2024

多谢!如果可以的还请尽快提交一下,正在赶需求列!
=。=

from fis3-parser-vue-component.

ccqgithub avatar ccqgithub commented on July 20, 2024

已修复:v5.1.0

from fis3-parser-vue-component.

imstone avatar imstone commented on July 20, 2024

好用!赞!已star

from fis3-parser-vue-component.

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.