Bladeren bron

feat: 还原title文件

TIANYONG 1 jaar geleden
bovenliggende
commit
76d4ffe1d9

+ 28 - 0
src/page-instrument/header-top/title/index.module.less

@@ -0,0 +1,28 @@
+.container {
+    width: 170px;
+    height: 31px;
+    background: transparent;
+    display: flex;
+    align-items: center;
+    border-radius: 18px;
+    padding: 6px 10px;
+  
+    .noticeBar {
+      flex: 1;
+      padding: 0;
+    }
+    &.pcContainer {
+      width: 500px;
+    }
+  }
+  
+  .icon {
+    width: 26px;
+    height: 26px;
+    flex-shrink: 0;
+  }
+  
+  .status {
+    margin-left: auto;
+    flex-shrink: 0;
+  }

+ 36 - 0
src/page-instrument/header-top/title/index.tsx

@@ -0,0 +1,36 @@
+import { defineComponent } from 'vue'
+import { NoticeBar } from 'vant'
+import styles from './index.module.less'
+import state, { IPlatform } from "/src/state";
+
+import MusicIcon from '../image/music.png'
+import ArrowIcon from '../image/arrow.svg'
+
+export default defineComponent({
+  name: 'detail-title',
+  props: {
+    text: {
+      type: String,
+      default: ''
+    },
+    rightView: {
+      type: Boolean,
+      default: true,
+    },
+    onClick: {
+      type: Function,
+    } as any
+  },
+  render() {
+    return (
+      <div class={[styles.container, state.platform === IPlatform.PC && styles.pcContainer]}>
+        <NoticeBar
+          text={this.text}
+          color="#000"
+          class={styles.noticeBar}
+          background="none"
+        />
+      </div>
+    )
+  }
+})