From 5184f1f9fb052e62a1450f1a5aadd3c729985d88 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Tue, 30 Apr 2024 05:52:20 +0800 Subject: [PATCH] docs: update caiuse doc --- docs/.vuepress/themes/components/CanIUseConfig.vue | 5 +++-- docs/.vuepress/themes/composables/caniuse.ts | 4 ++-- docs/notes/tools/caniuse.md | 13 +++++++++++++ readme.md | 7 ++++--- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/.vuepress/themes/components/CanIUseConfig.vue b/docs/.vuepress/themes/components/CanIUseConfig.vue index 3f714a30..866239e6 100644 --- a/docs/.vuepress/themes/components/CanIUseConfig.vue +++ b/docs/.vuepress/themes/components/CanIUseConfig.vue @@ -42,19 +42,20 @@ const { output, rendered } = useCaniuse({ feature, embedType, past, future })
浏览器版本:
- - - diff --git a/docs/.vuepress/themes/composables/caniuse.ts b/docs/.vuepress/themes/composables/caniuse.ts index a6df2293..c6f33368 100644 --- a/docs/.vuepress/themes/composables/caniuse.ts +++ b/docs/.vuepress/themes/composables/caniuse.ts @@ -57,8 +57,8 @@ export function useCaniuseFeaturesSearch( inputEl: Ref, listEl: Ref, ) { - const features = useLocalStorage('caniuse-features', [] as Feature[]) - const featuresUpdated = useLocalStorage('caniuse-features-updated', Date.now()) + const features = useLocalStorage('plume:caniuse-feature-list', [] as Feature[]) + const featuresUpdated = useLocalStorage('plume:caniuse-feature-list-updated', Date.now()) const maxAge = 1000 * 60 * 60 * 24 * 3 // 3 days onMounted(async () => { if (typeof document === 'undefined') diff --git a/docs/notes/tools/caniuse.md b/docs/notes/tools/caniuse.md index e9ec65ee..07b9ffac 100644 --- a/docs/notes/tools/caniuse.md +++ b/docs/notes/tools/caniuse.md @@ -10,6 +10,19 @@ contributors: false lastUpdated: false --- +::: info 提示 +除了使用本工具,你也可以直接访问 [caniuse.com/](https://caniuse.com/) 搜索特性, +在结果页中,点击 左侧的 `#` 按钮后,浏览器的地址栏会自动跳转,例如: + +搜索 `@property`,点击 `#` 会跳转到 `https://caniuse.com/mdn-css_at-rules_property`, +可以直接复制 `mdn-css_at-rules_property` ,粘贴到 markdown 文件中: + +```md +@[caniuse](mdn-css_at-rules_property) +``` + +::: + 本工具用于帮助搜索 caniuse 中的特性。并生成 caniuse markdown 代码。 diff --git a/readme.md b/readme.md index 7f45f34b..f71b3106 100644 --- a/readme.md +++ b/readme.md @@ -19,14 +19,15 @@ - 💻 响应式布局,适配不同的屏幕尺寸 - 📖 博客 & 文档 - 🔗 自动生成文章永久链接 -- ⚖ 支持多语言 +- ⚖ 支持多语言 - 🔑 支持 全站加密、部分加密 - 👀 支持 搜索、文章评论 - 👨‍💻‍ 支持 浅色/深色 主题 (包括代码高亮) - 📠 markdown 增强,支持 代码块分组、提示容器、任务列表、数学公式、代码演示 等 -- 📚 代码演示,支持 CodePen, Replit, JSFiddle, CodeSandbox 等 -- 📊 嵌入图标,支持 chart.js,Echarts,Mermaid,flowchart +- 📚 嵌入代码演示,支持 CodePen, Replit, JSFiddle, CodeSandbox 等 +- 📊 嵌入图表,支持 chart.js,Echarts,Mermaid,flowchart - 🎛 资源嵌入,支持 PDF, bilibili视频,youtube视频等 +- 🪞 支持全站水印、部分内容水印 ## Install