|
|
@@ -0,0 +1,121 @@
|
|
|
+// title组件
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="title-line df aic jcsb">
|
|
|
+ <div class="df aic">
|
|
|
+ <img class="icon" :src="exchangeUrl(icon)" alt="" />
|
|
|
+ <div class="title">{{ title }}</div>
|
|
|
+ </div>
|
|
|
+ <div v-if="type != 0" class="df aic">
|
|
|
+ <img
|
|
|
+ class="nation"
|
|
|
+ v-if="type == 2"
|
|
|
+ :src="exchangeUrl(nationIcon)"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <div class="end">{{ endText }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="underline df aic">
|
|
|
+ <div class="fline"></div>
|
|
|
+ <div class="sline"></div>
|
|
|
+ <div class="tline"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
+
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ icon: {
|
|
|
+ type: String,
|
|
|
+ default: "user",
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ type: String,
|
|
|
+ default: "信息",
|
|
|
+ },
|
|
|
+ type: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
+ nationIcon: {
|
|
|
+ type: String,
|
|
|
+ default: "china",
|
|
|
+ },
|
|
|
+ endText: {
|
|
|
+ type: String,
|
|
|
+ default: "货主王",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ function init() {}
|
|
|
+ function exchangeUrl(icon) {
|
|
|
+ return `/${icon}.png`;
|
|
|
+ }
|
|
|
+ onMounted(() => {
|
|
|
+ init();
|
|
|
+ });
|
|
|
+ return {
|
|
|
+ init,
|
|
|
+ exchangeUrl,
|
|
|
+ };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.title-line {
|
|
|
+ color: #fff;
|
|
|
+ .icon {
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #e6f7ff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .nation {
|
|
|
+ width: 25px;
|
|
|
+ height: 16px;
|
|
|
+ margin-right: 14px;
|
|
|
+ }
|
|
|
+ .end {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #d1e2ed;
|
|
|
+ }
|
|
|
+}
|
|
|
+.underline {
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-top: 4px;
|
|
|
+ margin-left: 3px;
|
|
|
+ .fline {
|
|
|
+ width: 24px;
|
|
|
+ height: 2px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid #10ffb9;
|
|
|
+ margin-right: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sline {
|
|
|
+ width: 362px;
|
|
|
+ height: 2px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid rgba($color: #fff, $alpha: 0.2);
|
|
|
+ margin-right: 2px;
|
|
|
+ }
|
|
|
+ .tline {
|
|
|
+ width: 12px;
|
|
|
+ height: 2px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid rgba($color: #fff, $alpha: 0.2);
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|