From 336fcf98c3cdaebd15d7f88cdf0426e9abf7e92f Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Wed, 8 Sep 2021 14:33:27 +0800 Subject: [PATCH] docs(theme): Upgrade the use case of theme to Composition API (#1131) --- demo/pages/docs/theme/enUS/element.demo.md | 6 +++--- demo/pages/docs/theme/enUS/provide-theme.demo.md | 6 +++--- demo/pages/docs/theme/zhCN/element.demo.md | 6 +++--- demo/pages/docs/theme/zhCN/provide-theme.demo.md | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/demo/pages/docs/theme/enUS/element.demo.md b/demo/pages/docs/theme/enUS/element.demo.md index 902a3952e..252e2a2ef 100644 --- a/demo/pages/docs/theme/enUS/element.demo.md +++ b/demo/pages/docs/theme/enUS/element.demo.md @@ -22,15 +22,15 @@ Naive UI has `n-element` component. See [Element](../components/element). ``` ```js -import { ref } from 'vue' +import { defineComponent, ref } from 'vue' import { darkTheme } from 'naive-ui' -export default { +export default defineComponent({ setup () { return { darkTheme, theme: ref(null) } } -} +}) ``` diff --git a/demo/pages/docs/theme/enUS/provide-theme.demo.md b/demo/pages/docs/theme/enUS/provide-theme.demo.md index 72a84b280..825850bd5 100644 --- a/demo/pages/docs/theme/enUS/provide-theme.demo.md +++ b/demo/pages/docs/theme/enUS/provide-theme.demo.md @@ -14,15 +14,15 @@ Use `n-config-provider` to set the theme of all its descedant components. ``` ```js -import { ref } from 'vue' +import { defineComponent, ref } from 'vue' import { darkTheme } from 'naive-ui' -export default { +export default defineComponent({ setup () { return { darkTheme, theme: ref(null) } } -} +}) ``` diff --git a/demo/pages/docs/theme/zhCN/element.demo.md b/demo/pages/docs/theme/zhCN/element.demo.md index 49e3cf715..3a2c7a17b 100644 --- a/demo/pages/docs/theme/zhCN/element.demo.md +++ b/demo/pages/docs/theme/zhCN/element.demo.md @@ -22,15 +22,15 @@ Naive UI 提供 `n-element` 组件,参考 [Element](../components/element)。 ``` ```js -import { ref } from 'vue' +import { defineComponent, ref } from 'vue' import { darkTheme } from 'naive-ui' -export default { +export default defineComponent({ setup () { return { darkTheme, theme: ref(null) } } -} +}) ``` diff --git a/demo/pages/docs/theme/zhCN/provide-theme.demo.md b/demo/pages/docs/theme/zhCN/provide-theme.demo.md index 70d0a0cdb..a0513d54d 100644 --- a/demo/pages/docs/theme/zhCN/provide-theme.demo.md +++ b/demo/pages/docs/theme/zhCN/provide-theme.demo.md @@ -14,15 +14,15 @@ ``` ```js -import { ref } from 'vue' +import { defineComponent, ref } from 'vue' import { darkTheme } from 'naive-ui' -export default { +export default defineComponent({ setup () { return { darkTheme, theme: ref(null) } } -} +}) ```