| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <view class="footer-share-box display-around">
- <button
- class="display-flex-start items-center share-font"
- :style="{ 'border-right': isCollection ? '1px solid #d8d8d8' : 'none' }"
- open-type="share"
- @click="sharePage()"
- >
- <view style="margin-right: 15rpx; font-size: 26rpx">分享</view>
- <image
- src="../../static/share_icon.png"
- mode="aspectFill"
- style="width: 30rpx; height: 30rpx"
- ></image>
- </button>
- <view
- class="display-flex-start items-center share-font"
- v-if="isCollection"
- @click="collectionPage()"
- >
- <view style="margin-right: 15rpx; font-size: 26rpx">收藏</view>
- <image
- :src="isCollectedIcon ? '../../static/collected.png' : '../../static/collection.png'"
- mode="aspectFill"
- style="width: 40rpx; height: 40rpx"
- ></image>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "footer-share",
- props: {
- isCollection: {
- type: Boolean,
- default: false,
- },
- isCollectedIcon: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {};
- },
- methods: {
- sharePage() {
- this.$emit("sharePages");
- },
- collectionPage() {
- this.$emit("collectionPages");
- },
- },
- };
- </script>
- <style>
- .footer-share-box {
- height: 50rpx;
- position: fixed;
- bottom: 0;
- width: 98%;
- border-radius: 10rpx;
- box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
- padding: 20rpx;
- background: #fff;
- margin-left: -20rpx;
- }
- .share-font {
- width: 45%;
- justify-content: center;
- }
- .footer-share-box button {
- background-color: #fff;
- border-radius: 0;
- }
- .footer-share-box button::after {
- border: none;
- }
- </style>
|