ssm1xq9q/src/main/webapp/front/components/uni-ui/lib/uni-title/uni-title.vue

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<template>
  <view :class="{sticky:sticky}" :style="{top:stickyTop+'px'}" class="uni-title">
    <view v-if="type" class="uni-title__head">
      <view :class="type" class="uni-title__head-tag" />
    </view>
    <view class="uni-title__content">
      <view :class="{'distraction':!subTitle}" class="uni-title__content-title">{{ title }}</view>
      <view class="uni-title__content-sub">{{ subTitle }}</view>
    </view>
  </view>
</template>

<script>
  export default {
    name: 'UniTitle',
    props: {
      type: {
        type: String,
        default: ''
      },
      title: {
        type: String,
        default: ''
      },
      subTitle: {
        type: String,
        default: ''
      },
      sticky: {
        type: Boolean,
        default: false
      },
      stickyTop: {
        type: Number,
        default: 0
      }
    },
    data() {
      return {}
    },
    watch: {
      title(newVal) {
        if (uni.report && newVal !== '') {
          uni.report('title', newVal)
        }
      }
    },
    methods: {
      onClick() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
  .uni-title {
    margin-top: 10px;
    z-index: 100;
    display: flex;
后面还有 55 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。