frappe-ui 0.1.205 → 0.1.206
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/package.json
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
class="relative w-full"
|
|
5
5
|
:class="attrsClass"
|
|
6
6
|
:style="attrsStyle"
|
|
7
|
+
v-bind="attrsWithoutClassStyle"
|
|
8
|
+
ref="rootRef"
|
|
7
9
|
>
|
|
8
10
|
<TextEditorBubbleMenu :buttons="bubbleMenu" :options="bubbleMenuOptions" />
|
|
9
11
|
<TextEditorFixedMenu
|
|
@@ -30,6 +32,7 @@ import {
|
|
|
30
32
|
provide,
|
|
31
33
|
ref,
|
|
32
34
|
useAttrs,
|
|
35
|
+
useTemplateRef,
|
|
33
36
|
} from 'vue'
|
|
34
37
|
|
|
35
38
|
defineOptions({ inheritAttrs: false })
|
|
@@ -100,6 +103,11 @@ const editor = ref<Editor | null>(null)
|
|
|
100
103
|
const attrs = useAttrs()
|
|
101
104
|
const attrsClass = computed(() => normalizeClass(attrs.class))
|
|
102
105
|
const attrsStyle = computed(() => normalizeStyle(attrs.style))
|
|
106
|
+
const attrsWithoutClassStyle = computed(() => {
|
|
107
|
+
return Object.fromEntries(
|
|
108
|
+
Object.entries(attrs).filter(([key]) => key !== 'class' && key !== 'style'),
|
|
109
|
+
)
|
|
110
|
+
})
|
|
103
111
|
|
|
104
112
|
const editorProps = computed(() => {
|
|
105
113
|
return {
|
|
@@ -254,8 +262,10 @@ provide(
|
|
|
254
262
|
computed(() => editor.value),
|
|
255
263
|
)
|
|
256
264
|
|
|
265
|
+
const rootRef = useTemplateRef('rootRef')
|
|
257
266
|
defineExpose({
|
|
258
267
|
editor,
|
|
268
|
+
rootRef,
|
|
259
269
|
})
|
|
260
270
|
</script>
|
|
261
271
|
|