feat(add docs):

This commit is contained in:
boommanpro
2024-08-05 23:41:00 +08:00
parent 9ef6111ff6
commit d47976b1e0
20 changed files with 145 additions and 137 deletions

View File

@@ -2,6 +2,11 @@
Monaco Editor 官方 rep: https://microsoft.github.io/monaco-editor/
## 演示效果
演示站点https://boommanpro.github.io/vue3-vite-monaco-editor/
![演示图片](https://raw.githubusercontent.com/boommanpro/vue3-vite-monaco-editor/main/images/Snipaste_001.jpg)
## 整体链路
①创建vite项目
@@ -41,8 +46,10 @@ self.MonacoEnvironment = {
monaco.languages.typescript.typescriptDefaults.setEagerModelSync(true);
```
3. main.js 引入 -> `import './worker.js'`
4. 创建组件 MonacoVite.vue 组件实现了双向绑定
```
<template>
<div :style="{

View File

@@ -4,4 +4,5 @@ import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: './', // 设置基础路径为 './' 表示相对路径
})

View File

@@ -1,4 +1,4 @@
import{m as et}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as et}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as f}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as f}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as l}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as l}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as s}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as s}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as lt}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as lt}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
import{conf as t,language as e}from"./typescript-Ng0_s1ea.js";import"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{conf as t,language as e}from"./typescript-mPHwF3n0.js";import"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as Et}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as Et}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as l}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as l}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as s}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as s}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as o}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as o}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{t as O,m as I}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{t as O,m as I}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as s}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as s}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as r}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as r}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -1,4 +1,4 @@
import{m as l}from"./index-BrXGcXRv.js";/*!-----------------------------------------------------------------------------
import{m as l}from"./index-DYZX9Lay.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
* Released under the MIT license

View File

@@ -2,11 +2,11 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<script type="module" crossorigin src="/assets/index-BrXGcXRv.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-sjOjmtig.css">
<script type="module" crossorigin src="./assets/index-DYZX9Lay.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-kHB7Hk61.css">
</head>
<body>
<div id="app"></div>