mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增对齐线
This commit is contained in:
+4
-4
@@ -29,7 +29,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import {
|
||||
chartColors,
|
||||
@@ -42,14 +42,14 @@ import cloneDeep from 'lodash/cloneDeep'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const { SquareIcon } = icon.ionicons5
|
||||
const chartEditStoreStore = useChartEditStoreStore()
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
// 全局颜色
|
||||
const designStore = useDesignStore()
|
||||
const themeColor = ref(designStore.getAppTheme)
|
||||
|
||||
const selectName = computed(() => {
|
||||
return chartEditStoreStore.getEditCanvasConfig.chartThemeColor
|
||||
return chartEditStore.getEditCanvasConfig.chartThemeColor
|
||||
})
|
||||
|
||||
// 获取用来展示的色号
|
||||
@@ -59,7 +59,7 @@ const fetchShowColors = (colors: Array<string>) => {
|
||||
|
||||
// 设置主体色(在 ContentEdit > List 中进行注入)
|
||||
const selectTheme = (theme: ChartColorsNameType) => {
|
||||
chartEditStoreStore.setEditCanvasConfig(EditCanvasConfigEnum.CHART_THEME_COLOR, theme)
|
||||
chartEditStore.setEditCanvasConfig(EditCanvasConfigEnum.CHART_THEME_COLOR, theme)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
size="small"
|
||||
v-model:value="canvasConfig.width"
|
||||
:validator="validator"
|
||||
@update:value="chartEditStoreStore.computedScale"
|
||||
@update:value="chartEditStore.computedScale"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="高度">
|
||||
@@ -15,7 +15,7 @@
|
||||
size="small"
|
||||
v-model:value="canvasConfig.height"
|
||||
:validator="validator"
|
||||
@update:value="chartEditStoreStore.computedScale"
|
||||
@update:value="chartEditStore.computedScale"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
@@ -110,7 +110,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { backgroundImageSize } from '@/settings/designSetting'
|
||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { fileToUrl, loadAsyncComponent } from '@/utils'
|
||||
@@ -119,8 +119,8 @@ import { icon } from '@/plugins'
|
||||
const { ColorPaletteIcon } = icon.ionicons5
|
||||
const { ZAxisIcon } = icon.carbon
|
||||
|
||||
const chartEditStoreStore = useChartEditStoreStore()
|
||||
const canvasConfig = chartEditStoreStore.getEditCanvasConfig
|
||||
const chartEditStore = useChartEditStore()
|
||||
const canvasConfig = chartEditStore.getEditCanvasConfig
|
||||
|
||||
const uploadFileListRef = ref()
|
||||
const switchSelectColorLoading = ref(false)
|
||||
@@ -184,11 +184,11 @@ const beforeUploadHandle = async ({ file }) => {
|
||||
|
||||
// 清除背景
|
||||
const clearImage = () => {
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.BACKGROUND_IAMGE,
|
||||
undefined
|
||||
)
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.SELECT_COLOR,
|
||||
true
|
||||
)
|
||||
@@ -196,12 +196,12 @@ const clearImage = () => {
|
||||
|
||||
// 清除颜色
|
||||
const clearColor = () => {
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.BACKGROUND,
|
||||
undefined
|
||||
)
|
||||
if (canvasConfig.backgroundImage) {
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.SELECT_COLOR,
|
||||
false
|
||||
)
|
||||
@@ -232,11 +232,11 @@ const customRequest = (options: UploadCustomRequestOptions) => {
|
||||
nextTick(() => {
|
||||
if (file.file) {
|
||||
const ImageUrl = fileToUrl(file.file)
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.BACKGROUND_IAMGE,
|
||||
ImageUrl
|
||||
)
|
||||
chartEditStoreStore.setEditCanvasConfig(
|
||||
chartEditStore.setEditCanvasConfig(
|
||||
EditCanvasConfigEnum.SELECT_COLOR,
|
||||
false
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, Ref } from 'vue'
|
||||
import { loadAsyncComponent } from '@/utils'
|
||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { GlobalSetting, PositionSetting, SizeSetting } from '@/components/ChartItemSetting/index'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
||||
@@ -33,11 +33,11 @@ import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
||||
const GlobalSettingCom = loadAsyncComponent(() =>
|
||||
import('@/components/ChartItemSetting/index')
|
||||
)
|
||||
const chartEditStoreStore = useChartEditStoreStore()
|
||||
const chartEditStore = useChartEditStore()
|
||||
|
||||
const targetData: Ref<CreateComponentType> = computed(() => {
|
||||
const list = chartEditStoreStore.getComponentList
|
||||
const targetIndex = chartEditStoreStore.fetchTargetIndex()
|
||||
const list = chartEditStore.getComponentList
|
||||
const targetIndex = chartEditStore.fetchTargetIndex()
|
||||
return list[targetIndex]
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user