fix model value

This commit is contained in:
2023-08-02 12:14:29 +02:00
parent 7d4cc6ee70
commit 5277849312

View File

@@ -177,10 +177,10 @@ export default {
modalLoad: false, modalLoad: false,
}; };
}, },
props: ["name", "value", "showcopy", "lang"], props: ["name", "modelValue", "showcopy", "lang"],
mounted: function () { mounted: function () {
//var trimmed = $("#body_pagebuilder").val().replace((/ |\r\n|\n|\r/gm),""); //var trimmed = $("#body_pagebuilder").val().replace((/ |\r\n|\n|\r/gm),"");
var trimmed = this.value; //.replace((/{2} |\r\n|\n|\r/gm), ""); var trimmed = this.modelValue; //.replace((/{2} |\r\n|\n|\r/gm), "");
try { try {
this.comps = JSON.parse(trimmed); this.comps = JSON.parse(trimmed);
} catch (e) { } catch (e) {
@@ -227,7 +227,7 @@ export default {
var data = { var data = {
id: this.pageType.id, id: this.pageType.id,
name: this.pageType.name, name: this.pageType.name,
source: this.value, source: this.modelValue,
description: this.pageType.description, description: this.pageType.description,
}; };
if (this.$pagebuilder.axios) { if (this.$pagebuilder.axios) {