Git Product home page Git Product logo

vuep's People

Contributors

angusfu avatar dependabot[bot] avatar nickmessing avatar qingwei-li avatar reverland avatar toilal avatar visualjerk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vuep's Issues

Two way syncinc

Awesome! Thanks for the contribution!!

I noticed the sync is not two ways, e.g in the ES6 usage demo the input number will not reflect back into the code. Perhaps that could be considered?

关于解析css的问题

@Keyframes antion {
0%{
margin-top: 60px;
}
50%{
margin-top: 10px;
}
100%{
margin-top: 60px;
}
}

这种的解析是不可行的,解析的结果前面会自带一个class属性,有什么解决办法吗?

How to dynamically update template props content

Hi! I want to change the template inside Vuep component dynamically.
I was use Vuep template props with Vue v-bind method to local prop called template:template="template". But if I dynamic change the content of local template - Vuep component is not changes. How I can do that?

Unknown custom element: <ac-gravatar> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

<template>
  <div id="app">
    <!-- <ac-simple-card></ac-simple-card> -->
    <vuep :template="code"></vuep>
  </div>
</template>

<script>
import Vue from 'vue'
import Vuep from 'vuep'
import 'vuep/dist/vuep.css'

Vue.use(Vuep /*, { codemirror options } */)
export default {
    name: 'LiveEditor',
      created: function () {
    this.code = `<template><div>Hello, {{ name }}!<ac-gravatar :avatar_props="{ size: 100, rounded: false }" email="[email protected]"/></div></template><script>module.exports = {data: function () {return { name: 'Vue' }}}`;
    }
}
</script>

<style>
</style>


ERROR

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

--->


at src/components/LiveEditor.vue
at src/App.vue

I am getting above ERROR please help me, anyone,

SSR not supported?

Hi, great component, but if I use it inside nuxt.js with ssr-support (only in browser-side) backend-side vue-renderer was delete component from page and show message:

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. 
This is likely caused by incorrect HTML markup, for example nesting block-level elements inside
<p>, or missing <tbody>. Bailing hydration and performing full client-side render.

Cannot find template element

Firstly, thanks for your effort on this, I love the idea of this component.

I found a problem with the way you pass the template prop to the vuep component referencing the string of code to render or the querySelection string to find the script tag of the code to render.

I keep getting an error that it can't be found because you are trying to querySelect the template element before it's even mounted. You need to change this to be done in mounted not created for vue to find that template element.

image

props: {
template: String,
options: {},
keepData: Boolean,
value: String
},

created () {
/* istanbul ignore next */
if (this.$isServer) return
let content = this.template
if (/^[\.#]/.test(this.template)) {
const html = document.querySelector(this.template)
if (!html) throw Error(`${this.template} is not found`)

Line 77 will never find the template on the dom

关于解析的问题

我看源码里解析template部分时会判断script标签是否在末尾并补全,我想问一下这么设计的原因,难道不考虑有些人的书写习惯会将style放在末尾

vuep can not compile such a template

vuep can not compile such a template:

this.code = `
<template>
    <!-- ERROR:Unknown custom element: <my-global-component>  - did you register the component correctly?-->
     <my-global-component />
</template>
`

<my-global-component/>is a component of the UI framework

very slow refresh rate while typing (idea: debounce the updates)

Loving the project!

Some examples make the editor freeze, because it is updating the preview on every key stroke it seems like.

It may be a good idea to debounce (or throttle) updates to 100ms.

Another nice feature could be to provide a "run" or "play" button so that updates happen when desired.

And one more feature could be a checkbox that enables autorun, where when turned has to click "run".

possible to inject data from embedding app?

Hello,

I can successfully render components in my app that's embedding vuep, but is there a way to pass app date into vuep somehow? For example, when writing code in the embedded editor, I'd like to be able to refer to live data being generated by the surround app. It seems though, that vuep is essentially a sandbox where no data can come in or out. Is this right? Are there any alternatives to get the behaviour I'm looking for?

Thanks!

解析element ui组件

element ui组件解析失败 控制台报错没有注册

 <!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

这样做还是错的吗?

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.