12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <view class="cart-fix" @click="toCart">
- <u-image width="50rpx" height="50rpx" src="/static/cart.png"></u-image>
- <u-badge absolute :offset="[15,10]" type="error" :count="count"></u-badge>
- </view>
- </template>
- <script>
- export default {
- props: {
- count: {
- type: Number,
- default: 0
- },
- },
- data() {
- return {
- }
- },
- methods: {
- toCart() {
- uni.navigateTo({
- url:"/pages/cart/cart"
- })
- }
- },
- }
- </script>
- <style lang="scss">
- .cart-fix{
- position: fixed;
- z-index: 100000;
- background: rgba($color: #00aa00, $alpha: 0.9);
- padding: 20upx;
- border-radius: 100%;
- bottom: 15%;
- right: 5%;
- box-shadow: 0upx 3upx 8upx #999;
- }
- </style>
|