提交 02e3ddea 作者: 方治民

chore: 优化组件自动注入和样式兼容问题

上级 8cd921f3
export type * from './src/types'
export * from './src/hook'
export { default as BottomBarWidget } from './src/index.vue'
export { default as BottomBarWidget } from './src/BottomBar.vue'
export type * from './src/types'
export * from './src/hook'
export { default as LegendWidget } from './src/index.vue'
export { default as LegendWidget } from './src/Legend.vue'
export type * from './src/types'
export * from './src/hook'
export { default as SwitchControlWidget } from './src/index.vue'
export { default as SwitchControlWidget } from './src/SwitchControl.vue'
......@@ -20,12 +20,12 @@
// 前后切换小部件
const [registerSwitchControlWidget] = useSwitchControlWidget({
show: true,
prev: () => console.log('prev'),
next: () => console.log('next'),
prev: () => Message.toast('prev'),
next: () => Message.toast('next'),
})
// 图例小部件
const [registerLegendWidget] = useLegendWidget({
const [registerLegendWidget, { toggleExpand: toggleLegendWidgetExpand }] = useLegendWidget({
show: true,
expand: true,
title: defaultLegendConfig.title,
......@@ -39,6 +39,10 @@
height: 100,
maxHeight: 200,
})
function testPackUp() {
toggleLegendWidgetExpand()
}
</script>
<template>
......@@ -59,7 +63,7 @@
<!-- 底部 Bar 小部件 -->
<BottomBarWidget @register="registerBottomBarWidget">
<!-- 内容 Slot -->
<view class="c-coolGray">底部交互控件/展示内容</view>
<view class="c-coolGray" @tap="testPackUp">底部交互控件/展示内容</view>
</BottomBarWidget>
</view>
</view>
......@@ -74,17 +78,23 @@
// bottom: calc(30rpx + 80rpx + v-bind(height));
}
}
</style>
<style>
/* 外部套一层防止全局污染 */
.rain {
// #ifdef H5
:deep(.mapboxgl-ctrl-bottom-right) {
bottom: calc(30rpx + 60rpx + v-bind(height));
bottom: calc(30rpx + 50rpx + v-bind(height));
}
:deep(.mapboxgl-ctrl-bottom-left) {
bottom: calc(30rpx + 50rpx + v-bind(height));
}
// #endif
// #ifdef APP-PLUS
:deep(.mapboxgl-ctrl-bottom-right) {
bottom: calc(5rpx + v-bind(height));
}
:deep(.mapboxgl-ctrl-bottom-left) {
bottom: calc(30rpx + 60rpx + v-bind(height));
bottom: calc(5rpx + v-bind(height));
}
// #endif
}
</style>
......@@ -7,14 +7,12 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
BottomBar: typeof import('./../src/components/Map/Mapbox/components/BottomBar.vue')['default']
BottomBarWidget: typeof import('./../src/components/Map/Mapbox/widgets/BottomBarWidget.vue')['default']
BottomBar: typeof import('./../src/components/Map/Mapbox/widgets/BottomBar/src/BottomBar.vue')['default']
CacheImage: typeof import('./../src/components/CacheImage/index.vue')['default']
CustomPicker: typeof import('./../src/components/CustomPicker/index.vue')['default']
Empty: typeof import('./../src/components/Empty/index.vue')['default']
FDragItem: typeof import('./../src/components/FirstUI/fui-drag/f-drag-item.vue')['default']
FIndexListItem: typeof import('./../src/components/FirstUI/fui-index-list/f-index-list-item.vue')['default']
FloatFillter: typeof import('./../src/components/Map/Mapbox/components/FloatFillter.vue')['default']
FloatFillterWidget: typeof import('./../src/components/Map/Mapbox/widgets/FloatFillterWidget.vue')['default']
FuiActionsheet: typeof import('./../src/components/FirstUI/fui-actionsheet/fui-actionsheet.vue')['default']
FuiAlert: typeof import('./../src/components/FirstUI/fui-alert/fui-alert.vue')['default']
......@@ -140,19 +138,14 @@ declare module 'vue' {
Grid: typeof import('./../src/components/Layout/Grid.vue')['default']
Header: typeof import('./../src/components/Layout/Header.vue')['default']
Icon: typeof import('./../src/components/Icon/index.vue')['default']
LeftBar: typeof import('./../src/components/Map/Mapbox/components/LeftBar.vue')['default']
LeftBarWidget: typeof import('./../src/components/Map/Mapbox/widgets/LeftBarWidget.vue')['default']
Legend: typeof import('./../src/components/Map/Mapbox/components/Legend.vue')['default']
LegendWidget: typeof import('./../src/components/Map/Mapbox/components/LegendWidget/index.vue')['default']
Legend: typeof import('./../src/components/Map/Mapbox/widgets/Legend/src/Legend.vue')['default']
Mapbox: typeof import('./../src/components/Map/Mapbox/index.vue')['default']
MenuHeader: typeof import('./../src/components/Layout/MenuHeader.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Src: typeof import('./../src/components/Map/Mapbox/widgets/BottomBar/src/index.vue')['default']
SwitchControl: typeof import('./../src/components/Map/Mapbox/components/SwitchControl.vue')['default']
SwitchControlWidget: typeof import('./../src/components/Map/Mapbox/widgets/SwitchControlWidget.vue')['default']
SwitchControl: typeof import('./../src/components/Map/Mapbox/widgets/SwitchControl/src/SwitchControl.vue')['default']
ThumbnailPreview: typeof import('./../src/components/ThumbnailPreview/index.vue')['default']
TopBar: typeof import('./../src/components/Map/Mapbox/components/TopBar.vue')['default']
TopBarWidget: typeof import('./../src/components/Map/Mapbox/widgets/TopBarWidget.vue')['default']
View: typeof import('./../src/components/Layout/View.vue')['default']
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论