mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 00:02:51 +08:00
feat: 新增组件重命名
This commit is contained in:
parent
e874ca1e8c
commit
d690f4277f
@ -257,7 +257,6 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(props.data)
|
|
||||||
const { title, xAxis, yAxis, legend } = toRefs(props.data)
|
const { title, xAxis, yAxis, legend } = toRefs(props.data)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ $leftWidth: 60px;
|
|||||||
.item-left {
|
.item-left {
|
||||||
width: $leftWidth;
|
width: $leftWidth;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
margin-top: 4px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<h1>全局接口配置</h1>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
@ -1,11 +0,0 @@
|
|||||||
<template>
|
|
||||||
<GlobalSetting :data="chartThemeSetting" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
||||||
import { GlobalSetting } from '@/components/ChartItemSetting/index'
|
|
||||||
|
|
||||||
const chartEditStoreStore = useChartEditStoreStore()
|
|
||||||
const { chartThemeSetting } = chartEditStoreStore.getEditCanvasConfig
|
|
||||||
</script>
|
|
@ -128,8 +128,8 @@ const switchSelectColorLoading = ref(false)
|
|||||||
const ChartThemeColor = loadAsyncComponent(() =>
|
const ChartThemeColor = loadAsyncComponent(() =>
|
||||||
import('./components/ChartThemeColor/index.vue')
|
import('./components/ChartThemeColor/index.vue')
|
||||||
)
|
)
|
||||||
const ChartThemSetting = loadAsyncComponent(() =>
|
const ChartDataSetting = loadAsyncComponent(() =>
|
||||||
import('./components/ChartThemSetting/index.vue')
|
import('./components/ChartDataSetting/index.vue')
|
||||||
)
|
)
|
||||||
|
|
||||||
// 页面设置
|
// 页面设置
|
||||||
@ -153,9 +153,9 @@ const globalTabList = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'ChartSysSetting',
|
key: 'ChartSysSetting',
|
||||||
title: '全局图表',
|
title: '数据配置',
|
||||||
icon: ZAxisIcon,
|
icon: ZAxisIcon,
|
||||||
render: ChartThemSetting
|
render: ChartDataSetting
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,26 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="go-chart-content-details">
|
<div class="go-chart-content-details" v-if="targetData">
|
||||||
<GlobalSetting
|
<div class="chart-config">
|
||||||
v-if="targetData"
|
<SettingItemBox name="名称">
|
||||||
:data="targetData.option"
|
<n-input
|
||||||
:in-chart="true"
|
type="text"
|
||||||
/>
|
maxlength="6"
|
||||||
|
show-count
|
||||||
|
placeholder="请输入图表名称"
|
||||||
|
size="small"
|
||||||
|
v-model:value="targetData.chartConfig.title"
|
||||||
|
/>
|
||||||
|
</SettingItemBox>
|
||||||
|
</div>
|
||||||
|
<GlobalSetting :data="targetData.option" :in-chart="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed, Ref } from 'vue'
|
||||||
import { loadAsyncComponent } from '@/utils'
|
import { loadAsyncComponent } from '@/utils'
|
||||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { GlobalSetting } from '@/components/ChartItemSetting/index'
|
import { GlobalSetting } from '@/components/ChartItemSetting/index'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
|
import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
||||||
|
|
||||||
const GlobalSettingCom = loadAsyncComponent(() =>
|
const GlobalSettingCom = loadAsyncComponent(() =>
|
||||||
import('@/components/ChartItemSetting/index')
|
import('@/components/ChartItemSetting/index')
|
||||||
)
|
)
|
||||||
const chartEditStoreStore = useChartEditStoreStore()
|
const chartEditStoreStore = useChartEditStoreStore()
|
||||||
|
|
||||||
const targetData = computed(() => {
|
const targetData: Ref<CreateComponentType> = computed(() => {
|
||||||
const list = chartEditStoreStore.getComponentList
|
const list = chartEditStoreStore.getComponentList
|
||||||
const targetIndex = chartEditStoreStore.fetchTargetIndex()
|
const targetIndex = chartEditStoreStore.fetchTargetIndex()
|
||||||
return list[targetIndex]
|
return list[targetIndex]
|
||||||
@ -29,5 +38,8 @@ const targetData = computed(() => {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@include go('chart-content-details') {
|
@include go('chart-content-details') {
|
||||||
|
.chart-config {
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
/>
|
/>
|
||||||
<n-ellipsis>
|
<n-ellipsis>
|
||||||
<n-text class="list-text">
|
<n-text class="list-text">
|
||||||
{{ title }}
|
{{ props.componentData.chartConfig.title }}
|
||||||
</n-text>
|
</n-text>
|
||||||
</n-ellipsis>
|
</n-ellipsis>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +39,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const { image, title } = toRefs(props.componentData.chartConfig)
|
const { image } = toRefs(props.componentData.chartConfig)
|
||||||
|
|
||||||
// 计算当前选中目标
|
// 计算当前选中目标
|
||||||
const select = computed(() => {
|
const select = computed(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user