@bdsoft/element 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +13 -0
- package/index.js +12 -12
- package/package.json +19 -23
- package/src/App.vue +28 -0
- package/src/assets/css/element.scss +196 -0
- package/src/assets/css/layout.scss +215 -0
- package/src/assets/css/tailwind.scss +67 -0
- package/src/assets/images/banner.gif +0 -0
- package/src/assets/images/banner.png +0 -0
- package/src/assets/images/bg1.svg +22 -0
- package/src/assets/images/bg2.png +0 -0
- package/src/assets/images/ff.png +0 -0
- package/src/assets/images/home-file1.png +0 -0
- package/src/assets/images/ky.png +0 -0
- package/src/assets/images/menu/add.png +0 -0
- package/src/assets/images/menu/del.png +0 -0
- package/src/assets/images/menu/down.png +0 -0
- package/src/assets/images/menu/dr.png +0 -0
- package/src/assets/images/menu/edit.png +0 -0
- package/src/assets/images/menu/kx.png +0 -0
- package/src/assets/images/menu/mb.png +0 -0
- package/src/assets/images/menu/pz.png +0 -0
- package/src/assets/images/menu/save.png +0 -0
- package/src/assets/images/menu/sj.png +0 -0
- package/src/assets/images/menu/sjk.png +0 -0
- package/src/assets/images/menu/up.png +0 -0
- package/src/assets/images/po-i.png +0 -0
- package/src/assets/images/po1-i1.png +0 -0
- package/src/assets/images/po1-i2.png +0 -0
- package/src/assets/images/po1-i3.png +0 -0
- package/src/assets/images/po1-i4.png +0 -0
- package/src/assets/images/po1-i5.png +0 -0
- package/src/assets/images/po1-i6.png +0 -0
- package/src/assets/images/po1-i7.png +0 -0
- package/src/assets/images/po1-i8.png +0 -0
- package/src/assets/images/po2-i1.png +0 -0
- package/src/assets/images/po2-i2.png +0 -0
- package/src/assets/images/po3-i1.png +0 -0
- package/src/assets/images/po4-i1.png +0 -0
- package/src/assets/images/po5-i1.png +0 -0
- package/src/assets/images/po6-i1.png +0 -0
- package/src/assets/images/po6-i2.png +0 -0
- package/src/assets/images/po7-i1.png +0 -0
- package/src/assets/images/tj1.png +0 -0
- package/src/assets/images/tj2.png +0 -0
- package/src/assets/images/tj3.png +0 -0
- package/src/components/3dcloudwords/index.js +346 -0
- package/src/components/3dcloudwords/index.vue +99 -0
- package/src/components/3dcloudwords/readme.md +66 -0
- package/src/components/badge/index.js +167 -0
- package/src/components/badge/index.scss +166 -0
- package/src/components/badge/index.vue +98 -0
- package/src/components/badge/readme.md +18 -0
- package/src/components/basic/Finish.vue +107 -0
- package/src/components/basic/button.vue +19 -0
- package/src/components/basic/readme.md +7 -0
- package/src/components/button/index.vue +48 -0
- package/src/components/button/readme.md +62 -0
- package/src/components/carousel/index.vue +104 -0
- package/src/components/carousel/readme.md +12 -0
- package/src/components/chartconfig/index.vue +141 -0
- package/src/components/chartconfig/readme.md +25 -0
- package/src/components/contextMenu/hookContxtMenu.js +41 -0
- package/src/components/contextMenu/index.vue +245 -0
- package/src/components/contextMenu/readme.md +55 -0
- package/src/components/contextMenu/useElementBounding.js +40 -0
- package/src/components/countup/countUp.js +196 -0
- package/src/components/countup/index.vue +114 -0
- package/src/components/countup/readme.md +9 -0
- package/src/components/empty/assets/build.png +0 -0
- package/src/components/empty/assets/emptybg.gif +0 -0
- package/src/components/empty/assets/emptybg.png +0 -0
- package/src/components/empty/assets/emptybg2.jpg +0 -0
- package/src/components/empty/assets/emptybg3.jpg +0 -0
- package/src/components/empty/assets/wuxiao.png +0 -0
- package/src/components/empty/assets/wuxiao.webp +0 -0
- package/src/components/empty/building.vue +117 -0
- package/src/components/empty/empty.vue +120 -0
- package/src/components/empty/index.js +12 -0
- package/src/components/empty/invalid.vue +56 -0
- package/src/components/error/Error.vue +79 -0
- package/src/components/error/readme.md +20 -0
- package/src/components/form/Form.vue +84 -0
- package/src/components/form/FormItem.vue +143 -0
- package/src/components/form/data.js +52 -0
- package/src/components/form/readme.md +69 -0
- package/src/components/layout/banner.vue +412 -0
- package/src/components/layout/bar.vue +43 -0
- package/src/components/layout/layout1.vue +60 -0
- package/src/components/layout/layout2.vue +134 -0
- package/src/components/layout/layout3.vue +107 -0
- package/src/components/layout/layout4.vue +66 -0
- package/src/components/layout/nav.vue +333 -0
- package/src/components/layout/readme.md +61 -0
- package/src/components/loading/index.vue +122 -0
- package/src/components/loading/readme.md +6 -0
- package/src/components/notice/NoticeList.vue +198 -0
- package/src/components/notice/NoticeListPaging.vue +281 -0
- package/src/components/notice/NoticeView.vue +92 -0
- package/src/components/notice/readme.md +1 -0
- package/src/components/pagination/index.vue +100 -0
- package/src/components/pagination/readme.md +19 -0
- package/src/components/pagination/scroll-to.js +51 -0
- package/src/components/progress/bar.vue +72 -0
- package/src/components/progress/progress.vue +58 -0
- package/src/components/screenfull/index.js +3 -0
- package/src/components/screenfull/index.vue +65 -0
- package/src/components/screenfull/package.json +15 -0
- package/src/components/screenfull/readme.md +6 -0
- package/src/components/statisticalCount/index.vue +80 -0
- package/src/components/statisticalCount/readme.md +21 -0
- package/src/components/username/index.vue +79 -0
- package/src/components/username/readme.md +22 -0
- package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
- package/src/global/index.ts +6 -0
- package/src/global/register-properties.ts +10 -0
- package/src/index.js +88 -0
- package/src/utils/coms/load.jsx +10 -0
- package/src/utils/func.js +62 -0
- package/src/utils/hookDialog.js +38 -0
- package/src/utils/hookPage.js +49 -0
- package/src/utils/index.js +5 -0
- package/src/utils/lib/console.js +39 -0
- package/src/utils/lib/debounce.js +19 -0
- package/src/utils/lib/deepextend.js +51 -0
- package/src/utils/lib/deepset.js +14 -0
- package/src/utils/lib/extend.js +28 -0
- package/src/utils/lib/index.js +13 -0
- package/src/utils/lib/json.js +90 -0
- package/src/utils/lib/mergeprops.js +62 -0
- package/src/utils/lib/mitt.js +43 -0
- package/src/utils/lib/modify.js +8 -0
- package/src/utils/lib/slot.js +19 -0
- package/src/utils/lib/toarray.js +5 -0
- package/src/utils/lib/tocase.js +11 -0
- package/src/utils/lib/todate.js +10 -0
- package/src/utils/lib/toline.js +10 -0
- package/src/utils/lib/tostring.js +7 -0
- package/src/utils/lib/type.js +45 -0
- package/src/utils/lib/unique.js +6 -0
- package/src/utils/message.js +164 -0
- package/src/utils/type.js +45 -0
- package/src/xm_components/HeadSearch/hook/hookSearch.js +96 -0
- package/src/xm_components/HeadSearch/index.vue +206 -0
- package/src/xm_components/HeadSearch/readme.md +12 -0
- package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
- package/src/xm_components/Milestone/index.vue +213 -0
- package/src/xm_components/Milestone/readme.md +15 -0
- package/src/xm_components/MultiStatisticalCard/image.png +0 -0
- package/src/xm_components/MultiStatisticalCard/index.vue +114 -0
- package/src/xm_components/MultiStatisticalCard/readme.md +29 -0
- package/src/xm_components/StatisticalCard/image.png +0 -0
- package/src/xm_components/StatisticalCard/index.vue +196 -0
- package/src/xm_components/StatisticalCard/readme.md +41 -0
- package/src/xm_components/readme.md +1 -0
- package/vite.config.js +58 -0
- package/dist/BdElement.js +0 -23432
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
headerHeight: {
|
|
6
|
+
type: [String,Number],
|
|
7
|
+
default: '50px'
|
|
8
|
+
},
|
|
9
|
+
// 是否显示左侧
|
|
10
|
+
showLeft: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '左侧菜单栏'
|
|
17
|
+
},
|
|
18
|
+
rightStyles: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => {
|
|
21
|
+
return {
|
|
22
|
+
padding:'20px',
|
|
23
|
+
margin: '10px 10px 10px 0px'
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
leftStyles: {
|
|
28
|
+
type: Object
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
// 是否显示标题栏
|
|
32
|
+
const showLeftTop = computed(() => {
|
|
33
|
+
return props.title ? true : false
|
|
34
|
+
})
|
|
35
|
+
// 兼容string和number两个类型
|
|
36
|
+
const _headerHeight = computed(() => {
|
|
37
|
+
if (typeof (props.headerHeight) == 'number') {
|
|
38
|
+
return `${props.headerHeight}px`
|
|
39
|
+
} else {
|
|
40
|
+
return props.headerHeight
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<el-container class="containerBg">
|
|
47
|
+
<el-header :height="_headerHeight" class="headwarp"
|
|
48
|
+
style="border-bottom: 1px solid #e6e6e6; border-radius: 4px 4px 0 0">
|
|
49
|
+
<div class="headwarp-top" style="border-radius: 4px">
|
|
50
|
+
<slot name="header">
|
|
51
|
+
<!-- 顶部区域 -->
|
|
52
|
+
</slot>
|
|
53
|
+
</div>
|
|
54
|
+
</el-header>
|
|
55
|
+
<el-container class="maincon" style="">
|
|
56
|
+
<el-aside width="200px" :style="{ ...leftStyles }" v-if="showLeft">
|
|
57
|
+
<div class="top" v-if="showLeftTop">
|
|
58
|
+
<div class="topin">{{ title }}</div>
|
|
59
|
+
</div>
|
|
60
|
+
<!-- 左侧区域 -->
|
|
61
|
+
<slot name="left"></slot>
|
|
62
|
+
</el-aside>
|
|
63
|
+
<el-main class="main-container" style="background-color: #fff;" :style="{ ...rightStyles }">
|
|
64
|
+
<!-- 右侧区域 -->
|
|
65
|
+
<slot></slot>
|
|
66
|
+
</el-main>
|
|
67
|
+
</el-container>
|
|
68
|
+
|
|
69
|
+
</el-container>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<style lang="scss" scoped>
|
|
73
|
+
.maincon {
|
|
74
|
+
background: radial-gradient(circle at 14% 85%, #e7ecf7 0, rgba(231, 236, 247, 0) 37%), radial-gradient(circle at 3.4% 3.7%, rgba(245, 237, 241, 0.5) 0, rgba(245, 237, 241, 0) 28%), radial-gradient(circle at 100% 18%, #e8ebea 0, hsla(160, 7%, 92%, 0) 30%), linear-gradient(180deg, #f5f4f6, #e6ebf7);
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 右侧用户信息
|
|
79
|
+
.top_right {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: 10px;
|
|
82
|
+
top: 0px;
|
|
83
|
+
height: 100%;
|
|
84
|
+
/*width:400px;*/
|
|
85
|
+
color: #fff; // #8c8c8c;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
margin-right: 10px;
|
|
88
|
+
|
|
89
|
+
a {
|
|
90
|
+
color: #fff; // #8c8c8c;
|
|
91
|
+
margin: 10px 8px 0 5px;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.top_search {
|
|
97
|
+
border-radius: 30px;
|
|
98
|
+
width: 180px;
|
|
99
|
+
float: right;
|
|
100
|
+
padding-top: 10px;
|
|
101
|
+
padding-right: 20px;
|
|
102
|
+
|
|
103
|
+
:deep(.el-input__wrapper) {
|
|
104
|
+
border-radius: 20px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 上下布局页面
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, reactive, computed, watch, onMounted } from 'vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
headerHeight: {
|
|
13
|
+
type: [String, Number],
|
|
14
|
+
default: '50px'
|
|
15
|
+
},
|
|
16
|
+
rightStyles: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => {
|
|
19
|
+
return {
|
|
20
|
+
backgroundColor: '#EFEFEF'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
innerBgColor: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '#fff'
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
// 兼容string和number两个类型
|
|
30
|
+
const _headerHeight = computed(() => {
|
|
31
|
+
if (typeof (props.headerHeight) == 'number') {
|
|
32
|
+
return `${props.headerHeight}px`
|
|
33
|
+
} else {
|
|
34
|
+
return props.headerHeight
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
<template>
|
|
39
|
+
<el-container class="containerBg">
|
|
40
|
+
<el-header style="background-color: #fff;padding:0;" :height="_headerHeight">
|
|
41
|
+
<slot name="header"></slot>
|
|
42
|
+
</el-header>
|
|
43
|
+
<el-main class="main main-container" :style="{ ...rightStyles }">
|
|
44
|
+
<div class="page-warp" :style="{ 'background-color': innerBgColor }">
|
|
45
|
+
<slot></slot>
|
|
46
|
+
</div>
|
|
47
|
+
</el-main>
|
|
48
|
+
</el-container>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<style lang="scss" scoped>
|
|
52
|
+
.main {
|
|
53
|
+
background-color: var(--bdBgcolor);
|
|
54
|
+
padding: 10px;
|
|
55
|
+
height: 100%;
|
|
56
|
+
|
|
57
|
+
.page-warp {
|
|
58
|
+
background: #fff;
|
|
59
|
+
color: rgba(0, 0, 0, 0.65);
|
|
60
|
+
// height: calc(100% - 24px);
|
|
61
|
+
height: 100%;
|
|
62
|
+
border-radius: 5px;
|
|
63
|
+
transition: all 0.3s;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 导航菜单
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, computed, nextTick, watch, onMounted } from "vue";
|
|
10
|
+
const emits = defineEmits(['selectCategory'])
|
|
11
|
+
const themelistRef = ref()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
// 所有项居中
|
|
16
|
+
isCenter: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
themeWarpStyle: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => {
|
|
23
|
+
return {
|
|
24
|
+
backgroundColor: 'transparent',
|
|
25
|
+
height: '100px'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
imgWarp: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => {
|
|
32
|
+
return {
|
|
33
|
+
width: '40px',
|
|
34
|
+
height: '40px',
|
|
35
|
+
right: '0px'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
// 是否垂直展示
|
|
40
|
+
isVertical: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
},
|
|
44
|
+
themelist: {
|
|
45
|
+
type: Array,
|
|
46
|
+
required: true,
|
|
47
|
+
validator: (value) => {
|
|
48
|
+
// value 是父组件传递的数组
|
|
49
|
+
if (value.length == 0) {
|
|
50
|
+
console.error("菜单数组不能为空")
|
|
51
|
+
}
|
|
52
|
+
return value.length > 0; // 只有数组长度 > 0 时才通过校验
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
color: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: '#0B101A'
|
|
59
|
+
},
|
|
60
|
+
hoverBgColor: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'var(--hoverbg)'
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
const overlayRefs = ref([]);
|
|
66
|
+
const setItemRefs = ref([])
|
|
67
|
+
const selectTheme = ref(props.themelist[0]) // 选中
|
|
68
|
+
|
|
69
|
+
// 检测鼠标进入方向
|
|
70
|
+
const getDirection = (event, element) => {
|
|
71
|
+
const rect = element.getBoundingClientRect();
|
|
72
|
+
const x = event.clientX - rect.left - rect.width / 2;
|
|
73
|
+
const y = event.clientY - rect.top - rect.height / 2;
|
|
74
|
+
let dir = Math.round(((Math.atan2(y, x) * (180 / Math.PI)) + 180) / 90 + 3) % 4;
|
|
75
|
+
return dir
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// 处理鼠标进入
|
|
79
|
+
const handleMouseEnter = (index, event) => {
|
|
80
|
+
|
|
81
|
+
const overlay = overlayRefs.value[index];
|
|
82
|
+
const element = setItemRefs.value[index];
|
|
83
|
+
if (overlay) {
|
|
84
|
+
const direction = getDirection(event, element);
|
|
85
|
+
overlay.style.transition = ''; // 清除过渡以便即时应用位置变化
|
|
86
|
+
// 首先清除所有可能的位置类,以避免冲突
|
|
87
|
+
overlay.classList.remove('overlay-leave-to-left', 'overlay-leave-to-top', 'overlay-leave-to-right', 'overlay-leave-to-bottom');
|
|
88
|
+
// 应用初始位置类
|
|
89
|
+
switch (direction) {
|
|
90
|
+
case 0:
|
|
91
|
+
overlay.classList.add('overlay-enter-from-top');
|
|
92
|
+
break;
|
|
93
|
+
case 1:
|
|
94
|
+
overlay.classList.add('overlay-enter-from-right');
|
|
95
|
+
break;
|
|
96
|
+
case 2:
|
|
97
|
+
overlay.classList.add('overlay-enter-from-bottom');
|
|
98
|
+
break;
|
|
99
|
+
case 3:
|
|
100
|
+
overlay.classList.add('overlay-enter-from-left');
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 使用requestAnimationFrame来确保即时应用
|
|
105
|
+
requestAnimationFrame(() => {
|
|
106
|
+
overlay.style.transition = 'transform 0.5s ease';
|
|
107
|
+
switch (direction) {
|
|
108
|
+
case 0:
|
|
109
|
+
overlay.style.transform = 'translateY(0%)';
|
|
110
|
+
break;
|
|
111
|
+
case 1:
|
|
112
|
+
overlay.style.transform = 'translateX(0%)';
|
|
113
|
+
break;
|
|
114
|
+
case 2:
|
|
115
|
+
overlay.style.transform = 'translateY(0%)';
|
|
116
|
+
break;
|
|
117
|
+
case 3:
|
|
118
|
+
overlay.style.transform = 'translateX(0%)';
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// 处理鼠标离开
|
|
127
|
+
const handleMouseLeave = (index, event) => {
|
|
128
|
+
const overlay = overlayRefs.value[index];
|
|
129
|
+
if (overlay) {
|
|
130
|
+
const element = setItemRefs.value[index];
|
|
131
|
+
const direction = getDirection(event, element);
|
|
132
|
+
overlay.style.transition = ''; // 清除过渡以便即时应用位置变化
|
|
133
|
+
overlay.classList.remove('overlay-enter-from-left', 'overlay-enter-from-top', 'overlay-enter-from-right', 'overlay-enter-from-bottom');
|
|
134
|
+
// 确定并添加适当的离开动画类
|
|
135
|
+
switch (direction) {
|
|
136
|
+
case 0: // 上
|
|
137
|
+
overlay.classList.add('overlay-leave-to-top');
|
|
138
|
+
break;
|
|
139
|
+
case 1: // 右
|
|
140
|
+
overlay.classList.add('overlay-leave-to-right');
|
|
141
|
+
break;
|
|
142
|
+
case 2: // 下
|
|
143
|
+
overlay.classList.add('overlay-leave-to-bottom');
|
|
144
|
+
break;
|
|
145
|
+
case 3: // 左
|
|
146
|
+
overlay.classList.add('overlay-leave-to-left');
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
requestAnimationFrame(() => {
|
|
151
|
+
overlay.style.transition = 'transform 0.5s ease';
|
|
152
|
+
// 应用离开动画
|
|
153
|
+
switch (direction) {
|
|
154
|
+
case 0: // 上
|
|
155
|
+
overlay.style.transform = 'translateY(-100%)';
|
|
156
|
+
break;
|
|
157
|
+
case 1: // 右
|
|
158
|
+
overlay.style.transform = 'translateX(100%)';
|
|
159
|
+
break;
|
|
160
|
+
case 2: // 下
|
|
161
|
+
overlay.style.transform = 'translateY(100%)';
|
|
162
|
+
break;
|
|
163
|
+
case 3: // 左
|
|
164
|
+
overlay.style.transform = 'translateX(-100%)';
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const themeStyle = computed(() => {
|
|
173
|
+
let _style = { color: props.color }
|
|
174
|
+
// 上下排列
|
|
175
|
+
if (props.isVertical) {
|
|
176
|
+
|
|
177
|
+
} else {
|
|
178
|
+
_style.display = 'flex'
|
|
179
|
+
_style.justifyContent = 'center'
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return _style
|
|
183
|
+
})
|
|
184
|
+
// 主题分类选择事件
|
|
185
|
+
const handleClick = (item) => {
|
|
186
|
+
selectTheme.value = item
|
|
187
|
+
emits('selectCategory', item)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
watch(
|
|
191
|
+
() => props.themelist,
|
|
192
|
+
(newValue) => {
|
|
193
|
+
let aa = themelistRef.value
|
|
194
|
+
// debugger
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
deep: true
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
</script>
|
|
201
|
+
<template>
|
|
202
|
+
<ul class="theme-list" ref="themelistRef" :style="{ justifyContent: isCenter ? 'center' : 'start' }">
|
|
203
|
+
<li class="theme-item" :style="themeWarpStyle" :class="{ selected: selectTheme.title == item.title }"
|
|
204
|
+
v-for="(item, index) in themelist" :key="index" :ref="(el) => setItemRefs[index] = el"
|
|
205
|
+
@mouseenter="event => handleMouseEnter(index, event)" @mouseleave="event => handleMouseLeave(index, event)"
|
|
206
|
+
@click="handleClick(item)">
|
|
207
|
+
<div class="theme-title" :style="themeStyle">
|
|
208
|
+
<!-- 处理左右排列还是上下排列 -->
|
|
209
|
+
<div v-if="item.icon" :style="{ height: imgWarp.height, marginRight: imgWarp.right }">
|
|
210
|
+
<img style=" vertical-align: middle" :src="item.icon" :style="{ width: imgWarp.width }" />
|
|
211
|
+
</div>
|
|
212
|
+
{{ item.title }}
|
|
213
|
+
</div>
|
|
214
|
+
<div class="overlay" :ref="(el) => overlayRefs[index] = el"></div>
|
|
215
|
+
</li>
|
|
216
|
+
</ul>
|
|
217
|
+
</template>
|
|
218
|
+
<style>
|
|
219
|
+
:root {
|
|
220
|
+
--hoverbg: rgba(117, 144, 255, 0.05);
|
|
221
|
+
}
|
|
222
|
+
</style>
|
|
223
|
+
<style lang="scss" scoped>
|
|
224
|
+
/* 定义动画 */
|
|
225
|
+
@keyframes fadeIn {
|
|
226
|
+
from {
|
|
227
|
+
opacity: 0;
|
|
228
|
+
transform: translateY(-20px);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
to {
|
|
232
|
+
opacity: 1;
|
|
233
|
+
transform: translateY(0);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.theme-item li {
|
|
238
|
+
animation: fadeIn 0.5s ease;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.theme-list {
|
|
242
|
+
display: flex;
|
|
243
|
+
margin-top: 10px;
|
|
244
|
+
margin-bottom: 10px;
|
|
245
|
+
border-bottom: 1px #d9dfed solid;
|
|
246
|
+
font-family: PingFangSC-Regular;
|
|
247
|
+
|
|
248
|
+
.theme-item {
|
|
249
|
+
width: 120px;
|
|
250
|
+
height: 100px;
|
|
251
|
+
text-align: center;
|
|
252
|
+
line-height: 80px;
|
|
253
|
+
margin-right: 30px;
|
|
254
|
+
border-radius: 10px 10px 0 0;
|
|
255
|
+
// background-color: #fff;
|
|
256
|
+
// font-weight: bold;
|
|
257
|
+
font-size: 16px;
|
|
258
|
+
transition: transform 0.3s ease;
|
|
259
|
+
position: relative;
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.selected {
|
|
264
|
+
font-family: PingFangSC-Semibold;
|
|
265
|
+
color: #256DFF !important;
|
|
266
|
+
border-bottom: 4px #256DFF solid;
|
|
267
|
+
font-weight: bold;
|
|
268
|
+
|
|
269
|
+
.theme-title {
|
|
270
|
+
color: #256DFF;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.theme-title {
|
|
276
|
+
position: absolute;
|
|
277
|
+
top: 0;
|
|
278
|
+
left: 0;
|
|
279
|
+
right: 0;
|
|
280
|
+
bottom: 0;
|
|
281
|
+
color: #000;
|
|
282
|
+
text-align: center;
|
|
283
|
+
z-index: 99;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.overlay {
|
|
287
|
+
transition: transform 0.5s ease;
|
|
288
|
+
position: absolute;
|
|
289
|
+
top: 0;
|
|
290
|
+
left: 0;
|
|
291
|
+
width: 100%;
|
|
292
|
+
height: 100%;
|
|
293
|
+
z-index: 1;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
.overlay-enter-from-left {
|
|
298
|
+
background-color: var(--hoverbg);
|
|
299
|
+
color: #fff !important;
|
|
300
|
+
transform: translateX(-100%);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.overlay-enter-from-top {
|
|
304
|
+
background-color: var(--hoverbg);
|
|
305
|
+
transform: translateY(-100%);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.overlay-enter-from-right {
|
|
309
|
+
background-color: var(--hoverbg);
|
|
310
|
+
transform: translateX(100%);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.overlay-enter-from-bottom {
|
|
314
|
+
background-color: var(--hoverbg);
|
|
315
|
+
transform: translateY(100%);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.overlay-leave-to-left {
|
|
319
|
+
transform: translateX(-100%);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.overlay-leave-to-top {
|
|
323
|
+
transform: translateY(-100%);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.overlay-leave-to-right {
|
|
327
|
+
transform: translateX(100%);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.overlay-leave-to-bottom {
|
|
331
|
+
transform: translateY(100%);
|
|
332
|
+
}
|
|
333
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
## 导航组件
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
import BdNav from '@bdsoft/element'
|
|
5
|
+
|
|
6
|
+
export const themelist = ref([
|
|
7
|
+
{ attr: 'fl', icon: getAssetsImgUrl('aat-icon.png'), title: '勘探' },
|
|
8
|
+
{ attr: 'fl', icon: getAssetsImgUrl('cloud-icon.png'), title: '开发' },
|
|
9
|
+
])
|
|
10
|
+
// 选择事件
|
|
11
|
+
const handleSelectCategory = ()=>{
|
|
12
|
+
}
|
|
13
|
+
<!-- 导航 -->
|
|
14
|
+
<BdNav :themelist="themelist" @selectCategory="getThemeData_qk"></BdNav>
|
|
15
|
+
|
|
16
|
+
另一种横向展示方式
|
|
17
|
+
const themeWarpStyle = ref({
|
|
18
|
+
backgroundColor: 'transparent',
|
|
19
|
+
height: '40px',
|
|
20
|
+
lineHeight: '40px',
|
|
21
|
+
fontSize:'13px',
|
|
22
|
+
fontWeight:'normal',
|
|
23
|
+
textAlign:'center',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'center'
|
|
27
|
+
})
|
|
28
|
+
<BdBar paddingTop="0px">
|
|
29
|
+
<BdNav isCenter :themelist="navdatas" :isVertical="false" :imgWarp="{ width: '16px', height: '16px',right:'10px' }"
|
|
30
|
+
:themeWarpStyle="themeWarpStyle" @selectCategory="handleSelectCategory"></BdNav>
|
|
31
|
+
</BdBar>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 布局组件
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## 布局组件使用
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
import { BdLayout1 } from '@bdsoft/element'
|
|
41
|
+
|
|
42
|
+
<BdLayout1>
|
|
43
|
+
<template #left>
|
|
44
|
+
11111
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
</BdLayout1>
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
import { BdLayout4 } from '@bdsoft/element'
|
|
53
|
+
|
|
54
|
+
<BdLayout4>
|
|
55
|
+
<template #header>
|
|
56
|
+
11111
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
</BdLayout4>
|
|
60
|
+
|
|
61
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: loading组件
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2024-11-25
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="page-loading" :style="{ height: props.height }">
|
|
10
|
+
<div id="bd-loading-table">
|
|
11
|
+
<div class="spinner2">
|
|
12
|
+
<div class="rect1"></div>
|
|
13
|
+
<div class="rect2"></div>
|
|
14
|
+
<div class="rect3"></div>
|
|
15
|
+
<div class="rect4"></div>
|
|
16
|
+
<div class="rect5"></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="load_title">数据加载中,请耐心等待...</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<script setup>
|
|
23
|
+
import { ref, reactive, computed, watch, onMounted } from 'vue'
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
height: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '500px'
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="scss" scoped>
|
|
33
|
+
.page-loading {
|
|
34
|
+
height: 100%;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
}
|
|
37
|
+
#bd-loading-table {
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
transform: translateY(20%);
|
|
41
|
+
// position: fixed;
|
|
42
|
+
// top: 0;
|
|
43
|
+
// left: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
align-items: center;
|
|
47
|
+
z-index: 99999;
|
|
48
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
49
|
+
transition: 0.2s ease-in;
|
|
50
|
+
transition-property: background-color;
|
|
51
|
+
|
|
52
|
+
.spinner2 {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 20%;
|
|
55
|
+
left: 50%;
|
|
56
|
+
transform: translate(-50%, -50%);
|
|
57
|
+
width: 50px;
|
|
58
|
+
height: 50px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.spinner2 > div {
|
|
64
|
+
margin: 0 2px;
|
|
65
|
+
padding: 0;
|
|
66
|
+
// background-color: rgb(216, 216, 216);
|
|
67
|
+
background-color: var(--el-color-primary);
|
|
68
|
+
border-radius: 5px;
|
|
69
|
+
height: 100%;
|
|
70
|
+
width: 6px;
|
|
71
|
+
display: inline-block;
|
|
72
|
+
-webkit-animation: sk-stretchdelay 1.5s infinite ease-in-out;
|
|
73
|
+
animation: sk-stretchdelay 1.5s infinite ease-in-out;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.spinner2 .rect2 {
|
|
77
|
+
-webkit-animation-delay: -1.4s;
|
|
78
|
+
animation-delay: -1.4s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.spinner2 .rect3 {
|
|
82
|
+
-webkit-animation-delay: -1.3s;
|
|
83
|
+
animation-delay: -1.3s;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.spinner2 .rect4 {
|
|
87
|
+
-webkit-animation-delay: -1.2s;
|
|
88
|
+
animation-delay: -1.2s;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.spinner2 .rect5 {
|
|
92
|
+
-webkit-animation-delay: -1.1s;
|
|
93
|
+
animation-delay: -1.1s;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.load_title {
|
|
97
|
+
font-family: 'Open Sans';
|
|
98
|
+
// color: #4f4f4f;
|
|
99
|
+
color: var(--el-color-primary);
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
width: 100%;
|
|
102
|
+
text-align: center;
|
|
103
|
+
z-index: 9998;
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 35%;
|
|
106
|
+
opacity: 1;
|
|
107
|
+
line-height: 30px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
@keyframes sk-stretchdelay {
|
|
111
|
+
0%,
|
|
112
|
+
40%,
|
|
113
|
+
100% {
|
|
114
|
+
transform: scaleY(0.4);
|
|
115
|
+
-webkit-transform: scaleY(0.4);
|
|
116
|
+
}
|
|
117
|
+
20% {
|
|
118
|
+
transform: scaleY(1);
|
|
119
|
+
-webkit-transform: scaleY(1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
</style>
|