mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
fix: 解决动态变更颜色,部分组件不会更新的问题
This commit is contained in:
parent
8ddc85738a
commit
a6d1baec3e
@ -28,7 +28,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import {
|
import {
|
||||||
@ -46,8 +46,13 @@ const chartEditStore = useChartEditStore()
|
|||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
|
// 选中名称
|
||||||
const selectName = computed(() => {
|
const selectName = computed(() => {
|
||||||
return chartEditStore.getEditCanvasConfig.chartThemeColor
|
return chartEditStore.getEditCanvasConfig.chartThemeColor
|
||||||
})
|
})
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { animations } from '@/settings/animations/index'
|
import { animations } from '@/settings/animations/index'
|
||||||
import { CollapseItem } from '@/components/Pages/ChartItemSetting'
|
import { CollapseItem } from '@/components/Pages/ChartItemSetting'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
@ -42,12 +42,16 @@ import { useTargetData } from '../hooks/useTargetData.hook'
|
|||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
const hoverPreviewAnimate = ref('')
|
const hoverPreviewAnimate = ref('')
|
||||||
|
|
||||||
const { targetData } = useTargetData()
|
const { targetData } = useTargetData()
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
// * 选中的动画样式
|
// * 选中的动画样式
|
||||||
const activeIndex = (value: string) => {
|
const activeIndex = (value: string) => {
|
||||||
const selectValue = targetData.value.styles.animations
|
const selectValue = targetData.value.styles.animations
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs, onBeforeUnmount, watchEffect, toRaw } from 'vue'
|
import { ref, toRefs, computed, onBeforeUnmount, watchEffect, toRaw } from 'vue'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
import { SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
@ -108,7 +108,6 @@ const {
|
|||||||
requestIntervalUnit: GlobalRequestIntervalUnit
|
requestIntervalUnit: GlobalRequestIntervalUnit
|
||||||
} = toRefs(chartEditStore.getRequestGlobalConfig)
|
} = toRefs(chartEditStore.getRequestGlobalConfig)
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
// 是否展示数据分析
|
// 是否展示数据分析
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -142,6 +141,11 @@ const sendHandle = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
const filter = targetData.value?.filter
|
const filter = targetData.value?.filter
|
||||||
if (lastFilter !== filter && firstFocus) {
|
if (lastFilter !== filter && firstFocus) {
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs } from 'vue'
|
import { ref, toRefs, computed } from 'vue'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
import { SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
import { useTargetData } from '@/views/chart/ContentConfigurations/components/hooks/useTargetData.hook'
|
import { useTargetData } from '@/views/chart/ContentConfigurations/components/hooks/useTargetData.hook'
|
||||||
@ -79,9 +79,12 @@ const { requestOriginUrl, requestInterval, requestIntervalUnit } = toRefs(chartE
|
|||||||
const editDisabled = ref(true)
|
const editDisabled = ref(true)
|
||||||
|
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
const showTable = ref(false)
|
const showTable = ref(false)
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, watch } from 'vue'
|
import { reactive, computed, watch } from 'vue'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
@ -21,7 +21,6 @@ import throttle from 'lodash/throttle'
|
|||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
@ -49,6 +48,11 @@ const useComponentStyle = (attr?: Partial<{ x: number; y: number }>) => {
|
|||||||
return componentStyle
|
return componentStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
// * 吸附距离
|
// * 吸附距离
|
||||||
const minDistance = computed(() => {
|
const minDistance = computed(() => {
|
||||||
return settingStore.getChartAlignRange
|
return settingStore.getChartAlignRange
|
||||||
|
@ -11,13 +11,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs } from 'vue'
|
import { toRefs, computed } from 'vue'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
|
|
||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
|
|
||||||
const { width, height } = toRefs(chartEditStore.getEditCanvasConfig)
|
const { width, height } = toRefs(chartEditStore.getEditCanvasConfig)
|
||||||
|
|
||||||
@ -34,6 +33,12 @@ const lines = {
|
|||||||
h: [],
|
h: [],
|
||||||
v: []
|
v: []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs, watch } from 'vue'
|
import { ref, toRefs, watch, computed } from 'vue'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { useSizeStyle, useComponentStyle } from '../../hooks/useStyle.hook'
|
import { useSizeStyle, useComponentStyle } from '../../hooks/useStyle.hook'
|
||||||
@ -14,10 +14,13 @@ import { selectBoxIndex } from '@/settings/designSetting'
|
|||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
const { isSelect, scale } = toRefs(chartEditStore.getEditCanvas)
|
const { isSelect, scale } = toRefs(chartEditStore.getEditCanvas)
|
||||||
|
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
// 位置
|
// 位置
|
||||||
const positionStyle = ref()
|
const positionStyle = ref()
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, PropType } from 'vue'
|
import { computed, PropType } from 'vue'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
||||||
@ -39,9 +39,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 全局颜色
|
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
|
|
||||||
// 锚点
|
// 锚点
|
||||||
@ -50,6 +48,11 @@ const pointList = ['t', 'r', 'b', 'l', 'lt', 'rt', 'lb', 'rb']
|
|||||||
// 光标朝向
|
// 光标朝向
|
||||||
const cursorResize = ['n', 'e', 's', 'w', 'nw', 'ne', 'sw', 'se']
|
const cursorResize = ['n', 'e', 's', 'w', 'nw', 'ne', 'sw', 'se']
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
// 计算当前选中目标
|
// 计算当前选中目标
|
||||||
const hover = computed(() => {
|
const hover = computed(() => {
|
||||||
return props.item.id === chartEditStore.getTargetChart.hoverId
|
return props.item.id === chartEditStore.getTargetChart.hoverId
|
||||||
|
@ -70,9 +70,13 @@ const { FolderIcon, FolderOpenIcon } = icon.ionicons5
|
|||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
const { handleContextMenu, onClickOutSide } = useContextMenu()
|
const { handleContextMenu, onClickOutSide } = useContextMenu()
|
||||||
|
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
const expend = ref(false)
|
const expend = ref(false)
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
// 右键
|
// 右键
|
||||||
const optionsHandle = (
|
const optionsHandle = (
|
||||||
targetList: MenuOptionsItemType[],
|
targetList: MenuOptionsItemType[],
|
||||||
|
@ -22,16 +22,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, toRefs, computed } from 'vue'
|
import { toRefs, computed } from 'vue'
|
||||||
import { requireErrorImg } from '@/utils'
|
import { requireErrorImg } from '@/utils'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
const themeColor = ref(designStore.getAppTheme)
|
|
||||||
const chartEditStore = useChartEditStore()
|
const chartEditStore = useChartEditStore()
|
||||||
|
|
||||||
|
// 颜色
|
||||||
|
const themeColor = computed(() => {
|
||||||
|
return designStore.getAppTheme
|
||||||
|
})
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
componentData: {
|
componentData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
Loading…
Reference in New Issue
Block a user