Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update docs for 2.7 #1155

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ description: TDesign 适配桌面端的组件库,适合在 vue 2 技术栈项
spline: explain
---

<div style="background: rgba(0, 168, 112, .1); display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
<path fill="#00a870" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillopacity="0.9"></path>
</svg>
由于 vue2.7 与 tdesign-vue 的其他依赖不兼容,请暂时保证您的 vue 版本在 2.7 以下,未来将支持在 vue2.7 中使用。
</div>

### 安装

#### 使用 npm 安装
Expand Down Expand Up @@ -56,7 +63,6 @@ npm package 中提供了多种构建产物,可以阅读 [这里](https://githu
import 'tdesign-vue/dist/reset.css';
```


### 自动引入

故名思义,就是可以直接使用 TDesign 的组件,而不需要手动引入:
Expand All @@ -70,7 +76,7 @@ import 'tdesign-vue/dist/reset.css';
// import { Button as TButton } from 'tdesign-vue' // 组件的引入可以省略
export default {
// components: { TButton }, // 对应的组件注册也可以省略
}
};
</script>
```

Expand Down Expand Up @@ -131,13 +137,11 @@ module.exports = {
### 浏览器兼容性

| [<img src="https://tdesign.gtimg.com/docs/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> IE / Edge | [<img src="https://tdesign.gtimg.com/docs/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://tdesign.gtimg.com/docs/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://tdesign.gtimg.com/docs/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari |
| --- | --- | --- | --- |
| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |

| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |

详情参见[桌面端组件库浏览器兼容性说明](https://github.com/Tencent/tdesign/wiki/%E6%A1%8C%E9%9D%A2%E7%AB%AF%E7%BB%84%E4%BB%B6%E5%BA%93%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E6%80%A7%E8%AF%B4%E6%98%8E)


### FAQ

Q: 通过局部注册 (Local Registration) 使用时,报错 `Uncaught Error: [vue-composition-api] must call Vue.use(plugin) before using any function`
Expand Down