hagerH1.vue 1.08 KB
<!--
 * @Date: 2024-09-29 10:07:11
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2024-10-16 11:57:09
 * @FilePath: /hager/src/components/common/hagerH1.vue
 * @Description: 文件描述
-->
<template>
  <div :class="['hagerH1']">
    <p class="h1">{{ title }}</p>
    <p class="sub">{{ sub }}</p>
  </div>
</template>

<script>
import mixin from 'common/mixin';

export default {
  mixins: [mixin.init],
  props: {
    title: {
      type: String,
      default: '标题'
    },
    sub: {
      type: String,
      default: '副标题'
    },
    width: {
      type: Number,
      default: 0
    }
  },
  watch: {
    width (val) {
      this.screen_width = val;
    }
  },
  data () {
    return {
      screen_width: 0,
    }
  },
  mounted () {

  },
  methods: {

  }
}
</script>

<style lang="less" scoped>
  .hagerH1 {
    // &.xs {
      // padding: 0 1rem;
    // }
    .h1 {
      color: @secondary-color;
      font-size: 1.9rem;
      font-weight: bold;
    }
    .sub {
      color: @primary-color;
      font-size: 1.7rem;
      font-weight: bold;
    }
  }
</style>