调整toml格式的内容显示与编辑
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
<script src="/static/js/element-ui/index.min.js"></script>
|
||||
<!-- Axios -->
|
||||
<script src="/static/js/axios.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/@iarna/toml@2.2.5/toml.js"></script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
|
||||
@@ -228,13 +228,7 @@
|
||||
try {
|
||||
// 验证TOML格式
|
||||
let configObj;
|
||||
try {
|
||||
configObj = toml.parse(this.editedConfig);
|
||||
} catch (e) {
|
||||
this.configError = 'TOML格式错误: ' + e.message;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 发送到后端保存
|
||||
axios.post('/api/plugins/config/update', {
|
||||
plugin_name: this.selectedPlugin.module_name,
|
||||
|
||||
Reference in New Issue
Block a user