GithubHelp home page GithubHelp logo

vue-template-transform's Introduction

vue-template-transform

将渲染函数转换回vue模板

vue-template-transform's People

Contributors

mk33mk333 avatar

Stargazers

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

Watchers

 avatar  avatar

vue-template-transform's Issues

一种会出错的格式

{
            render: function() {
                var e = this
                  , t = e.$createElement
                  , i = e._self._c || t;
                return i("div", {
                    directives: [{
                        name: "show",
                        rawName: "v-show",
                        value: "video" == e.element.video,
                        expression: "element.video=='video'"
                    }],
                    staticClass: "video-button"
                }, [i("ul", e._l(e.videoButton, function(t) {
                    return i("li", {
                        class: {
                            selected: e.element.properties.src == t
                        }
                    }, [i("img", {
                        attrs: {
                            src: t,
                            width: "500",
                            height: "500",
                            alt: ""
                        },
                        on: {
                            click: function(n) {
                                return e.editVideo({
                                    src: t
                                })
                            }
                        }
                    })])
                }), 0)])
            },
            staticRenderFns: [function() {
                var e = this.$createElement
                  , t = this._self._c || e;
                return t("div", [t("div", {
                    staticClass: "wrapper"
                }, [t("i", {
                    staticClass: "e-icon editor"
                })])])
            }
            , function() {
                var e = this.$createElement
                  , t = this._self._c || e;
                return t("p", {
                    staticClass: "base-tit"
                }, [this._v("\n    dizhi         "), this._v(" "), t("i", {
                    staticClass: "iconfont icon-bangzhu1 cup",
                    staticStyle: {
                        "vertical-align": "-1px"
                    },
                    attrs: {
                        onclick: "window.open('')",
                        title: "查看"
                    }
                })])
            }
            ]
        }

这种写法会出错 需要 [i("ul", e._l(e.videoButton, function(t) { 改成 [i("ul", {} ,e._l(e.videoButton, function(t) {

这段不行

{
render: function () {
var t = this;
var e = t.$createElement;
var i = t._self._c || e;
return i('div', t._l((t.nav), function (item) {
return i('div', {
key: item.index,
on: {
"contextmenu": function ($event) {
$event.preventDefault();
t.contain.handleContextMenu && t.contain.handleContextMenu($event, item)
}
}
}, [(!item.children) ? i('avue-draggable', t._b({
directives: [{
name: "show",
rawName: "v-show",
value: (!item.display),
expression: "!item.display"
}],
ref: t.common.DEAFNAME + item.index,
refInFor: true,
attrs: {
"scale": t.container.stepScale,
"disabled": !t.contain.menuFlag,
"step": t.container.stepScale,
"width": item.component.width,
"height": item.component.height,
"id": t.common.DEAFNAME + item.index,
"active-flag": t.contain.active.includes(item.index)
},
on: {
"over": t.handleOver,
"focus": t.handleFocus,
"blur": t.handleBlur
}
}, 'avue-draggable', item, false), [i(t.common.COMPNAME + item.component.name, t._b({
ref: t.common.NAME + item.index,
refInFor: true,
tag: "component",
attrs: {
"id": t.common.NAME + item.index,
"data-formatter": t.getFunction(item.dataFormatter),
"click-formatter": t.getFunction(item.clickFormatter, true),
"echart-formatter": t.getFunction(item.echartFormatter),
"label-formatter": t.getFunction(item.labelFormatter),
"sql-formatter": t.sqlFormatter,
"formatter": t.getFunction(item.formatter),
"width": item.component.width,
"data-query": t.getJson(item.dataQuery),
"height": item.component.height,
"animation": !t.contain.menuFlag,
"theme": (item.option || {}).theme,
"disabled": !t.contain.menuFlag,
"scale": t.container.stepScale,
"option": item.option,
"home-url": t.contain.config.url,
"title": "",
"click": t.handleClick
}
}, 'component', item, false))], 1) : t._e(), i('subgroup', {
attrs: {
"nav": item.children
}
})], 1)
}), 0)
},
staticRenderFns: []
}

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.