fix warnigns
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "magico-pagebuilder",
|
"name": "magico-pagebuilder",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -20,15 +20,16 @@ import { onMounted, onBeforeUnmount, ref, watch } from 'vue'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['modelValue', 'title', 'class_other'],
|
props: ['modelValue', 'title', 'class_other'],
|
||||||
|
emits: ['change','update:modelValue'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const id = 'modal' + Math.round(Math.random() * 100000)
|
const id = 'modal' + Math.round(Math.random() * 100000)
|
||||||
const modal = ref(null)
|
const modal = ref(null)
|
||||||
|
|
||||||
const triggerModal = (value, emitEvent = true) => {
|
const triggerModal = (value, emitEvent = true) => {
|
||||||
if (value == true) {
|
if (value == true) {
|
||||||
modal.value.show()
|
modal.modelValue.show()
|
||||||
} else {
|
} else {
|
||||||
modal.value.hide()
|
modal.modelValue.hide()
|
||||||
if (emitEvent) {
|
if (emitEvent) {
|
||||||
emit('hide')
|
emit('hide')
|
||||||
}
|
}
|
||||||
@@ -38,7 +39,7 @@ export default {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.body.append(document.getElementById(id))
|
document.body.append(document.getElementById(id))
|
||||||
modal.value = new Modal(document.getElementById(id))
|
modal.modelValue = new Modal(document.getElementById(id))
|
||||||
document.getElementById(id).addEventListener('hidden.bs.modal', function () {
|
document.getElementById(id).addEventListener('hidden.bs.modal', function () {
|
||||||
triggerModal(false)
|
triggerModal(false)
|
||||||
})
|
})
|
||||||
@@ -46,7 +47,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
modal.value.hide()
|
modal.modelValue.hide()
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
document.getElementById(id).remove()
|
document.getElementById(id).remove()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
</draggable>
|
</draggable>
|
||||||
|
|
||||||
<b-modal
|
<b-modal
|
||||||
v-model.value="modalSave"
|
v-model="modalSave"
|
||||||
title="Zapisz szablon do schowka"
|
title="Zapisz szablon do schowka"
|
||||||
v-on:onClose="modalSave = false"
|
v-on:onClose="modalSave = false"
|
||||||
>
|
>
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</b-modal>
|
</b-modal>
|
||||||
|
|
||||||
<b-modal
|
<b-modal
|
||||||
v-model.value="modalLoad"
|
v-model="modalLoad"
|
||||||
title="Wczytaj szablon ze schowka"
|
title="Wczytaj szablon ze schowka"
|
||||||
v-on:onClose="modalLoad = false"
|
v-on:onClose="modalLoad = false"
|
||||||
>
|
>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</b-modal>
|
</b-modal>
|
||||||
|
|
||||||
<b-modal v-model.value="modalCopy" v-on:onClose="modalCopy = false">
|
<b-modal v-model="modalCopy" v-on:onClose="modalCopy = false">
|
||||||
<PagebuilderTemplateLoad v-model="pageType"></PagebuilderTemplateLoad>
|
<PagebuilderTemplateLoad v-model="pageType"></PagebuilderTemplateLoad>
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn-primary mr-1" :disabled="!pageType.id" @click.prevent="changeBody">
|
<button class="btn btn-primary mr-1" :disabled="!pageType.id" @click.prevent="changeBody">
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<b-modal
|
<b-modal
|
||||||
class_other="modal-xl"
|
class_other="modal-xl"
|
||||||
v-model.value="modalAddSection"
|
v-model="modalAddSection"
|
||||||
title=" Dodaj sekcję"
|
title=" Dodaj sekcję"
|
||||||
v-on:onClose="modalAddSection = false"
|
v-on:onClose="modalAddSection = false"
|
||||||
hide-footer
|
hide-footer
|
||||||
@@ -169,7 +169,7 @@ import PagebuilderTemplateLoad from './PagebuilderTemplateLoad.vue'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MagicoPagebuilder',
|
name: 'MagicoPagebuilder',
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue','change'],
|
||||||
components: {
|
components: {
|
||||||
'b-modal': MagicoModal,
|
'b-modal': MagicoModal,
|
||||||
PagebuilderSection,
|
PagebuilderSection,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div style="min-height: 100px" class="pagebuilder-column" :class="value.name">
|
<div style="min-height: 100px" class="pagebuilder-column" :class="value.name">
|
||||||
<h6 v-if="value.user_label">{{ value.user_label }}</h6>
|
<h6 v-if="value.user_label">{{ value.user_label }}</h6>
|
||||||
<b-modal
|
<b-modal
|
||||||
v-model.value="modalAddBox"
|
v-model="modalAddBox"
|
||||||
class_other="modal-xl"
|
class_other="modal-xl"
|
||||||
v-on:onClose="modalAddBox = false"
|
v-on:onClose="modalAddBox = false"
|
||||||
title="Dodaj widżet"
|
title="Dodaj widżet"
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
<draggable
|
<draggable
|
||||||
:options="{ handle: '.box-move' }"
|
:options="{ handle: '.box-move' }"
|
||||||
v-model="value.items"
|
v-model="value.items"
|
||||||
|
itemKey="name"
|
||||||
@start="drag = true"
|
@start="drag = true"
|
||||||
@end="
|
@end="
|
||||||
drag = false;
|
drag = false;
|
||||||
@@ -100,6 +101,7 @@ import DropdownSectionSection from './DropdownSectionSection.vue'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: function () {
|
data: function () {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
opcja: '',
|
opcja: '',
|
||||||
modalAddBox: false,
|
modalAddBox: false,
|
||||||
@@ -110,7 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: { value: Object, keyIndex: String },
|
props: { value: Object, keyIndex: String },
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue','change'],
|
||||||
components: {
|
components: {
|
||||||
draggable,
|
draggable,
|
||||||
'b-modal': MagicoModal,
|
'b-modal': MagicoModal,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ import MagicoModal from './MagicoModal.vue'
|
|||||||
import PagebuilderContent from './PagebuilderContent.vue'
|
import PagebuilderContent from './PagebuilderContent.vue'
|
||||||
export default {
|
export default {
|
||||||
props: { value: Object, keyIndex:String },
|
props: { value: Object, keyIndex:String },
|
||||||
emits: ['update:modelValue', 'copy', 'deleteSection'],
|
emits: ['update:modelValue', 'copy', 'deleteSection','change'],
|
||||||
components: {
|
components: {
|
||||||
'b-modal': MagicoModal,
|
'b-modal': MagicoModal,
|
||||||
PagebuilderContent
|
PagebuilderContent
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getPost();
|
this.getPost();
|
||||||
},
|
},
|
||||||
|
emits: ['update:modelValue','change'],
|
||||||
|
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
items: [],
|
items: [],
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export default {
|
|||||||
id: 0,
|
id: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
emits: ['update:modelValue','change'],
|
||||||
methods: {
|
methods: {
|
||||||
change() {
|
change() {
|
||||||
this.$emit("update:modelValue", {
|
this.$emit("update:modelValue", {
|
||||||
|
|||||||
@@ -37,19 +37,19 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="w-100 col-form-label">Wyrównanie</label>
|
<label class="w-100 col-form-label">Wyrównanie</label>
|
||||||
<div class="">
|
<div class="">
|
||||||
<button v-tooltip title="Wyrównanie do lewej" @click="align = 'left'" class="btn btn-icon-sm "
|
<button vx-tooltip title="Wyrównanie do lewej" @click="align = 'left'" class="btn btn-icon-sm "
|
||||||
:class="align == 'left' ? 'btn-primary' : 'btn-outline-primary'">
|
:class="align == 'left' ? 'btn-primary' : 'btn-outline-primary'">
|
||||||
<span class="material-icons-outlined">format_align_left</span>
|
<span class="material-icons-outlined">format_align_left</span>
|
||||||
</button>
|
</button>
|
||||||
<button v-tooltip title="Wyrównanie do środka" @click="align = 'center'" class="btn btn-icon-sm "
|
<button vx-tooltip title="Wyrównanie do środka" @click="align = 'center'" class="btn btn-icon-sm "
|
||||||
:class="align == 'center' ? 'btn-primary' : 'btn-outline-primary'">
|
:class="align == 'center' ? 'btn-primary' : 'btn-outline-primary'">
|
||||||
<span class="material-icons-outlined">format_align_center</span>
|
<span class="material-icons-outlined">format_align_center</span>
|
||||||
</button>
|
</button>
|
||||||
<button v-tooltip title="Wyrównanie do prawej" @click="align = 'right'" class="btn btn-icon-sm "
|
<button vx-tooltip title="Wyrównanie do prawej" @click="align = 'right'" class="btn btn-icon-sm "
|
||||||
:class="align == 'right' ? 'btn-primary' : 'btn-outline-primary'">
|
:class="align == 'right' ? 'btn-primary' : 'btn-outline-primary'">
|
||||||
<span class="material-icons-outlined">format_align_right</span>
|
<span class="material-icons-outlined">format_align_right</span>
|
||||||
</button>
|
</button>
|
||||||
<button v-tooltip title="Justowanie" @click="align = 'justify'" class="btn btn-icon-sm "
|
<button vx-tooltip title="Justowanie" @click="align = 'justify'" class="btn btn-icon-sm "
|
||||||
:class="align == 'justify' ? 'btn-primary' : 'btn-outline-primary'">
|
:class="align == 'justify' ? 'btn-primary' : 'btn-outline-primary'">
|
||||||
<span class="material-icons-outlined">format_align_justify</span>
|
<span class="material-icons-outlined">format_align_justify</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user