1 Star 0 Fork 2

城南/Cesium跟随的弹框(点击地图点位显示)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TipWindow.vue 3.73 KB
一键复制 编辑 原始数据 按行查看 历史
城南 提交于 2023-05-11 12:25 . update TipWindow.vue.
<template>
<div @click="resizeClick" :class="theme + ' window-container pop-window'" v-if="show">
<div class="window-body">
<div class="window-header">
<span class="window-title">
<slot name="header"></slot>
</span>
<span class="window-close" title="关闭" @click="closeClick">×</span>
</div>
<div class="window-body">
<slot name="content"></slot>
</div>
<div class="window-footer">
<div class="window-footer-content" :class="theme">
<slot name="footer"></slot>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "ToolsTipWindow",
components: {
},
props: {
// dark || light
theme: {type: String, default: 'dark'},
//object类型方便后期数据拓展
options: {type: Object},
},
data(){
return {
show: true,
}
},
methods: {
closeClick() {
if (this.closeEvent) {
this.closeEvent();
}
},
resizeClick: function(){
if (this.clickEvent) {
this.clickEvent();
}
},
},
beforeMount(){
console.log("this.options", this.options)
},
beforeDestroy() {
},
};
</script>
<style lang="less" scoped>
.pop-window{
z-index: 1;
}
.window-container {
// position: absolute;
// left: 0px;
// bottom: 0px;
padding: 2px 5px;
color: white;
border-radius: 5px;
background: rgba(0, 34, 102, 0.7);
min-width: 60px;
text-align: left;
font-size: 14px;
}
.window-container.light{
background: rgba(255, 255, 255, 0.9);
color: #333;
}
.window-container.dark{
background: rgba(0, 34, 102, 0.7);
color: #fff;
}
.window-container::after {
content: "";
position: absolute;
left: 20px;
width: 10px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid rgba(0, 34, 102, 0.7);
bottom: -10px;
}
.window-container.dark::after {
border-top: 10px solid rgba(0, 34, 102, 0.7);
}
.window-container.light::after {
border-top: 10px solid rgba(255, 255, 255, 0.9);
}
.window-header {
height: 2rem;
line-height: 2rem;
color: #303133;
min-width: 200px;
padding: 0px 10px;
position: relative;
user-select: none;
}
.light .window-header {
color: #303133;
}
.dark .window-header {
color: #FFFFFF;
}
.window-header .window-title{
font-weight: 600;
}
.window-close {
position: absolute;
top: -10px;
right: -10px;
font-size: 25px;
cursor: pointer;
width: 29px;
opacity: 0.4;
}
.window-close:hover{
opacity: 1;
}
.window-body {
padding: 5px;
}
.window-info-title{
font-weight: 600;
}
.window-info-item {
display: flex;
}
.window-info-label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
text-align: justify;
text-align-last: justify;
padding-right: 1rem;
font-weight: 400;
}
.window-info-text{
flex: 1;
}
.window-footer-content {
& > div {
display: flex;
align-items: center;
font-size: 13px;
padding: 2px 5px;
}
&.light,
&.dark {
background: none;
}
&.light .btn {
border: 1px solid #ccc;
padding: 2px 8px;
border-radius: 3px;
margin: 10px 5px 0;
cursor: pointer;
transition: 0.3s;
&:hover {
color: #4076F6;
border: 1px solid #4076F6;
}
}
&.dark .btn {
border: 1px solid #ccc;
padding: 2px 8px;
border-radius: 3px;
margin: 10px 5px 0;
cursor: pointer;
transition: 0.3s;
&:hover {
color: #4076F6;
border: 1px solid #4076F6;
}
}
}
.textColor {
color: #4076F6;
}
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xupengcheng-web/cesiumMapTip.git
git@gitee.com:xupengcheng-web/cesiumMapTip.git
xupengcheng-web
cesiumMapTip
Cesium跟随的弹框(点击地图点位显示)
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385