docs: update caiuse doc

This commit is contained in:
pengzhanbo 2024-04-30 05:52:20 +08:00
parent c70f0d61e5
commit 5184f1f9fb
4 changed files with 22 additions and 7 deletions

View File

@ -42,19 +42,20 @@ const { output, rendered } = useCaniuse({ feature, embedType, past, future })
<label v-for="item in embedTypeList" :key="item.label">
<input v-model="embedType" type="radio" name="embedType" :value="item.value">
<span>{{ item.label }}</span>
<Badge v-if="item.value === 'image'" type="warning" text="不推荐" />
</label>
</div>
</div>
<div v-if="!embedType" class="caniuse-form-item">
<span>浏览器版本</span>
<div class="caniuse-browser-version">
<select v-model="past">
<select v-model="past" name="past">
<option v-for="item in pastList" :key="item.value" :value="item.value">
{{ item.label }}
</option>
</select>
<span>-</span>
<select v-model="future">
<select v-model="future" name="future">
<option v-for="item in futureList" :key="item.value" :value="item.value">
{{ item.label }}
</option>

View File

@ -57,8 +57,8 @@ export function useCaniuseFeaturesSearch(
inputEl: Ref<HTMLInputElement | null>,
listEl: Ref<HTMLUListElement | null>,
) {
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')

View File

@ -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 代码。
<CanIUseConfig />

View File

@ -19,14 +19,15 @@
- 💻 响应式布局,适配不同的屏幕尺寸
- 📖 博客 & 文档
- 🔗 自动生成文章永久链接
- ⚖ 支持多语言
- ⚖ 支持多语言
- 🔑 支持 全站加密、部分加密
- 👀 支持 搜索、文章评论
- 👨‍💻‍ 支持 浅色/深色 主题 (包括代码高亮)
- 📠 markdown 增强,支持 代码块分组、提示容器、任务列表、数学公式、代码演示 等
- 📚 代码演示,支持 CodePen, Replit, JSFiddle, CodeSandbox 等
- 📊 嵌入图,支持 chart.jsEchartsMermaidflowchart
- 📚 嵌入代码演示,支持 CodePen, Replit, JSFiddle, CodeSandbox 等
- 📊 嵌入图,支持 chart.jsEchartsMermaidflowchart
- 🎛 资源嵌入,支持 PDF, bilibili视频youtube视频等
- 🪞 支持全站水印、部分内容水印
## Install