Package not found. Please check the package name and try again.
aloha-vue 1.0.310 → 1.0.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,3 +35,17 @@ div
|
|
|
35
35
|
:is-boxed="true"
|
|
36
36
|
:is-vertical="true"
|
|
37
37
|
)
|
|
38
|
+
h2 With Slots
|
|
39
|
+
a-tabs(
|
|
40
|
+
:data="dataTabs2"
|
|
41
|
+
:is-boxed="true"
|
|
42
|
+
)
|
|
43
|
+
template(
|
|
44
|
+
v-slot:tab="{ tab }"
|
|
45
|
+
)
|
|
46
|
+
span {{ tab }}
|
|
47
|
+
|
|
48
|
+
template(
|
|
49
|
+
v-slot:content="{ tab }"
|
|
50
|
+
)
|
|
51
|
+
span {{ tab }}
|
package/package.json
CHANGED
|
@@ -41,6 +41,31 @@ export default {
|
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
render() {
|
|
44
|
+
let content = "";
|
|
45
|
+
if (this.tab.slotContent && this.$slots[this.tab.slotContent]) {
|
|
46
|
+
content = this.$slots[this.tab.slotContent]({
|
|
47
|
+
tab: this.tab,
|
|
48
|
+
tabIndex: this.index,
|
|
49
|
+
isActive: this.isActive,
|
|
50
|
+
indexActiveTab: this.indexActiveTabLocal,
|
|
51
|
+
contentId: this.idForContent,
|
|
52
|
+
parentId: this.parentId,
|
|
53
|
+
});
|
|
54
|
+
} else if (this.$slots.content) {
|
|
55
|
+
content = this.$slots.content({
|
|
56
|
+
tab: this.tab,
|
|
57
|
+
tabIndex: this.index,
|
|
58
|
+
isActive: this.isActive,
|
|
59
|
+
indexActiveTab: this.indexActiveTabLocal,
|
|
60
|
+
contentId: this.idForContent,
|
|
61
|
+
parentId: this.parentId,
|
|
62
|
+
});
|
|
63
|
+
} else if (this.tab.content) {
|
|
64
|
+
content = withDirectives(h("div"), [
|
|
65
|
+
[ASafeHtml, this.tab.content],
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
|
|
44
69
|
return h("div", {
|
|
45
70
|
id: this.idForContent,
|
|
46
71
|
role: "tabpanel",
|
|
@@ -49,20 +74,7 @@ export default {
|
|
|
49
74
|
}],
|
|
50
75
|
ariaLabelledby: this.idLocal,
|
|
51
76
|
}, [
|
|
52
|
-
|
|
53
|
-
this.$slots[this.tab.slotContent] &&
|
|
54
|
-
this.$slots[this.tab.slotContent]({
|
|
55
|
-
tab: this.tab,
|
|
56
|
-
tabIndex: this.index,
|
|
57
|
-
isActive: this.isActive,
|
|
58
|
-
indexActiveTab: this.indexActiveTabLocal,
|
|
59
|
-
contentId: this.idForContent,
|
|
60
|
-
parentId: this.parentId,
|
|
61
|
-
}) :
|
|
62
|
-
this.tab.content &&
|
|
63
|
-
withDirectives(h("div"), [
|
|
64
|
-
[ASafeHtml, this.tab.content],
|
|
65
|
-
]),
|
|
77
|
+
content,
|
|
66
78
|
]);
|
|
67
79
|
},
|
|
68
80
|
};
|
|
@@ -75,6 +75,31 @@ export default {
|
|
|
75
75
|
};
|
|
76
76
|
},
|
|
77
77
|
render() {
|
|
78
|
+
let tab = "";
|
|
79
|
+
if (this.tab.slotTab && this.$slots[this.tab.slotTab]) {
|
|
80
|
+
tab = this.$slots[this.tab.slotTab]({
|
|
81
|
+
tab: this.tab,
|
|
82
|
+
tabIndex: this.index,
|
|
83
|
+
isActive: this.isActive,
|
|
84
|
+
indexActiveTab: this.indexActiveTabLocal,
|
|
85
|
+
contentId: this.idForContent,
|
|
86
|
+
parentId: this.parentId,
|
|
87
|
+
});
|
|
88
|
+
} else if (this.$slots.tab) {
|
|
89
|
+
tab = this.$slots.tab({
|
|
90
|
+
tab: this.tab,
|
|
91
|
+
tabIndex: this.index,
|
|
92
|
+
isActive: this.isActive,
|
|
93
|
+
indexActiveTab: this.indexActiveTabLocal,
|
|
94
|
+
contentId: this.idForContent,
|
|
95
|
+
parentId: this.parentId,
|
|
96
|
+
});
|
|
97
|
+
} else if (this.tab.label) {
|
|
98
|
+
tab = withDirectives(h("div"), [
|
|
99
|
+
[ASafeHtml, this.tab.label],
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
|
|
78
103
|
return h(ATooltip, {
|
|
79
104
|
tag: "li",
|
|
80
105
|
placement: this.titlePlacement,
|
|
@@ -99,19 +124,7 @@ export default {
|
|
|
99
124
|
onClick: this.changeTabLocal,
|
|
100
125
|
onKeydown: this.keydownTab,
|
|
101
126
|
}, [
|
|
102
|
-
|
|
103
|
-
this.$slots[this.tab.slotTab]({
|
|
104
|
-
tab: this.tab,
|
|
105
|
-
tabIndex: this.index,
|
|
106
|
-
isActive: this.isActive,
|
|
107
|
-
isDisabled: this.isDisabled,
|
|
108
|
-
indexActiveTab: this.indexActiveTabLocal,
|
|
109
|
-
tabId: this.idLocal,
|
|
110
|
-
parentId: this.parentId,
|
|
111
|
-
}) :
|
|
112
|
-
withDirectives(h("span"), [
|
|
113
|
-
[ASafeHtml, this.tab.label],
|
|
114
|
-
]),
|
|
127
|
+
tab,
|
|
115
128
|
]),
|
|
116
129
|
],
|
|
117
130
|
title: () => withDirectives(h("div"), [
|
|
@@ -55,8 +55,15 @@ export default function ATinymceAPI(props, context, {
|
|
|
55
55
|
const modelValue = toRef(props, "modelValue");
|
|
56
56
|
|
|
57
57
|
let vueEditor = null;
|
|
58
|
+
let modelValueLocal = undefined;
|
|
59
|
+
|
|
60
|
+
const changeModelLocal = ({ model }) => {
|
|
61
|
+
modelValueLocal = model;
|
|
62
|
+
changeModel({ model });
|
|
63
|
+
};
|
|
58
64
|
|
|
59
65
|
const render = () => {
|
|
66
|
+
modelValueLocal = modelValue.value;
|
|
60
67
|
tinymce.init({
|
|
61
68
|
selector: `#${ htmlIdLocal.value }`,
|
|
62
69
|
plugins: plugins.value,
|
|
@@ -75,7 +82,7 @@ export default function ATinymceAPI(props, context, {
|
|
|
75
82
|
setup: editor => {
|
|
76
83
|
vueEditor = editor;
|
|
77
84
|
editor.on("change input undo redo", () => {
|
|
78
|
-
|
|
85
|
+
changeModelLocal({ model: editor.getContent({ format: "html" }) });
|
|
79
86
|
});
|
|
80
87
|
},
|
|
81
88
|
});
|
|
@@ -94,7 +101,10 @@ export default function ATinymceAPI(props, context, {
|
|
|
94
101
|
});
|
|
95
102
|
|
|
96
103
|
watch(modelValue, newValue => {
|
|
97
|
-
|
|
104
|
+
if (newValue !== modelValueLocal) {
|
|
105
|
+
tinymce.get(htmlIdLocal.value).setContent(newValue);
|
|
106
|
+
modelValueLocal = newValue;
|
|
107
|
+
}
|
|
98
108
|
});
|
|
99
109
|
|
|
100
110
|
onBeforeUnmount(() => {
|