Skip to content

Commit 2f872f2

Browse files
committed
chore(demo): 更新demo
1 parent 062b41d commit 2f872f2

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

packages/demo/demo-v2/src/pages/index/index.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@
2323
<script>
2424
require.config({ paths: { 'vs': '//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/' }});
2525

26-
try {
27-
// https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
28-
window.MonacoEnvironment = {
29-
getWorkerUrl: function(workerId, label) {
30-
const code = encodeURIComponent(`
31-
self.MonacoEnvironment = {
32-
baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/'
33-
};
34-
importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs//base/worker/workerMain.js');
35-
`);
36-
37-
return 'data:text/javascript;charset=utf-8,' + code;
38-
}
39-
};
40-
} catch (e) {
41-
// nothing ....
42-
}
26+
// try {
27+
// // https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
28+
// window.MonacoEnvironment = {
29+
// getWorkerUrl: function(workerId, label) {
30+
// const code = encodeURIComponent(`
31+
// self.MonacoEnvironment = {
32+
// baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/'
33+
// };
34+
// importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/base/worker/workerMain.js');
35+
// `);
36+
//
37+
// return 'data:text/javascript;charset=utf-8,' + code;
38+
// }
39+
// };
40+
// } catch (e) {
41+
// // nothing ....
42+
// }
4343
</script>
4444
</body>
4545
</html>

packages/demo/demo-v3/src/pages/index/index.html

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,22 @@
2424
<script src="//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/loader.js"></script>
2525
<script>
2626
require.config({ paths: { 'vs': '//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/' }});
27-
28-
try {
29-
window.MonacoEnvironment = {
30-
getWorkerUrl: function(workerId, label) {
31-
const code = encodeURIComponent(`
32-
self.MonacoEnvironment = {
33-
baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/'
34-
};
35-
importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs//base/worker/workerMain.js');
36-
`);
37-
38-
return 'data:text/javascript;charset=utf-8,' + code;
39-
}
40-
};
41-
} catch (e) {
42-
// nothing ....
43-
}
27+
// try {
28+
// window.MonacoEnvironment = {
29+
// getWorkerUrl: function(workerId, label) {
30+
// const code = encodeURIComponent(`
31+
// self.MonacoEnvironment = {
32+
// baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/'
33+
// };
34+
// importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/base/worker/workerMain.js');
35+
// `);
36+
//
37+
// return 'data:text/javascript;charset=utf-8,' + code;
38+
// }
39+
// };
40+
// } catch (e) {
41+
// // nothing ....
42+
// }
4443
</script>
4544
</body>
4645
</html>

0 commit comments

Comments
 (0)