mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
尝试添加YAML配置文件编辑功能
This commit is contained in:
41
templates/auto_pt/settings.html
Normal file
41
templates/auto_pt/settings.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
{% include 'admin/includes/css-part.html' %}
|
||||
<style>
|
||||
#codeEditor {
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="settings">
|
||||
<code v-html="config" id="codeEditor" class="ace_editor" type="textarea"></code>
|
||||
</div>
|
||||
{% include 'admin/includes/js-part.html' %}
|
||||
<script src="{% static 'admin/simpleui-x/js/axios.min.js' %}"></script>
|
||||
<script>
|
||||
const vm = new Vue({
|
||||
el: '#settings',
|
||||
data() {
|
||||
return {
|
||||
config: "{{ config }}",
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user