mirror of https://github.com/halo-dev/halo-admin
673947b2d0
#### What type of PR is this? /kind feature /milestone 2.0 #### What this PR does / why we need it: 为 Codemirror 组件添加更多预设语言支持,以及支持从外部传入语言包。 目前预设支持: 1. yaml 2. html 3. javascript 4. css 5. json 使用方式: 1. 使用预设 ```vue <script lang="ts" setup> import { VCodemirror } from "@halo-dev/components" </script> <template> <VCodemirror language="html" /> </template> ``` 2. 外部引入 ```bash pnpm install @codemirror/lang-java ``` ```vue <script lang="ts" setup> import { VCodemirror } from "@halo-dev/components" import { java } from "@codemirror/lang-java" </script> <template> <VCodemirror :language="java()" /> </template> ``` #### Special notes for your reviewer: /cc @halo-dev/sig-halo-console #### Does this PR introduce a user-facing change? ```release-note None ``` |
||
---|---|---|
.. | ||
components | ||
shared |