Skip to content

Commit

Permalink
Fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Oct 6, 2024
1 parent d02f25e commit f0c8671
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 80 deletions.
14 changes: 2 additions & 12 deletions ui/packages/editor/src/extensions/audio/AudioView.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
<script lang="ts" setup>
import { i18n } from "@/locales";
import type { Decoration, Node as ProseMirrorNode } from "@/tiptap/pm";
import type { Editor, Node } from "@/tiptap/vue-3";
import type { NodeViewProps } from "@/tiptap/vue-3";
import { NodeViewWrapper } from "@/tiptap/vue-3";
import { computed, onMounted, ref } from "vue";
const props = defineProps<{
editor: Editor;
node: ProseMirrorNode;
decorations: Decoration[];
selected: boolean;
extension: Node<any, any>;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down
14 changes: 2 additions & 12 deletions ui/packages/editor/src/extensions/iframe/IframeView.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<script lang="ts" setup>
import { i18n } from "@/locales";
import type { Decoration, Node as ProseMirrorNode } from "@/tiptap/pm";
import type { Editor, Node } from "@/tiptap/vue-3";
import type { NodeViewProps } from "@/tiptap/vue-3";
import { NodeViewWrapper } from "@/tiptap/vue-3";
import { isAllowedUri } from "@/utils/is-allowed-uri";
import { computed, onMounted, ref } from "vue";
const props = defineProps<{
editor: Editor;
node: ProseMirrorNode;
decorations: Decoration[];
selected: boolean;
extension: Node<any, any>;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down
14 changes: 2 additions & 12 deletions ui/packages/editor/src/extensions/image/ImageView.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<script lang="ts" setup>
import { i18n } from "@/locales";
import type { Decoration, Node as ProseMirrorNode } from "@/tiptap/pm";
import type { Editor, Node } from "@/tiptap/vue-3";
import type { NodeViewProps } from "@/tiptap/vue-3";
import { NodeViewWrapper } from "@/tiptap/vue-3";
import { computed, onMounted, ref } from "vue";
import Image from "./index";
const props = defineProps<{
editor: Editor;
node: ProseMirrorNode;
decorations: Decoration[];
selected: boolean;
extension: Node<any, any>;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down
14 changes: 2 additions & 12 deletions ui/packages/editor/src/extensions/video/VideoView.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
<script lang="ts" setup>
import { i18n } from "@/locales";
import type { Decoration, Node as ProseMirrorNode } from "@/tiptap/pm";
import type { Editor, Node } from "@/tiptap/vue-3";
import type { NodeViewProps } from "@/tiptap/vue-3";
import { NodeViewWrapper } from "@/tiptap/vue-3";
import { computed, onMounted, ref } from "vue";
const props = defineProps<{
editor: Editor;
node: ProseMirrorNode;
decorations: Decoration[];
selected: boolean;
extension: Node<any, any>;
getPos: () => number;
updateAttributes: (attributes: Record<string, any>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down
18 changes: 2 additions & 16 deletions ui/src/components/editor/extensions/image/ImageView.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
<script lang="ts" setup>
import { IconImageAddLine, VButton } from "@halo-dev/components";
import {
Editor,
type Decoration,
type Node,
type PMNode,
} from "@halo-dev/richtext-editor";
import { type NodeViewProps } from "@halo-dev/richtext-editor";
import { computed, onMounted, ref } from "vue";
import { EditorLinkObtain } from "../../components";
import InlineBlockBox from "../../components/InlineBlockBox.vue";
import { type AttachmentAttr } from "../../utils/attachment";
import { fileToBase64 } from "../../utils/upload";
import Image from "./index";
const props = defineProps<{
editor: Editor;
node: PMNode;
decorations: Decoration[];
selected: boolean;
extension: Node;
getPos: () => number;
updateAttributes: (attributes: Record<string, unknown>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down
18 changes: 2 additions & 16 deletions ui/src/components/editor/extensions/video/VideoView.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
<script lang="ts" setup>
import { VButton } from "@halo-dev/components";
import type {
Decoration,
Editor,
Node,
PMNode,
} from "@halo-dev/richtext-editor";
import type { NodeViewProps } from "@halo-dev/richtext-editor";
import { computed, ref } from "vue";
import RiVideoAddLine from "~icons/ri/video-add-line";
import { EditorLinkObtain } from "../../components";
import InlineBlockBox from "../../components/InlineBlockBox.vue";
import type { AttachmentAttr } from "../../utils/attachment";
import Video from "./index";
const props = defineProps<{
editor: Editor;
node: PMNode;
decorations: Decoration[];
selected: boolean;
extension: Node;
getPos: () => number;
updateAttributes: (attributes: Record<string, unknown>) => void;
deleteNode: () => void;
}>();
const props = defineProps<NodeViewProps>();
const src = computed({
get: () => {
Expand Down

0 comments on commit f0c8671

Please sign in to comment.