feat: init commit

This commit is contained in:
vicanso 2021-12-25 21:00:02 +08:00
commit ebc566fc9d
9 changed files with 1203 additions and 0 deletions

14
web/index.js Normal file
View file

@ -0,0 +1,14 @@
var height = document.body.clientHeight- 110;
var editor = CodeMirror.fromTextArea(document.getElementById("codeInput"), {
lineNumbers: true,
lineWrapping: true,
mode: "javascript"
});
editor.setSize("100%", height);
function run() {
var option = editor.getValue();
axios.post("/", JSON.parse(option)).then(function(resp) {
document.getElementById("svg").innerHTML = resp;
});
}