mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-23 09:50:23 +08:00
fix: 新增图表列表数据
This commit is contained in:
parent
24c649d19f
commit
f243dbdd55
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vicons/carbon": "^0.11.0",
|
"@vicons/carbon": "^0.11.0",
|
||||||
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^0.23.0",
|
"axios": "^0.23.0",
|
||||||
"crypto-ts": "^1.0.2",
|
"crypto-ts": "^1.0.2",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -10,6 +10,7 @@ specifiers:
|
|||||||
'@vitejs/plugin-vue-jsx': ^1.2.0
|
'@vitejs/plugin-vue-jsx': ^1.2.0
|
||||||
'@vue/compiler-sfc': ^3.2.20
|
'@vue/compiler-sfc': ^3.2.20
|
||||||
'@vueuse/core': ^7.3.0
|
'@vueuse/core': ^7.3.0
|
||||||
|
animate.css: ^4.1.1
|
||||||
axios: ^0.23.0
|
axios: ^0.23.0
|
||||||
crypto-ts: ^1.0.2
|
crypto-ts: ^1.0.2
|
||||||
default-passive-events: ^2.0.0
|
default-passive-events: ^2.0.0
|
||||||
@ -38,6 +39,7 @@ specifiers:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vicons/carbon': r2.cnpmjs.org/@vicons/carbon/0.11.0
|
'@vicons/carbon': r2.cnpmjs.org/@vicons/carbon/0.11.0
|
||||||
|
animate.css: r2.cnpmjs.org/animate.css/4.1.1
|
||||||
axios: rg.cnpmjs.org/axios/0.23.0
|
axios: rg.cnpmjs.org/axios/0.23.0
|
||||||
crypto-ts: r2.cnpmjs.org/crypto-ts/1.0.2
|
crypto-ts: r2.cnpmjs.org/crypto-ts/1.0.2
|
||||||
mockjs: rg.cnpmjs.org/mockjs/1.1.0
|
mockjs: rg.cnpmjs.org/mockjs/1.1.0
|
||||||
@ -142,6 +144,12 @@ packages:
|
|||||||
version: 0.11.0
|
version: 0.11.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
r2.cnpmjs.org/animate.css/4.1.1:
|
||||||
|
resolution: {integrity: sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==, registry: http://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/animate.css/-/animate.css-4.1.1.tgz}
|
||||||
|
name: animate.css
|
||||||
|
version: 4.1.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
r2.cnpmjs.org/ansi-regex/5.0.1:
|
r2.cnpmjs.org/ansi-regex/5.0.1:
|
||||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, registry: http://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz}
|
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, registry: http://r.cnpmjs.org/, tarball: https://r2.cnpmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz}
|
||||||
name: ansi-regex
|
name: ansi-regex
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<router-view #default="{ Component, route }">
|
<router-view #default="{ Component, route }">
|
||||||
<!-- todo 动画暂时不生效,待处理 -->
|
<!-- todo 动画暂时不生效,待处理 -->
|
||||||
<transition name="v-modal" mode="out-in" appear>
|
<transition name="fade" mode="out-in" appear>
|
||||||
<component
|
<component
|
||||||
v-if="route.noKeepAlive"
|
v-if="route.noKeepAlive"
|
||||||
:is="Component"
|
:is="Component"
|
||||||
|
@ -7,6 +7,9 @@ import { setupNaive, setupDirectives, setupCustomComponents } from '@/plugins'
|
|||||||
import { AppProvider } from '@/components/AppProvider/index'
|
import { AppProvider } from '@/components/AppProvider/index'
|
||||||
import { setHtmlTheme } from '@/utils'
|
import { setHtmlTheme } from '@/utils'
|
||||||
|
|
||||||
|
// 引入动画
|
||||||
|
import 'animate.css/animate.min.css'
|
||||||
|
|
||||||
async function appInit() {
|
async function appInit() {
|
||||||
const appProvider = createApp(AppProvider)
|
const appProvider = createApp(AppProvider)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import type { App } from 'vue'
|
|||||||
import { Skeleton } from '@/components/Skeleton'
|
import { Skeleton } from '@/components/Skeleton'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局注册自定义组件 待完善
|
* 全局注册自定义组件
|
||||||
* @param app
|
* @param app
|
||||||
*/
|
*/
|
||||||
export function setupCustomComponents(app: App) {
|
export function setupCustomComponents(app: App) {
|
||||||
|
@ -30,17 +30,30 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes v-modal-out {
|
@keyframes v-modal-out {
|
||||||
0% {
|
0% {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 渐变
|
||||||
|
.fade-enter,
|
||||||
|
.fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: opacity .2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
// 移动动画
|
// 移动动画
|
||||||
.list-complete-item {
|
.list-complete-item {
|
||||||
transition: all 1s;
|
transition: all 1s;
|
||||||
|
@ -22,11 +22,9 @@
|
|||||||
</n-space>
|
</n-space>
|
||||||
</div>
|
</div>
|
||||||
<aside class="content">
|
<aside class="content">
|
||||||
<n-scrollbar x-scrollable>
|
|
||||||
<n-scrollbar>
|
<n-scrollbar>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</n-scrollbar>
|
</n-scrollbar>
|
||||||
</n-scrollbar>
|
|
||||||
</aside>
|
</aside>
|
||||||
<div v-if="showBottom" class="bottom go-mt-0">
|
<div v-if="showBottom" class="bottom go-mt-0">
|
||||||
<slot name="bottom"></slot>
|
<slot name="bottom"></slot>
|
||||||
|
@ -1,9 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="go-chart-common">
|
||||||
|
<n-menu
|
||||||
|
class="common-menu-width"
|
||||||
|
v-model:value="selectValue"
|
||||||
|
:options="menuOptions"
|
||||||
|
:icon-size="16"
|
||||||
|
:indent="18"
|
||||||
|
/>
|
||||||
<div>
|
<div>
|
||||||
我是图表咯
|
右侧的小组将列表
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="Ts"></script>
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref } from 'vue'
|
||||||
|
import { renderLang } from '@/utils'
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
const menuOptions = reactive([
|
||||||
|
{
|
||||||
|
key: 'ChartCommon',
|
||||||
|
label: renderLang('图表')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'TextCommon',
|
||||||
|
label: renderLang('信息')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'TableCommon',
|
||||||
|
label: renderLang('表格')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'DecorateCommon',
|
||||||
|
label: renderLang('装饰')
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const selectValue = ref<string>(menuOptions[0]['key'])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/* 列表的宽度 */
|
||||||
|
$topHeight: 36px;
|
||||||
|
@include go('chart-common') {
|
||||||
|
display: flex;
|
||||||
|
height: calc(100vh - #{$--header-height} - #{$topHeight});
|
||||||
|
.common-menu-width {
|
||||||
|
@include filter-bg-color('background-color2');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -23,9 +23,11 @@
|
|||||||
@update:value="clickItemHandle"
|
@update:value="clickItemHandle"
|
||||||
/>
|
/>
|
||||||
<div class="menu-component-box">
|
<div class="menu-component-box">
|
||||||
|
<transition name="component-fade" mode="out-in">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="selectNode"></component>
|
<component :is="selectNode"></component>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@ -33,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, toRefs, computed } from 'vue'
|
import { reactive, ref, toRefs } from 'vue'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
import { renderLang, renderIcon } from '@/utils'
|
import { renderLang, renderIcon } from '@/utils'
|
||||||
import { ContentBox } from '../ContentBox/index'
|
import { ContentBox } from '../ContentBox/index'
|
||||||
@ -47,7 +49,12 @@ import { DecorateCommon } from './components/DecorateCommon'
|
|||||||
|
|
||||||
// 图标
|
// 图标
|
||||||
const { BarChartIcon } = icon.ionicons5
|
const { BarChartIcon } = icon.ionicons5
|
||||||
const { TableSplitIcon, RoadmapIcon, SpellCheckIcon, GraphicalDataFlowIcon } = icon.carbon
|
const {
|
||||||
|
TableSplitIcon,
|
||||||
|
RoadmapIcon,
|
||||||
|
SpellCheckIcon,
|
||||||
|
GraphicalDataFlowIcon
|
||||||
|
} = icon.carbon
|
||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
const designStore = useDesignStore()
|
const designStore = useDesignStore()
|
||||||
@ -104,7 +111,6 @@ const clickItemHandle = <T extends { node: any }>(key: string, item: T) => {
|
|||||||
}
|
}
|
||||||
beforeSelect = key
|
beforeSelect = key
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -126,16 +132,18 @@ $topHeight: 36px;
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: calc(100vh - #{$--header-height} - #{$topHeight});
|
height: calc(100vh - #{$--header-height} - #{$topHeight});
|
||||||
.menu-width {
|
.menu-width {
|
||||||
@include filter-bg-color('background-color2');
|
flex-shrink: 0;
|
||||||
|
@include filter-bg-color('background-color3');
|
||||||
}
|
}
|
||||||
.menu-component-box {
|
.menu-component-box {
|
||||||
|
flex-shrink: 0;
|
||||||
width: $width - $widthScoped;
|
width: $width - $widthScoped;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include deep() {
|
@include deep() {
|
||||||
|
.menu-width {
|
||||||
.n-menu-item {
|
.n-menu-item {
|
||||||
/* position: relative; */
|
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
&.n-menu-item--selected {
|
&.n-menu-item--selected {
|
||||||
&::after {
|
&::after {
|
||||||
@ -146,7 +154,6 @@ $topHeight: 36px;
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 3px;
|
width: 3px;
|
||||||
background-color: v-bind('themeColor');
|
background-color: v-bind('themeColor');
|
||||||
/* background-color: rgb(62, 202, 172); */
|
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
}
|
}
|
||||||
@ -163,5 +170,6 @@ $topHeight: 36px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -37,7 +37,8 @@ import { ContentDetails } from './components/ContentDetails/index'
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$height: 100vh;
|
$height: 100vh;
|
||||||
@include go('bg-point') {
|
@include go('bg-point') {
|
||||||
|
@include background-image('background-point');
|
||||||
|
@extend .go-point-bg;
|
||||||
}
|
}
|
||||||
@include go('chart') {
|
@include go('chart') {
|
||||||
height: $height;
|
height: $height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user