|
@@ -94,8 +94,26 @@
|
|
|
|
|
|
|
|
<n-divider />
|
|
<n-divider />
|
|
|
|
|
|
|
|
- <!-- 主题选择 -->
|
|
|
|
|
- <ChartTheme />
|
|
|
|
|
|
|
+ <!-- 主题选择和全局配置 -->
|
|
|
|
|
+ <n-tabs v-show="!selectTarget" class="tabs-box" size="small" type="segment">
|
|
|
|
|
+ <n-tab-pane
|
|
|
|
|
+ v-for="item in globalTabList"
|
|
|
|
|
+ :key="item.key"
|
|
|
|
|
+ :name="item.key"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ display-directive="show:lazy"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #tab>
|
|
|
|
|
+ <n-space>
|
|
|
|
|
+ <span>{{ item.title }}</span>
|
|
|
|
|
+ <n-icon size="16" class="icon-position">
|
|
|
|
|
+ <component :is="item.icon"></component>
|
|
|
|
|
+ </n-icon>
|
|
|
|
|
+ </n-space>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <component :is="item.render"></component>
|
|
|
|
|
+ </n-tab-pane>
|
|
|
|
|
+ </n-tabs>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -103,9 +121,14 @@
|
|
|
import { ref, nextTick, onMounted } from 'vue'
|
|
import { ref, nextTick, onMounted } from 'vue'
|
|
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
|
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
|
import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
|
|
-import { UploadCustomRequestOptions, UploadFileInfo } from 'naive-ui'
|
|
|
|
|
|
|
+import { UploadCustomRequestOptions } from 'naive-ui'
|
|
|
import { ChartTheme } from './components/ChartTheme/index'
|
|
import { ChartTheme } from './components/ChartTheme/index'
|
|
|
|
|
+import { ChartSysSetting } from './components/ChartSysSetting/index'
|
|
|
import { fileTobase64 } from '@/utils'
|
|
import { fileTobase64 } from '@/utils'
|
|
|
|
|
+import { icon } from '@/plugins'
|
|
|
|
|
+
|
|
|
|
|
+const { ColorPaletteIcon } = icon.ionicons5
|
|
|
|
|
+const { ZAxisIcon } = icon.carbon
|
|
|
|
|
|
|
|
const chartEditStoreStore = useChartEditStoreStore()
|
|
const chartEditStoreStore = useChartEditStoreStore()
|
|
|
const canvasConfig = chartEditStoreStore.getEditCanvasConfig
|
|
const canvasConfig = chartEditStoreStore.getEditCanvasConfig
|
|
@@ -113,6 +136,22 @@ const canvasConfig = chartEditStoreStore.getEditCanvasConfig
|
|
|
const uploadFileListRef = ref()
|
|
const uploadFileListRef = ref()
|
|
|
const switchSelectColorLoading = ref(false)
|
|
const switchSelectColorLoading = ref(false)
|
|
|
|
|
|
|
|
|
|
+// 页面设置
|
|
|
|
|
+const globalTabList = [
|
|
|
|
|
+ {
|
|
|
|
|
+ key: 'ChartTheme',
|
|
|
|
|
+ title: '主题',
|
|
|
|
|
+ icon: ColorPaletteIcon,
|
|
|
|
|
+ render: ChartTheme
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: 'ChartSysSetting',
|
|
|
|
|
+ title: '轴线',
|
|
|
|
|
+ icon: ZAxisIcon,
|
|
|
|
|
+ render: ChartSysSetting
|
|
|
|
|
+ },
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
// 规则
|
|
// 规则
|
|
|
const validator = (x: number) => x > 50
|
|
const validator = (x: number) => x > 50
|
|
|
|
|
|
|
@@ -214,5 +253,8 @@ const customRequest = (options: UploadCustomRequestOptions) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .icon-position {
|
|
|
|
|
+ padding-top: 2px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|