<template>
  <div :style="{ 'text-align': pos }" class="title-top-warp">{{ topTitle || '--' }}</div>
</template>
<script setup>
import { isEmpty, getAssetsFile } from '@/utils';
import { ref, reactive, onMounted, watch } from 'vue';
import { useRouter } from 'vue-router';
import { useApp } from '@/hooks';

const router = useRouter();
const props = defineProps({
  title: {
    type: String,
    default: '统计分析',
  },
  postion: {
    type: String,
    default: 'left',
  },
});

let topTitle = ref('');
let pos = ref('');

watch(
  () => (props.title, props.postion),
  () => {
    topTitle.value = props.title;
    pos.value = props.postion;
  },
  {
    deep: true,
    immediate: true,
  }
);
</script>
<style lang="scss" scoped>
.title-top-warp {
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  transform: skewX(-13deg);
  background: linear-gradient(to bottom, '#ff7e5f', '#548fff');
  -webkit-background-clip: text;
  color: #fff;
  letter-spacing: 4px;
  text-shadow: -2px 0 0 1px #add8f1;
  width: 100%;
}
</style>
