qianlishi 3 years ago
parent 3ed6520ee7
commit 044c5b6fa1

@ -13,6 +13,7 @@
}, },
"dependencies": { "dependencies": {
"@ckeditor/ckeditor5-build-decoupled-document": "^23.1.0", "@ckeditor/ckeditor5-build-decoupled-document": "^23.1.0",
"@smallwei/avue": "^2.8.14",
"axios": "0.18.0", "axios": "0.18.0",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"codemirror": "^5.58.1", "codemirror": "^5.58.1",

@ -27,6 +27,10 @@ import '@/permission'
import '@/extend' import '@/extend'
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
Vue.use(Avue);
// enable element zh-cn // enable element zh-cn
Vue.use(ElementUI, { zhLocale }) Vue.use(ElementUI, { zhLocale })

@ -7,182 +7,242 @@
!--> !-->
<template> <template>
<div class="collapse-input-style"> <div class="collapse-input-style">
<el-form label-width="80px" <el-form label-width="80px" label-position="left">
label-position="left">
<template v-for="(item, index) in options"> <template v-for="(item, index) in options">
<div v-if="isShowForm(item, '[object Object]')" <div v-if="isShowForm(item, '[object Object]')" :key="index">
:key="index"> <el-form-item
<el-form-item v-if="inputShow[item.name]" v-if="inputShow[item.name]"
:label="item.label" :label="item.label"
:prop="item.name" :prop="item.name"
:required="item.required"> :required="item.required"
<el-input-number v-if="item.type == 'el-input-number'" >
<el-input-number
v-if="item.type == 'el-input-number'"
size="mini" size="mini"
style="width:100%" style="width:100%"
v-model="formData[item.name]" v-model="formData[item.name]"
controls-position="right" controls-position="right"
:placeholder="item.placeholder" :placeholder="item.placeholder"
@change="changed($event, item.name)" /> @change="changed($event, item.name)"
/>
<el-input v-if="item.type == 'el-input-text'" <el-input
v-if="item.type == 'el-input-text'"
v-model.trim="formData[item.name]" v-model.trim="formData[item.name]"
type="text" type="text"
size="mini" size="mini"
placeholder="请输入内容" placeholder="请输入内容"
clearable clearable
@change="changed($event, item.name)" /> @change="changed($event, item.name)"
/>
<el-input v-if="item.type == 'el-input-textarea'" <el-input
v-if="item.type == 'el-input-textarea'"
v-model.trim="formData[item.name]" v-model.trim="formData[item.name]"
type="textarea" type="textarea"
size="mini" size="mini"
rows="2" rows="2"
placeholder="请输入内容" placeholder="请输入内容"
@change="changed($event, item.name)" /> @change="changed($event, item.name)"
/>
<el-switch v-if="item.type == 'el-switch'" <el-switch
v-if="item.type == 'el-switch'"
v-model="formData[item.name]" v-model="formData[item.name]"
size="mini" size="mini"
placeholder="请输入内容" placeholder="请输入内容"
@change="changed($event, item.name)" /> @change="changed($event, item.name)"
/>
<ColorPicker v-if="item.type == 'vue-color'" <ColorPicker
v-if="item.type == 'vue-color'"
v-model="formData[item.name]" v-model="formData[item.name]"
@change="(val) => changed(val, item.name)" /> @change="val => changed(val, item.name)"
/>
<el-upload v-if="item.type == 'el-upload-picture'" <el-upload
v-if="item.type == 'el-upload-picture'"
size="mini" size="mini"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card" /> list-type="picture-card"
/>
<el-radio-group v-if="item.type == 'el-radio-group'" <el-radio-group
v-if="item.type == 'el-radio-group'"
v-model="formData[item.name]" v-model="formData[item.name]"
@change="(val) => changed(val, item.name)"> @change="val => changed(val, item.name)"
<el-radio v-for="itemChild in item.selectOptions" >
<el-radio
v-for="itemChild in item.selectOptions"
:key="itemChild.code" :key="itemChild.code"
:label="itemChild.code">{{ itemChild.name }}</el-radio> :label="itemChild.code"
>{{ itemChild.name }}</el-radio
>
</el-radio-group> </el-radio-group>
<el-select v-if="item.type == 'el-select'" <el-select
v-if="item.type == 'el-select'"
size="mini" size="mini"
v-model="formData[item.name]" v-model="formData[item.name]"
clearable clearable
placeholder="请选择" placeholder="请选择"
@change="(val) => changed(val, item.name)"> @change="val => changed(val, item.name)"
<el-option v-for="itemChild in item.selectOptions" >
<el-option
v-for="itemChild in item.selectOptions"
:key="itemChild.code" :key="itemChild.code"
:label="itemChild.name" :label="itemChild.name"
:value="itemChild.code" /> :value="itemChild.code"
/>
</el-select> </el-select>
<el-slider v-if="item.type == 'el-slider'" <el-slider
v-if="item.type == 'el-slider'"
v-model="formData[item.name]" v-model="formData[item.name]"
@change="(val) => changed(val, item.name)" /> @change="val => changed(val, item.name)"
/>
<el-button v-if="item.type == 'el-button'" <el-button
v-if="item.type == 'el-button'"
type="primary" type="primary"
plain plain
@click="addStaticData">编辑</el-button> @click="addStaticData"
>编辑</el-button
>
<!-- 弹窗 --> <!-- 弹窗 -->
<el-dialog title="代码编辑" <el-dialog
title="代码编辑"
:visible.sync="dialogVisibleStaticData" :visible.sync="dialogVisibleStaticData"
width="50%" width="50%"
:before-close="handleClose"> :before-close="handleClose"
<codemirror v-model.trim="formData[item.name]" >
<codemirror
v-model.trim="formData[item.name]"
class="code-mirror" class="code-mirror"
:options="optionsJavascript" :options="optionsJavascript"
style="height: 190px" /> style="height: 190px"
<span slot="footer" />
class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisibleStaticData = false"> </el-button> <el-button @click="dialogVisibleStaticData = false"
<el-button type="primary" > </el-button
@click="saveData"> </el-button> >
<el-button type="primary" @click="saveData"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</el-form-item> </el-form-item>
<dynamicComponents v-if="item.type == 'dycustComponents' && inputShow[item.name]" <dynamicComponents
v-if="item.type == 'dycustComponents' && inputShow[item.name]"
v-model="formData[item.name]" v-model="formData[item.name]"
:chart-type="item.chartType" /> :chart-type="item.chartType"
/>
</div> </div>
<div v-else-if="isShowForm(item, '[object Array]')" <div v-else-if="isShowForm(item, '[object Array]')" :key="'a-' + index">
:key="'a-' + index">
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item v-for="(itemChild, indexChild) in item" <el-collapse-item
v-for="(itemChild, indexChild) in item"
:key="indexChild" :key="indexChild"
:title="itemChild.name" :title="itemChild.name"
:name="indexChild"> :name="indexChild"
>
<template v-for="(itemChildList, idx) in itemChild.list"> <template v-for="(itemChildList, idx) in itemChild.list">
<el-form-item :key="idx" <el-form-item
:key="idx"
:label="itemChildList.label" :label="itemChildList.label"
:prop="itemChildList.name" :prop="itemChildList.name"
:required="itemChildList.required"> :required="itemChildList.required"
<el-input-number v-if="itemChildList.type == 'el-input-number'" >
<el-input-number
v-if="itemChildList.type == 'el-input-number'"
size="mini" size="mini"
style="width:100%" style="width:100%"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
controls-position="right" controls-position="right"
:placeholder="itemChildList.placeholder" :placeholder="itemChildList.placeholder"
@change="changed($event, itemChildList.name)" /> @change="changed($event, itemChildList.name)"
/>
<el-input v-if="itemChildList.type == 'el-input-text'" <el-input
v-if="itemChildList.type == 'el-input-text'"
v-model.trim="formData[itemChildList.name]" v-model.trim="formData[itemChildList.name]"
type="text" type="text"
size="mini" size="mini"
placeholder="请输入内容" placeholder="请输入内容"
clearable clearable
@change="changed($event, itemChildList.name)" /> @change="changed($event, itemChildList.name)"
/>
<el-input v-if="itemChildList.type == 'el-input-textarea'" <el-input
v-if="itemChildList.type == 'el-input-textarea'"
v-model.trim="formData[itemChildList.name]" v-model.trim="formData[itemChildList.name]"
size="mini" size="mini"
type="textarea" type="textarea"
rows="2" rows="2"
placeholder="请输入内容" placeholder="请输入内容"
@change="changed($event, itemChildList.name)" /> @change="changed($event, itemChildList.name)"
/>
<el-switch v-if="itemChildList.type == 'el-switch'" <el-switch
v-if="itemChildList.type == 'el-switch'"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
placeholder="请输入内容" placeholder="请输入内容"
size="mini" size="mini"
@change="changed($event, itemChildList.name)" /> @change="changed($event, itemChildList.name)"
/>
<ColorPicker v-if="itemChildList.type == 'vue-color'" <ColorPicker
v-if="itemChildList.type == 'vue-color'"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
@change="(val) => changed(val, itemChildList.name)" /> @change="val => changed(val, itemChildList.name)"
/>
<el-upload v-if="itemChildList.type == 'el-upload-picture'" <el-upload
v-if="itemChildList.type == 'el-upload-picture'"
size="mini" size="mini"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
list-type="picture-card" /> list-type="picture-card"
/>
<el-radio-group v-if="itemChildList.type == 'el-radio-group'" <el-radio-group
v-if="itemChildList.type == 'el-radio-group'"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
@change="(val) => changed(val, itemChildList.name)"> @change="val => changed(val, itemChildList.name)"
<el-radio v-for="it in itemChildList.selectOptions" >
<el-radio
v-for="it in itemChildList.selectOptions"
:key="it.code" :key="it.code"
:label="it.code">{{ it.name }}</el-radio> :label="it.code"
>{{ it.name }}</el-radio
>
</el-radio-group> </el-radio-group>
<el-select v-if="itemChildList.type == 'el-select'" <el-select
v-if="itemChildList.type == 'el-select'"
size="mini" size="mini"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
clearable clearable
placeholder="请选择" placeholder="请选择"
@change="(val) => changed(val, itemChildList.name)"> @change="val => changed(val, itemChildList.name)"
<el-option v-for="it in itemChildList.selectOptions" >
<el-option
v-for="it in itemChildList.selectOptions"
:key="it.code" :key="it.code"
:label="it.name" :label="it.name"
:value="it.code" /> :value="it.code"
/>
</el-select> </el-select>
<el-slider v-if="itemChildList.type == 'el-slider'" <el-slider
v-if="itemChildList.type == 'el-slider'"
v-model="formData[itemChildList.name]" v-model="formData[itemChildList.name]"
@change="(val) => changed(val, itemChildList.name)" /> @change="val => changed(val, itemChildList.name)"
/>
</el-form-item> </el-form-item>
<customColorComponents v-if="itemChildList.type == 'customColor'" <customColorComponents
v-if="itemChildList.type == 'customColor'"
:key="'b-' + idx" :key="'b-' + idx"
v-model="formData[itemChildList.name]" /> v-model="formData[itemChildList.name]"
/>
</template> </template>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
@ -193,44 +253,44 @@
</template> </template>
<script> <script>
import ColorPicker from './colorPicker.vue' import ColorPicker from "./colorPicker.vue";
import { codemirror } from 'vue-codemirror' // codeMirror import { codemirror } from "vue-codemirror"; // codeMirror
import 'codemirror/lib/codemirror.css' // import "codemirror/lib/codemirror.css"; //
import 'codemirror/theme/cobalt.css' // options import "codemirror/theme/cobalt.css"; // options
// language // language
import 'codemirror/mode/vue/vue.js' import "codemirror/mode/vue/vue.js";
import 'codemirror/mode/javascript/javascript.js' import "codemirror/mode/javascript/javascript.js";
import 'codemirror/mode/sql/sql.js' import "codemirror/mode/sql/sql.js";
import 'codemirror/mode/shell/shell.js' import "codemirror/mode/shell/shell.js";
import dynamicComponents from './dynamicComponents.vue' import dynamicComponents from "./dynamicComponents.vue";
import customColorComponents from './customColorComponents' import customColorComponents from "./customColorComponents";
export default { export default {
name: 'DynamicForm', name: "DynamicForm",
components: { components: {
ColorPicker, ColorPicker,
codemirror, codemirror,
dynamicComponents, dynamicComponents,
customColorComponents, customColorComponents
}, },
model: { model: {
prop: 'value', prop: "value",
event: 'input', event: "input"
}, },
props: { props: {
options: Array, options: Array,
value: { value: {
type: [Object], type: [Object],
default: () => { }, default: () => {}
}, }
}, },
data () { data() {
return { return {
formData: {}, formData: {},
inputShow: {}, // inputShow: {}, //
dialogVisibleStaticData: false, dialogVisibleStaticData: false,
validationRules: '', validationRules: "",
optionsJavascript: { optionsJavascript: {
mode: 'text/javascript', mode: "text/javascript",
tabSize: 2, // tabSize: 2, //
// theme: 'cobalt', // monokai JS // theme: 'cobalt', // monokai JS
lineNumbers: true, // lineNumbers: true, //
@ -238,104 +298,107 @@ export default {
styleActiveLine: true, // styleActiveLine: true, //
hintOptions: { hintOptions: {
completeSingle: true, // completeSingle: true //
},
},
} }
}
};
}, },
watch: { watch: {
value (newValue, oldValue) { value(newValue, oldValue) {
this.formData = newValue || {} this.formData = newValue || {};
},
options () {
this.setDefaultValue()
this.isShowData()
},
formData: {
handler () {
this.$emit('onChanged', this.formData)
},
deep: true,
}, },
options(val) {
console.log(val);
this.setDefaultValue();
this.isShowData();
}
// formData: {
// handler () {
// this.$emit('onChanged', this.formData)
// },
// deep: true,
// },
}, },
created () { created() {
this.isShowData() this.isShowData();
this.setDefaultValue() this.setDefaultValue();
}, },
mounted () { }, mounted() {},
methods: { methods: {
// //
changed (val, key) { changed(val, key) {
if (val.extend) { if (val.extend) {
this.$set(this.formData, key, val.value) this.$set(this.formData, key, val.value);
} else { } else {
this.$set(this.formData, key, val) this.$set(this.formData, key, val);
} }
this.$emit('onChanged', this.formData) this.$emit("onChanged", this.formData);
// key // key
for (var i = 0; i < this.options.length; i++) { for (var i = 0; i < this.options.length; i++) {
var item = this.options[i] var item = this.options[i];
if (item.relactiveDom == key) { if (item.relactiveDom == key) {
this.inputShow[item.name] = val == item.relactiveDomValue this.inputShow[item.name] = val == item.relactiveDomValue;
this.inputShow = Object.assign({}, this.inputShow) this.inputShow = Object.assign({}, this.inputShow);
} }
} }
}, },
saveData () { saveData() {
this.$emit('onChanged', this.formData) this.$emit("onChanged", this.formData);
this.dialogVisibleStaticData = false this.dialogVisibleStaticData = false;
}, },
// //
addStaticData () { addStaticData() {
this.dialogVisibleStaticData = true this.dialogVisibleStaticData = true;
}, },
handleClose () { handleClose() {
this.dialogVisibleStaticData = false this.dialogVisibleStaticData = false;
}, },
// //
isShowData () { isShowData() {
let currentData = {} let currentData = {};
const data = [] const data = [];
for (let i = 0; i < this.options.length; i++) { for (let i = 0; i < this.options.length; i++) {
// inputShow // inputShow
this.inputShow[this.options[i].name] = true this.inputShow[this.options[i].name] = true;
if (this.options[i].selectValue) { if (this.options[i].selectValue) {
currentData = this.options[i] currentData = this.options[i];
} else { } else {
data.push(this.options[i]) data.push(this.options[i]);
} }
} }
data.forEach((el) => { data.forEach(el => {
if (el.relactiveDomValue != currentData.value) { if (el.relactiveDomValue != currentData.value) {
this.inputShow[el.name] = false this.inputShow[el.name] = false;
} }
}) });
}, },
// //
setDefaultValue () { setDefaultValue() {
if (this.options && this.options.length > 0) { if (this.options && this.options.length > 0) {
for (let i = 0; i < this.options.length; i++) { for (let i = 0; i < this.options.length; i++) {
const obj = this.options[i] const obj = this.options[i];
if (Object.prototype.toString.call(obj) == '[object Object]') { if (Object.prototype.toString.call(obj) == "[object Object]") {
this.formData[this.options[i].name] = this.deepClone(this.options[i].value) this.formData[this.options[i].name] = this.deepClone(
} else if (Object.prototype.toString.call(obj) == '[object Array]') { this.options[i].value
);
} else if (Object.prototype.toString.call(obj) == "[object Array]") {
for (let j = 0; j < obj.length; j++) { for (let j = 0; j < obj.length; j++) {
const list = obj[j].list const list = obj[j].list;
list.forEach((el) => { list.forEach(el => {
this.formData[el.name] = el.value this.formData[el.name] = el.value;
}) });
} }
} }
} }
this.formData = Object.assign({}, this.formData) this.formData = Object.assign({}, this.formData);
} }
}, },
// //
isShowForm (val, type) { isShowForm(val, type) {
return Object.prototype.toString.call(val) == type return Object.prototype.toString.call(val) == type;
}, }
}, }
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -110,9 +110,10 @@
'background-origin': 'initial', 'background-origin': 'initial',
'background-clip': 'initial' 'background-clip': 'initial'
}" }"
@click="setOptionsOnClickScreen" @click.self="setOptionsOnClickScreen"
> >
<widget <widget
ref="widgets"
v-for="(widget, index) in widgets" v-for="(widget, index) in widgets"
:key="index" :key="index"
v-model="widget.value" v-model="widget.value"
@ -121,6 +122,7 @@
:bigscreen="{ bigscreenWidth, bigscreenHeight }" :bigscreen="{ bigscreenWidth, bigscreenHeight }"
@onActivated="setOptionsOnClickWidget" @onActivated="setOptionsOnClickWidget"
@contextmenu.prevent.native="rightClick($event, index)" @contextmenu.prevent.native="rightClick($event, index)"
@click.prevent.native="widgetsClick(index)"
/> />
</div> </div>
</vue-ruler-tool> </vue-ruler-tool>
@ -519,27 +521,34 @@ export default {
}, },
// //
setOptionsOnClickWidget(index) { setOptionsOnClickWidget(obj) {
// if (obj.index < 0 || obj.index >= this.widgets.length) {
this.activeName = "first";
this.screenCode = "";
if (typeof index == "number") {
if (index < 0 || index >= this.widgets.length) {
return; return;
} }
this.widgetIndex = index; this.widgetIndex = obj.index;
this.widgetOptions = this.deepClone(this.widgets[index]["options"]); this.widgetOptions = this.deepClone(this.widgets[obj.index]["options"]);
return; this.widgets[obj.index].value.position = obj;
this.widgets[obj.index].options.position.forEach(el => {
for (const key in obj) {
if (el.name == key) {
el.value = obj[key];
}
}
});
console.log(this.widgets);
},
widgetsClick(index) {
const draggableArr = this.$refs.widgets;
for (let i = 0; i < draggableArr.length; i++) {
if (i == index) {
this.$refs.widgets[i].$refs.draggable.setActive(true);
} else { } else {
// this.$refs.widgets[i].$refs.draggable.setActive(false);
this.widgets[index.index].value.position = index.obj; }
} }
}, },
// //
widgetValueChanged(key, val) { widgetValueChanged(key, val) {
console.log(key);
console.log(val);
/* this.widgets this.widgetIndex value /* this.widgets this.widgetIndex value
widgets: [{ widgets: [{
type: 'widget-text', type: 'widget-text',
@ -559,7 +568,6 @@ export default {
this.setDefaultValue(this.widgets[i].options[key], val); this.setDefaultValue(this.widgets[i].options[key], val);
} }
} }
console.log(this.widgets);
}, },
rightClick(event, index) { rightClick(event, index) {
this.rightClickIndex = index; this.rightClickIndex = index;

@ -5,47 +5,21 @@
* @Last Modified time: 2021-3-13 11:04:24 * @Last Modified time: 2021-3-13 11:04:24
!--> !-->
<template> <template>
<!-- <vue-draggable-resizable class="vue-draggalbe" :w="data.position.width" :h="data.position.height" :x="data.position.left" :y="data.position.top" :z="data.position.zIndex" :parent="true" :is-conflict-check="true" :snap="true" :resizable="true" :draggable="true" :prevent-deactivation="false" :active="true" :snap-tolerance="20" :class-name="'widget-container'" :class-name-active="'widget-active'" @activated="onActivated(index)" @resizestop="onResizstop" @dragstop="onDragstop"> <avue-draggable
<component :is="type" :value="value" /> :width="widgetsWidth"
</vue-draggable-resizable> --> :height="widgetsHeight"
<div @click.stop> :left="widgetsLeft"
<vue-drag-resize :top="widgetsTop"
:w="widgetsWidth" ref="draggable"
:h="widgetsHeight" :index="index"
:x="widgetsLeft" @focus="handleFocus"
:y="widgetsTop" @blur="handleBlur"
:z="widgetsZIndex"
:minw="10"
:minh="10"
:parent-w="bigscreen.bigscreenWidth"
:parent-h="bigscreen.bigscreenHeight"
:snap-tolerance="20"
:is-conflict-check="true"
:class-name="'widget-container'"
:class-name-active="'widget-active'"
:prevent-deactivation="false"
:is-active="true"
:is-draggable="true"
:is-resizable="true"
:parent-limitation="true"
:snap-to-grid="false"
:aspect-ratio="false"
@clicked="onActivated(index)"
@activated="onActivated(index)"
@dragstop="ev => onDragstop(ev, index)"
@resizing="ev => onResizing(ev, index)"
> >
<component :is="type" :value="value" /> <component :is="type" :value="value" />
</vue-drag-resize> </avue-draggable>
</div>
</template> </template>
<script> <script>
// https://gitee.com/charact/vue-draggable-resizable-gorkys#dragstop
// import VueDraggableResizable from 'vue-draggable-resizable-gorkys'
// import 'vue-draggable-resizable-gorkys/dist/VueDraggableResizable.css'
import VueDragResize from "vue-drag-resize";
import widgetHref from "./widgetHref.vue"; import widgetHref from "./widgetHref.vue";
import widgetText from "./widgetText.vue"; import widgetText from "./widgetText.vue";
import WidgetMarquee from "./widgetMarquee.vue"; import WidgetMarquee from "./widgetMarquee.vue";
@ -65,8 +39,6 @@ import WidgetGauge from "./widgetGauge.vue";
export default { export default {
name: "Widget", name: "Widget",
components: { components: {
// VueDraggableResizable,
VueDragResize,
widgetHref, widgetHref,
widgetText, widgetText,
WidgetMarquee, WidgetMarquee,
@ -129,14 +101,15 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
onActivated(index) { //
this.$emit("onActivated", index); handleFocus({ index, left, top, width, height }) {
// console.log(index, left, top, width, height);
}, },
onDragstop(obj, index) { //
this.$emit("onActivated", { index, obj }); handleBlur({ index, left, top, width, height }) {
}, console.log({ index, left, top, width, height });
onResizing(obj, index) { this.$emit("onActivated", { index, left, top, width, height });
this.$emit("onActivated", { index, obj }); this.$refs.draggable.setActive(true);
} }
} }
}; };
@ -153,4 +126,7 @@ export default {
border: 1px dashed #09f; border: 1px dashed #09f;
background-color: rgba(115, 170, 229, 0.5); background-color: rgba(115, 170, 229, 0.5);
} }
.avue-draggable {
padding: 0 !important;
}
</style> </style>

@ -335,8 +335,6 @@ export default {
.echarts { .echarts {
width: 100%; width: 100%;
height: 100%; height: 100%;
min-width: 200px;
min-height: 200px;
overflow: hidden; overflow: hidden;
} }
</style> </style>

@ -26,7 +26,6 @@ export default {
return this.objToOne(this.options); return this.objToOne(this.options);
}, },
styleColor() { styleColor() {
console.log(this.transStyle);
return { return {
position: this.ispreview ? "absolute" : "static", position: this.ispreview ? "absolute" : "static",
color: this.transStyle.color, color: this.transStyle.color,

Loading…
Cancel
Save