28 lines
547 B
Vue
28 lines
547 B
Vue
<template>
|
|
<view class="relative">
|
|
<slot v-if="$slots.default" name="default"></slot>
|
|
<up-icon v-else name="share-square" bold color="#333" size="36rpx"></up-icon>
|
|
<view class="absolute share-box">
|
|
<button open-type="share" @click="shareClick">分享</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
const emits = defineEmits(['shareClick'])
|
|
|
|
function shareClick() {
|
|
emits('shareClick')
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.share-box {
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
top: 0;
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
}
|
|
</style> |