mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 08:12:49 +08:00
Merge branch 'dev'
This commit is contained in:
commit
88073e97af
@ -5,7 +5,7 @@ import { StorageEnum } from '@/enums/storageEnum'
|
|||||||
|
|
||||||
export const use{{upperDataName}}Store = defineStore({
|
export const use{{upperDataName}}Store = defineStore({
|
||||||
id: 'use{{upperDataName}}Store',
|
id: 'use{{upperDataName}}Store',
|
||||||
state: (): {{name}}StoreType => ({}),
|
state: (): {{upperDataName}}StoreType => ({}),
|
||||||
getters: {},
|
getters: {},
|
||||||
actions: {}
|
actions: {}
|
||||||
})
|
})
|
@ -22,7 +22,7 @@ module.exports = {
|
|||||||
const actions = [
|
const actions = [
|
||||||
{
|
{
|
||||||
type: 'add',
|
type: 'add',
|
||||||
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store}.ts`, // 这里的name就是上面定义的键
|
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store.ts`, // 这里的name就是上面定义的键
|
||||||
templateFile: './store-template/index.hbs',
|
templateFile: './store-template/index.hbs',
|
||||||
data: {
|
data: {
|
||||||
name: data.name,
|
name: data.name,
|
||||||
@ -32,7 +32,11 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
type: 'add',
|
type: 'add',
|
||||||
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store.d.ts`, // 这里的name就是上面定义的键
|
path: `${process.cwd()}/src/store/modules/${dataName}Store/${dataName}Store.d.ts`, // 这里的name就是上面定义的键
|
||||||
templateFile: './store-template/index.d.hbs'
|
templateFile: './store-template/index.d.hbs',
|
||||||
|
data: {
|
||||||
|
name: data.name,
|
||||||
|
upperDataName,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ const global = {
|
|||||||
// right key
|
// right key
|
||||||
r_edit: 'Edit',
|
r_edit: 'Edit',
|
||||||
r_preview: 'Preview',
|
r_preview: 'Preview',
|
||||||
r_copy: 'Copy',
|
r_copy: 'Clone',
|
||||||
r_rename: 'Rename',
|
r_rename: 'Rename',
|
||||||
r_publish: 'Publish',
|
r_publish: 'Publish',
|
||||||
r_unpublish: 'Unpublish',
|
r_unpublish: 'Unpublish',
|
||||||
|
@ -17,7 +17,7 @@ const global = {
|
|||||||
// 功能键
|
// 功能键
|
||||||
r_edit: '编辑',
|
r_edit: '编辑',
|
||||||
r_preview: '预览',
|
r_preview: '预览',
|
||||||
r_copy: '复制',
|
r_copy: '克隆',
|
||||||
r_rename: '重命名',
|
r_rename: '重命名',
|
||||||
r_publish: '发布',
|
r_publish: '发布',
|
||||||
r_unpublish: '取消发布',
|
r_unpublish: '取消发布',
|
||||||
|
@ -80,54 +80,41 @@
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo 使用 scss 循环写一套完整的
|
// class:m-1 => margin:1em
|
||||||
// margin
|
// class:mt-1 => margin-top:1em
|
||||||
.go-mt-0 {
|
// m-0|mt-0|mx-0|my-0|p-0|pt-0|...
|
||||||
margin-top: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-mb-0 {
|
@each $typekey, $type in $spacing-types {
|
||||||
margin-bottom: 0 !important;
|
//.m-1
|
||||||
}
|
@each $sizekey, $size in $spacing-sizes {
|
||||||
.go-ml-0 {
|
.go-#{$typekey}-#{$sizekey} {
|
||||||
margin-left: 0 !important;
|
#{$type}: $size * $spacing-base-size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.go-mr-0 {
|
//.mx-1
|
||||||
margin-right: 0 !important;
|
@each $sizekey, $size in $spacing-sizes {
|
||||||
}
|
.go-#{$typekey}x-#{$sizekey} {
|
||||||
|
#{$type}-left: $size * $spacing-base-size;
|
||||||
|
#{$type}-right: $size * $spacing-base-size;
|
||||||
|
}
|
||||||
|
|
||||||
.go-my-0 {
|
.go-#{$typekey}y-#{$sizekey} {
|
||||||
@extend .go-mt-0;
|
#{$type}-top: $size * $spacing-base-size;
|
||||||
@extend .go-mb-0;
|
#{$type}-bottom: $size * $spacing-base-size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.go-mx-0 {
|
//.mt-1
|
||||||
@extend .go-ml-0;
|
@each $directionkey, $direction in $spacing-directions {
|
||||||
@extend .go-mr-0;
|
@each $sizekey, $size in $spacing-sizes {
|
||||||
}
|
.go-#{$typekey}#{$directionkey}-#{$sizekey} {
|
||||||
|
#{$type}-#{$direction}: $size * $spacing-base-size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.go-pt-0 {
|
.go-#{$typekey} {
|
||||||
padding-top: 0 !important;
|
#{$type}: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.go-pb-0 {
|
|
||||||
padding-bottom: 0 !important;
|
|
||||||
}
|
|
||||||
.go-pl-0 {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-pr-0 {
|
|
||||||
padding-right: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-py-0 {
|
|
||||||
@extend .go-pt-0;
|
|
||||||
@extend .go-pb-0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-px-0 {
|
|
||||||
@extend .go-pl-0;
|
|
||||||
@extend .go-pr-0;
|
|
||||||
}
|
}
|
@ -10,6 +10,31 @@ $--color-text-2: #86909c;
|
|||||||
$--color-text-3: #c9cdd4;
|
$--color-text-3: #c9cdd4;
|
||||||
$--color-text-4: #f2f3f5;
|
$--color-text-4: #f2f3f5;
|
||||||
|
|
||||||
|
//.mt-1 => margin top
|
||||||
|
//spacing
|
||||||
|
$spacing-base-size: 1em;
|
||||||
|
|
||||||
|
$spacing-types: (
|
||||||
|
m: margin,
|
||||||
|
p: padding,
|
||||||
|
);
|
||||||
|
|
||||||
|
$spacing-directions: (
|
||||||
|
t: top,
|
||||||
|
r: right,
|
||||||
|
b: bottom,
|
||||||
|
l: left,
|
||||||
|
);
|
||||||
|
|
||||||
|
$spacing-sizes: (
|
||||||
|
0: 0,
|
||||||
|
1: 0.25,
|
||||||
|
2: 0.5,
|
||||||
|
3: 1,
|
||||||
|
4: 1.5,
|
||||||
|
5: 2.5,
|
||||||
|
);
|
||||||
|
|
||||||
// 变亮值
|
// 变亮值
|
||||||
$--light-shalow: 2%;
|
$--light-shalow: 2%;
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@ const addAnimation = (item: { label: string; value: string }) => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.animation-item {
|
.animation-item {
|
||||||
height: 50px;
|
height: 40px;
|
||||||
line-height: 50px;
|
line-height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
@ -20,16 +20,10 @@
|
|||||||
<help-outline-icon></help-outline-icon>
|
<help-outline-icon></help-outline-icon>
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
<ul>
|
<ul class="go-pl-0">
|
||||||
开发环境使用 mock 数据,请输入
|
开发环境使用 mock 数据,请输入
|
||||||
<li>
|
<li v-for="item in apiList" :key="item.value">
|
||||||
<n-text type="info"> 【图表】{{ chartDataUrl }} </n-text>
|
<n-text type="info"> {{item.value}} </n-text>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<n-text type="info"> 【表格】{{ rankListUrl }} </n-text>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<n-text type="info"> 【0~1数字】{{ numberUrl }} </n-text>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
@ -83,6 +77,18 @@ const { requestOriginUrl } = toRefs(chartEditStore.getRequestGlobalConfig)
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const showMatching = ref(false)
|
const showMatching = ref(false)
|
||||||
|
|
||||||
|
const apiList = [
|
||||||
|
{
|
||||||
|
value: `【图表】${ chartDataUrl }`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: `【表格】${ rankListUrl }`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: `【0~1数字】${ numberUrl }`
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
// 选项
|
// 选项
|
||||||
const selectOptions: SelectHttpType[] = [
|
const selectOptions: SelectHttpType[] = [
|
||||||
{
|
{
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
</n-button>
|
</n-button>
|
||||||
</n-space>
|
</n-space>
|
||||||
</n-upload>
|
</n-upload>
|
||||||
|
<div>
|
||||||
<n-button class="sourceBtn-item" @click="download">
|
<n-button class="sourceBtn-item" @click="download">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon>
|
<n-icon>
|
||||||
@ -54,6 +55,15 @@
|
|||||||
</template>
|
</template>
|
||||||
下载
|
下载
|
||||||
</n-button>
|
</n-button>
|
||||||
|
<n-tooltip trigger="hover">
|
||||||
|
<template #trigger>
|
||||||
|
<n-icon class="go-ml-1" size="21" :depth="3">
|
||||||
|
<help-outline-icon></help-outline-icon>
|
||||||
|
</n-icon>
|
||||||
|
</template>
|
||||||
|
<n-text depth="3">点击【下载】查看完整数据</n-text>
|
||||||
|
</n-tooltip>
|
||||||
|
</div>
|
||||||
</n-space>
|
</n-space>
|
||||||
<n-card>
|
<n-card>
|
||||||
<n-code :code="getSource" language="json"></n-code>
|
<n-code :code="getSource" language="json"></n-code>
|
||||||
@ -83,7 +93,9 @@ const props = defineProps({
|
|||||||
// 表格标题
|
// 表格标题
|
||||||
const tableTitle = ['字段', '映射', '状态']
|
const tableTitle = ['字段', '映射', '状态']
|
||||||
|
|
||||||
|
const { HelpOutlineIcon } = icon.ionicons5
|
||||||
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
const { DocumentAddIcon, DocumentDownloadIcon } = icon.carbon
|
||||||
|
|
||||||
const source = ref()
|
const source = ref()
|
||||||
const dimensions = ref()
|
const dimensions = ref()
|
||||||
const dimensionsAndSource = ref()
|
const dimensionsAndSource = ref()
|
||||||
|
@ -92,8 +92,8 @@ const {
|
|||||||
CopyIcon,
|
CopyIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
PencilIcon,
|
PencilIcon,
|
||||||
|
DownloadIcon,
|
||||||
BrowsersOutlineIcon,
|
BrowsersOutlineIcon,
|
||||||
DownloadOutlineIcon,
|
|
||||||
HammerIcon,
|
HammerIcon,
|
||||||
SendIcon
|
SendIcon
|
||||||
} = icon.ionicons5
|
} = icon.ionicons5
|
||||||
@ -152,7 +152,7 @@ const selectOptions = ref([
|
|||||||
{
|
{
|
||||||
label: renderLang('global.r_download'),
|
label: renderLang('global.r_download'),
|
||||||
key: 'download',
|
key: 'download',
|
||||||
icon: renderIcon(DownloadOutlineIcon)
|
icon: renderIcon(DownloadIcon)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'divider',
|
type: 'divider',
|
||||||
|
Loading…
Reference in New Issue
Block a user