Vue 3.0文檔風(fēng)格指南

2021-11-03 15:50 更新

本指南將概述可用于創(chuàng)建文檔的不同設(shè)計元素。

#警告

VuePress 提供了一個自定義容器插件來創(chuàng)建警稿框。有四種類型:

  • Info:提供中立的信息
  • Tip:提供積極和鼓勵的信息
  • Warning:提供用戶應(yīng)該知道的信息,因?yàn)榇嬖诘偷街械?/li>
  • Danger:供對用戶具有高風(fēng)險的負(fù)面信息

Markdown 范例

  1. ::: info
  2. You can find more information at this site.
  3. :::
  4. ::: tip
  5. This is a great tip to remember!
  6. :::
  7. ::: warning
  8. This is something to be cautious of.
  9. :::
  10. ::: danger DANGER
  11. This is something we do not recommend. Use at your own risk.
  12. :::

渲染 Markdown

INFO

你可以在這個網(wǎng)站上找到更多信息。

TIP

這是一個值得記住的好提示!

WARNING

這是需要謹(jǐn)慎的。

DANGER

這是我們不推薦的。使用風(fēng)險自負(fù)。

#代碼塊

VuePress 使用 Prism 提供語言語法高亮顯示,方法是將語言附加到代碼塊的起始反撇號:

Markdown 示例

  1. ```js
  2. export default {
  3. name: 'MyComponent'
  4. }
  5. ```

渲染輸出

  1. export default {
  2. name: 'MyComponent'
  3. }

#行高亮

向代碼塊添加行高亮顯示,需要在大括號中附加行號。

#單行

Markdown 示例

  1. ```js{2}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```

渲染 Markdown

  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }

#行組

  1. ```js{4-5}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```

  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }

#多個段落

  1. ```js{2,4-5}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```

  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號