feat:修改组件引入方式

main
liu.shiyi 2 years ago
parent ce98bddb4c
commit 8f303cd135

@ -31,7 +31,7 @@
import moment from 'moment'
import paramsMixins from 'data-room-ui/js/mixins/paramsMixins'
import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
import _ from 'lodash'
import cloneDeep from "lodash/cloneDeep";
import {mapMutations, mapState} from 'vuex'
export default {
name: 'CurrentTime',
@ -73,7 +73,7 @@ export default {
this.getCurrentTime(config.dateFormat)
config = { ...this.config, ...config }
//
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
config.theme = settingToTheme(cloneDeep(config), this.customTheme)
this.changeChartConfig(config)
if (config.code === this.activeCode) {
this.changeActiveItemConfig(config)

@ -34,7 +34,7 @@
<script>
import paramsMixins from 'data-room-ui/js/mixins/paramsMixins'
import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
import _ from 'lodash'
import cloneDeep from "lodash/cloneDeep";
import {mapMutations, mapState} from "vuex";
export default {
name: 'TimeCountDown',
@ -111,7 +111,7 @@ export default {
this.getTime()
config = { ...this.config, ...config }
//
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
config.theme = settingToTheme(cloneDeep(config), this.customTheme)
this.changeChartConfig(config)
if (this.config.code === this.activeCode) {
this.changeActiveItemConfig(config)

@ -12,7 +12,6 @@
</template>
<script>
import 'insert-css'
// import _ from 'lodash'
import cloneDeep from 'lodash/cloneDeep'
import linkageMixins from 'data-room-ui/js/mixins/linkageMixins'
import commonMixins from 'data-room-ui/js/mixins/commonMixins'
@ -20,7 +19,6 @@ import { mapState, mapMutations } from 'vuex'
import * as g2Plot from '@antv/g2plot'
import plotList, { getCustomPlots } from '../G2Plots/plotList'
import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
import _ from 'lodash'
export default {
name: 'PlotCustomComponent',
@ -192,7 +190,7 @@ export default {
}
}
//
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
config.theme = settingToTheme(cloneDeep(config), this.customTheme)
this.changeChartConfig(config)
if (config.code === this.activeCode) {
this.changeActiveItemConfig(config)

@ -1,7 +1,6 @@
import { mapMutations, mapState } from 'vuex'
import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
import _ from 'lodash'
import cloneDeep from "lodash/cloneDeep";
const refreshComponentMixin = {
data () {
return {
@ -38,7 +37,7 @@ const refreshComponentMixin = {
changeStyle (config) {
config = { ...this.config, ...config }
// 样式改变时更新主题配置
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
config.theme = settingToTheme(cloneDeep(config), this.customTheme)
this.changeChartConfig(config)
if (config.code === this.activeCode) {
this.changeActiveItemConfig(config)

@ -1,4 +1,4 @@
import _ from 'lodash'
/**
* @Description: 主题设置格式化

Loading…
Cancel
Save