QingWei-Li / vuep

🎡 A component for rendering Vue components with live editor and preview.
https://cinwell.com/vuep/
MIT License
887 stars 103 forks source link

[bug] Use 'x-template' in .vue file can not get the `<script type="text/x-template">` tag in `created()` #31

Open laomao800 opened 6 years ago

laomao800 commented 6 years ago

Reproduce:

https://codesandbox.io/s/6xk7rp0o33

When use the <script type="text/x-template"> in .vue file:

<template>
  <div id="app">
    <vuep template="#demo" />
    <script v-pre type="text/x-template" id="demo">
      <template>
        <div>hello {{ name }}</div>
      </template>
      <script>
        module.exports = {
          data() {
            return {
              name: 'vuep'
            }
          }
        }
      </script>
    </script>
  </div>
</template>

// ...

Will get this error:

error