@blokkli/editor 2.0.0-alpha.53 → 2.0.0-alpha.54
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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +1 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.d.vue.ts +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +34 -21
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="bk-editable-field-frame"
|
|
4
|
+
:class="{
|
|
5
|
+
'bk-is-fullscreen': isFullscreen
|
|
6
|
+
}"
|
|
7
|
+
>
|
|
3
8
|
<iframe
|
|
4
9
|
ref="iframe"
|
|
5
|
-
:style
|
|
10
|
+
:style
|
|
6
11
|
:src="url"
|
|
12
|
+
class="_bk_block _bk_w-full"
|
|
7
13
|
@load="onIframeLoad"
|
|
8
14
|
/>
|
|
9
15
|
</div>
|
|
@@ -26,10 +32,21 @@ const props = defineProps({
|
|
|
26
32
|
type: { type: String, required: true },
|
|
27
33
|
fieldName: { type: String, required: true },
|
|
28
34
|
host: { type: Object, required: true },
|
|
29
|
-
initialHeight: { type: Number, required: true }
|
|
35
|
+
initialHeight: { type: Number, required: true },
|
|
36
|
+
isFullscreen: { type: Boolean, required: true }
|
|
30
37
|
});
|
|
31
38
|
const modelValue = defineModel({ type: String, ...{ required: true } });
|
|
32
39
|
const emit = defineEmits(["formatted"]);
|
|
40
|
+
const style = computed(() => {
|
|
41
|
+
if (props.isFullscreen) {
|
|
42
|
+
return {
|
|
43
|
+
height: "100%"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
height: Math.max(height.value, 400) + "px"
|
|
48
|
+
};
|
|
49
|
+
});
|
|
33
50
|
const iframe = useTemplateRef("iframe");
|
|
34
51
|
function onIframeLoad() {
|
|
35
52
|
if (!iframe.value || !PROPAGATE_WHEEL) {
|
|
@@ -124,22 +141,18 @@ onBeforeUnmount(() => {
|
|
|
124
141
|
</script>
|
|
125
142
|
|
|
126
143
|
<style>
|
|
127
|
-
.bk .bk-editable-field-frame iframe {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
.bk .bk-editable-field-frame iframe {
|
|
142
|
-
min-width: 700px
|
|
143
|
-
}
|
|
144
|
-
}
|
|
144
|
+
.bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
|
|
145
|
+
max-height: calc(100vh - 500px);
|
|
146
|
+
}
|
|
147
|
+
@media (min-width: 1024px) {
|
|
148
|
+
.bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
|
|
149
|
+
min-width: 700px;
|
|
150
|
+
min-height: 400px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
@media (min-width: 1280px) {
|
|
154
|
+
.bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
|
|
155
|
+
min-width: 700px;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
145
158
|
</style>
|