zoukankan      html  css  js  c++  java
  • header

    <style lang="stylus" scoped>
    @import "../css/base/variables.styl"
    @import "../css/mixins/index.styl"
    .header-wrap
    box-shadow 0 0 1px rgba(0, 0, 0, 0.25)
    background #F1F1F1
    z-index 5
    height 50px
    line-height 50px
    .header
    display flex
    height 50px
    line-height 50px
    z-index 1
    align-items center
    box-sizing border-box
    width calc(100% - 48px)
    a
    max-width 120px
    text-ellipsis()
    white-space nowrap
    &:last-child:not(.home-link)
    &.person
    &.home-link
    flex-shrink 0
    .icon
    flex-shrink 0
    .default-color
    color #cd0010
    </style>

    <template>
    <div class="header-wrap">
    <div v-show="visible" class="header pl1">
    <router-link class="px05 home-link default-color" :to="{path: '/', query: null}">全部</router-link>
    <template v-if="personName">
    <icon name="angle-right" class="text-light icon" />
    <a class="px05 person default-color" @click="personClick(personName)" >{{personName}}</a>
    </template>

    <template v-if="storeName">
    <icon name="angle-right" class="text-light icon" />
    <a class="store px05 default-color" @click="storeClick(personName, storeName)">{{storeName}}</a>
    </template>

    <template v-if="categoryName">
    <icon name="angle-right" class="text-light icon" />
    <a class="px05 ">{{categoryName}}</a>
    </template>
    </div>
    <slot name="selected-counter"></slot>
    <slot name="button"></slot>
    </div>
    </template>

    <script type="text/babel">
    import linkMixin from './mixins/link'
    import paramsMixin from './mixins/params'

    export default{
    mixins: [linkMixin, paramsMixin],
    props: {
    visible: {
    type: Boolean,
    default: true
    }
    }
    }
    </script>
  • 相关阅读:
    小程序获知渠道弹出层设计
    小程序下拉菜单筛选
    align-conten和align-items的区别
    微信小程序文本如何换行
    微信小程序最新获取用户头像昵称的方法
    JQ版本对比
    选择收货地址列表的某一项将数据传到订单页面
    inline、block、inline-block属性的区别
    微博资料
    zookeeper知识点学习
  • 原文地址:https://www.cnblogs.com/luxiaoxiao/p/6734836.html
Copyright © 2011-2022 走看看