Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-monaco
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
vue-monaco
Commits
d8153f9d
Commit
d8153f9d
authored
Apr 27, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
original监听
parent
13de23ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
144 deletions
+166
-144
vue-monaco.es.js
dist/vue-monaco.es.js
+7
-0
vue-monaco.js
dist/vue-monaco.js
+7
-0
MonacoEditor.js
src/MonacoEditor.js
+152
-144
No files found.
dist/vue-monaco.es.js
View file @
d8153f9d
...
...
@@ -54,6 +54,13 @@ var MonacoEditor = {
if
(
this
.
editor
)
{
this
.
monaco
.
editor
.
setTheme
(
newVal
);
}
},
original
:
function
original
(
newVal
)
{
if
(
this
.
editor
)
{
var
editor
=
this
.
getEditor
();
var
model
=
editor
.
getModel
();
model
.
original
.
setValue
(
newVal
);
}
}
},
mounted
:
function
mounted
()
{
...
...
dist/vue-monaco.js
View file @
d8153f9d
...
...
@@ -76,6 +76,13 @@
if
(
this
.
editor
)
{
this
.
monaco
.
editor
.
setTheme
(
newVal
);
}
},
original
:
function
original
(
newVal
)
{
if
(
this
.
editor
)
{
var
editor
=
this
.
getEditor
();
var
model
=
editor
.
getModel
();
model
.
original
.
setValue
(
newVal
);
}
}
},
mounted
:
function
mounted
()
{
...
...
src/MonacoEditor.js
View file @
d8153f9d
...
...
@@ -41,7 +41,7 @@ export default {
value
(
newValue
)
{
if
(
this
.
editor
)
{
const
editor
=
this
.
getModifiedEditor
()
const
editor
=
this
.
getModifiedEditor
();
if
(
newValue
!==
editor
.
getValue
())
{
editor
.
setValue
(
newValue
)
}
...
...
@@ -50,7 +50,7 @@ export default {
language
(
newVal
)
{
if
(
this
.
editor
)
{
const
editor
=
this
.
getModifiedEditor
()
const
editor
=
this
.
getModifiedEditor
();
this
.
monaco
.
editor
.
setModelLanguage
(
editor
.
getModel
(),
newVal
)
}
},
...
...
@@ -59,6 +59,14 @@ export default {
if
(
this
.
editor
)
{
this
.
monaco
.
editor
.
setTheme
(
newVal
)
}
},
original
(
newVal
)
{
if
(
this
.
editor
)
{
const
editor
=
this
.
getEditor
();
let
model
=
editor
.
getModel
();
model
.
original
.
setValue
(
newVal
);
}
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment