mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-05 21:28:43 +08:00
fix:新增数据设置小提示
This commit is contained in:
parent
8ee18819c5
commit
6d4be943d7
@ -7,6 +7,11 @@ export enum DataResultEnum {
|
||||
FAILURE = 2,
|
||||
}
|
||||
|
||||
export enum TimelineTitleEnum {
|
||||
MAPPING = '数据映射',
|
||||
CONTENT = '数据内容',
|
||||
}
|
||||
|
||||
export enum SelcetOptionsLableEnum {
|
||||
STATIC = '静态数据',
|
||||
AJAX = '动态请求',
|
||||
|
@ -8,7 +8,7 @@
|
||||
/>
|
||||
</setting-item-box>
|
||||
<n-timeline>
|
||||
<n-timeline-item type="info" title="数据映射">
|
||||
<n-timeline-item type="info" :title="TimelineTitleEnum.MAPPING">
|
||||
<n-table striped>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -34,8 +34,9 @@
|
||||
</tbody>
|
||||
</n-table>
|
||||
</n-timeline-item>
|
||||
<n-timeline-item type="success" title="静态数据">
|
||||
<n-timeline-item type="success" :title="TimelineTitleEnum.CONTENT">
|
||||
<n-space vertical>
|
||||
<n-text prefix="bar" depth="3">数据格式需要符合 ECharts-setdata 规范</n-text>
|
||||
<n-space class="source-btn-box">
|
||||
<n-upload
|
||||
v-model:file-list="uploadFileListRef"
|
||||
@ -43,14 +44,16 @@
|
||||
:customRequest="customRequest"
|
||||
@before-upload="beforeUpload"
|
||||
>
|
||||
<n-button class="sourceBtn-item">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<document-add-icon />
|
||||
</n-icon>
|
||||
</template>
|
||||
导入(json / txt)
|
||||
</n-button>
|
||||
<n-space>
|
||||
<n-button class="sourceBtn-item">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<document-add-icon />
|
||||
</n-icon>
|
||||
</template>
|
||||
导入(json / txt)
|
||||
</n-button>
|
||||
</n-space>
|
||||
</n-upload>
|
||||
<n-button class="sourceBtn-item" @click="download">
|
||||
<template #icon>
|
||||
@ -71,14 +74,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, toRefs, computed, watch, nextTick } from 'vue'
|
||||
import { ref, computed, watch, nextTick } from 'vue'
|
||||
import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
||||
import { RequestDataTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { useTargetData } from '../hooks/useTargetData.hook'
|
||||
import { UploadCustomRequestOptions } from 'naive-ui'
|
||||
import { FileTypeEnum } from '@/enums/fileTypeEnum'
|
||||
import { readFile, downloadFile } from '@/utils'
|
||||
import { DataResultEnum, SelcetOptionsLableEnum, SelectOptionsType } from './index.d'
|
||||
import { DataResultEnum, TimelineTitleEnum, SelcetOptionsLableEnum, SelectOptionsType } from './index.d'
|
||||
import { icon } from '@/plugins'
|
||||
|
||||
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
||||
@ -103,7 +106,6 @@ const selectOptions: SelectOptionsType[] = [
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
// 获取数据
|
||||
const getSource = computed(() => {
|
||||
return JSON.stringify(source.value)
|
||||
|
Loading…
Reference in New Issue
Block a user