bug
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
"@jiaminghi/c-render": "^0.4.3",
|
"@jiaminghi/c-render": "^0.4.3",
|
||||||
"@jiaminghi/charts": "^0.2.18",
|
"@jiaminghi/charts": "^0.2.18",
|
||||||
"@jiaminghi/data-view": "^2.10.0",
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
"bin-code-editor": "^0.9.0",
|
"bin-ace-editor": "^3.2.0",
|
||||||
"dayjs": "^1.8.35",
|
"dayjs": "^1.8.35",
|
||||||
"dui": "file:ui",
|
"dui": "file:ui",
|
||||||
"echarts": "^5.1.2",
|
"echarts": "^5.1.2",
|
||||||
@@ -33,7 +33,6 @@
|
|||||||
"serialize-javascript": "^6.0.0",
|
"serialize-javascript": "^6.0.0",
|
||||||
"sortablejs": "^1.12.0",
|
"sortablejs": "^1.12.0",
|
||||||
"vue-draggable-resizable": "^2.3.0",
|
"vue-draggable-resizable": "^2.3.0",
|
||||||
"vue-json-editor": "^1.4.3",
|
|
||||||
"vue-ruler-tool": "^1.2.4",
|
"vue-ruler-tool": "^1.2.4",
|
||||||
"vue-style-loader": "^4.1.3",
|
"vue-style-loader": "^4.1.3",
|
||||||
"vuedraggable": "^2.24.3"
|
"vuedraggable": "^2.24.3"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
title="编辑器"
|
title="编辑器"
|
||||||
@onConfirm="onConfirm">
|
@onConfirm="onConfirm">
|
||||||
<div>
|
<div>
|
||||||
<code-editor v-model="json" :lint="true" auto-format height="440px"></code-editor>
|
<code-editor v-model="json" lang="json" theme="github" width="100%" height="440"></code-editor>
|
||||||
</div>
|
</div>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
<div class="layout-config__group" v-if="options.monitorType !== 'hik' && options.monitorType !== 'dahua'">
|
<div class="layout-config__group" v-if="options.monitorType !== 'hik' && options.monitorType !== 'dahua'">
|
||||||
@@ -28,12 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layout-config__code" v-if="options.dataType === 'staticData'">
|
<div class="layout-config__code" v-if="options.dataType === 'staticData'">
|
||||||
<el-button @click="showEditor" class="layout-config__code--btn" title="编辑" type="text" icon="iconfont iconjdq_led_edit"></el-button>
|
<el-button @click="showEditor" class="layout-config__code--btn" title="编辑" type="text" icon="iconfont iconjdq_led_edit"></el-button>
|
||||||
<vue-json-editor
|
<code-editor readonly :value="JSON.stringify(options.staticData, null, 2)" lang="json" theme="github" width="100%" height="250"></code-editor>
|
||||||
:value="options.staticData"
|
|
||||||
:show-btns="false"
|
|
||||||
mode="view"
|
|
||||||
lang="zh">
|
|
||||||
</vue-json-editor>
|
|
||||||
</div>
|
</div>
|
||||||
<template v-else-if="options.dataType === 'dynamicData'">
|
<template v-else-if="options.dataType === 'dynamicData'">
|
||||||
<div class="layout-config__item">
|
<div class="layout-config__item">
|
||||||
@@ -117,9 +112,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import vueJsonEditor from 'vue-json-editor'
|
import CodeEditor from 'bin-ace-editor'
|
||||||
import { CodeEditor } from 'bin-code-editor'
|
require('brace/mode/json')
|
||||||
import 'bin-code-editor/lib/styles/index.css'
|
require('brace/snippets/json')
|
||||||
|
require('brace/theme/github')
|
||||||
|
require('brace/theme/monokai')
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dataConfig',
|
name: 'dataConfig',
|
||||||
@@ -159,7 +156,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
vueJsonEditor,
|
|
||||||
CodeEditor
|
CodeEditor
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -195,7 +191,7 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
showEditor () {
|
showEditor () {
|
||||||
this.json = JSON.stringify(this.options.staticData)
|
this.json = JSON.stringify(this.options.staticData, null, 2)
|
||||||
this.isShowEditor = true
|
this.isShowEditor = true
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -340,24 +336,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.layout-config__group--wrapper {
|
.layout-config__group--wrapper {
|
||||||
.layout-config__code .jsoneditor-vue {
|
.layout-config__code .bin-ace-editor {
|
||||||
.jsoneditor-menu {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jsoneditor {
|
|
||||||
border: 1px solid #030411;
|
|
||||||
background: #0e1013;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jsoneditor-field {
|
|
||||||
color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jsoneditor-tree button:focus {
|
|
||||||
background-color: transparent;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-config__group {
|
.layout-config__group {
|
||||||
@@ -377,10 +356,10 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
color: gray;
|
color: gray;
|
||||||
z-index: 1;
|
z-index: 111;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8 ;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user