Skip to content
Merged

V2 #296

Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions packages/demo/demo-v2/src/pages/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@
<script src="//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.10/vue.min.js"></script>
<script src="//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/element-ui/2.13.1/index.js"></script>
<script src="//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue-router/3.1.3/vue-router.min.js"></script>
<script src="//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/loader.js"></script>
<script src="//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30.0/min/vs/loader.js"></script>
<script>
require.config({ paths: { 'vs': '//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/' }});
require.config({ paths: { 'vs': '//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30.0/min/vs/' }});

// try {
// // https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
// window.MonacoEnvironment = {
// getWorkerUrl: function(workerId, label) {
// const code = encodeURIComponent(`
// self.MonacoEnvironment = {
// baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/'
// };
// importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20.0/min/vs/base/worker/workerMain.js');
// `);
//
// return 'data:text/javascript;charset=utf-8,' + code;
// }
// };
// } catch (e) {
// // nothing ....
// }
try {
// https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
window.MonacoEnvironment = {
getWorkerUrl: function(workerId, label) {
const code = encodeURIComponent(`
self.MonacoEnvironment = {
baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30.0/min/'
};
importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30.0/min/vs/base/worker/workerMain.js');
`);

return 'data:text/javascript;charset=utf-8,' + code;
}
};
} catch (e) {
// nothing ....
}
</script>
</body>
</html>