Skip to content

Commit

Permalink
version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Feb 17, 2019
1 parent 393fd2c commit 268d023
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
15 changes: 15 additions & 0 deletions dist/vue-showdown.common.js
Expand Up @@ -133,6 +133,15 @@ var VueShowdownComponent = {
type: [Object, Array],
required: false,
default: null
},

/**
* Treat the HTML string as Vue template. Require full build of Vue (runtime + complier)
*/
vueTemplate: {
type: Boolean,
required: false,
default: false
}
},
computed: {
Expand Down Expand Up @@ -167,6 +176,12 @@ var VueShowdownComponent = {
}
},
render: function render(h) {
if (this.vueTemplate) {
return h({
template: "<".concat(this.tag, ">").concat(this.outputHtml, "</").concat(this.tag, ">")
});
}

return h(this.tag, {
domProps: {
innerHTML: this.outputHtml
Expand Down
15 changes: 15 additions & 0 deletions dist/vue-showdown.esm.js
Expand Up @@ -130,6 +130,15 @@ var VueShowdownComponent = {
type: [Object, Array],
required: false,
default: null
},

/**
* Treat the HTML string as Vue template. Require full build of Vue (runtime + complier)
*/
vueTemplate: {
type: Boolean,
required: false,
default: false
}
},
computed: {
Expand Down Expand Up @@ -164,6 +173,12 @@ var VueShowdownComponent = {
}
},
render: function render(h) {
if (this.vueTemplate) {
return h({
template: "<".concat(this.tag, ">").concat(this.outputHtml, "</").concat(this.tag, ">")
});
}

return h(this.tag, {
domProps: {
innerHTML: this.outputHtml
Expand Down
15 changes: 15 additions & 0 deletions dist/vue-showdown.js
Expand Up @@ -135,6 +135,15 @@
type: [Object, Array],
required: false,
default: null
},

/**
* Treat the HTML string as Vue template. Require full build of Vue (runtime + complier)
*/
vueTemplate: {
type: Boolean,
required: false,
default: false
}
},
computed: {
Expand Down Expand Up @@ -169,6 +178,12 @@
}
},
render: function render(h) {
if (this.vueTemplate) {
return h({
template: "<".concat(this.tag, ">").concat(this.outputHtml, "</").concat(this.tag, ">")
});
}

return h(this.tag, {
domProps: {
innerHTML: this.outputHtml
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-showdown.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "vue-showdown",
"version": "2.3.0",
"version": "2.4.0",
"author": "Xinyu Liu <meteor.lxy@foxmail.com> (https://www.meteorlxy.cn)",
"license": "MIT",
"description": "Use showdown as a vue component",
Expand Down

0 comments on commit 268d023

Please sign in to comment.