From dd7535b6962e9e18088f1b2a15d950e22e2b507d Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Fri, 12 Aug 2022 13:40:54 +0430 Subject: [PATCH 1/4] chore: deprecate Markdown component --- .../components/content/MarkdownBetween.vue | 2 +- src/runtime/components/ContentRichSlot.vue | 85 +++++++++++++++++++ src/runtime/components/Markdown.vue | 67 ++------------- 3 files changed, 93 insertions(+), 61 deletions(-) create mode 100644 src/runtime/components/ContentRichSlot.vue diff --git a/playground/shared/components/content/MarkdownBetween.vue b/playground/shared/components/content/MarkdownBetween.vue index c6a7d685e..2edbd2e40 100644 --- a/playground/shared/components/content/MarkdownBetween.vue +++ b/playground/shared/components/content/MarkdownBetween.vue @@ -1,5 +1,5 @@ diff --git a/playground/shared/components/content/Alert.vue b/playground/shared/components/content/Alert.vue index de85de518..2d2b1332d 100644 --- a/playground/shared/components/content/Alert.vue +++ b/playground/shared/components/content/Alert.vue @@ -1,6 +1,6 @@ diff --git a/playground/shared/components/content/MarkdownBetween.vue b/playground/shared/components/content/MarkdownBetween.vue index 884059f18..b0ddca65e 100644 --- a/playground/shared/components/content/MarkdownBetween.vue +++ b/playground/shared/components/content/MarkdownBetween.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/ContentRichSlot.vue b/src/runtime/components/ContentSlot.vue similarity index 95% rename from src/runtime/components/ContentRichSlot.vue rename to src/runtime/components/ContentSlot.vue index dcac982eb..d558bd6de 100644 --- a/src/runtime/components/ContentRichSlot.vue +++ b/src/runtime/components/ContentSlot.vue @@ -3,10 +3,10 @@ import type { Slot } from 'vue' import { defineComponent, getCurrentInstance, useSlots, computed, useUnwrap, h } from '#imports' /** - * ContentRichSlot component + * ContentSlot component */ export default defineComponent({ - name: 'ContentRichSlot', + name: 'ContentSlot', functional: true, props: { /** @@ -47,7 +47,7 @@ export default defineComponent({ if (typeof use === 'string') { slot = parent?.slots[use] || parent?.parent?.slots[use] // eslint-disable-next-line no-console - console.warn(`Please set :use="$slots.${use}" in component to enable reactivity`) + console.warn(`Please set :use="$slots.${use}" in component to enable reactivity`) } if (!slot) { return fallbackSlot ? fallbackSlot() : h('div') } diff --git a/src/runtime/components/Markdown.vue b/src/runtime/components/Markdown.vue index 63f1e2570..58b3f572d 100644 --- a/src/runtime/components/Markdown.vue +++ b/src/runtime/components/Markdown.vue @@ -1,5 +1,5 @@