From 672bbd9abf0f54f2ae664fdf6d7c83c1d755e4c7 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 27 Oct 2023 17:15:48 +0800
Subject: [PATCH] boxTitle组件
---
components/boxTitle/index.vue | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
main.js | 3 ++-
2 files changed, 57 insertions(+), 1 deletions(-)
diff --git a/components/boxTitle/index.vue b/components/boxTitle/index.vue
new file mode 100644
index 0000000..795a5af
--- /dev/null
+++ b/components/boxTitle/index.vue
@@ -0,0 +1,55 @@
+<template>
+ <view class="cur-container" :style="{color: color}">
+ <view class="title">
+ {{title}}
+ </view>
+ <view class="bg-box">
+
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ props: {
+ title: {
+ type: String,
+ default: ''
+ },
+ color: {
+ type: String,
+ default: '#000'
+ }
+ },
+
+ methods: {
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .cur-container {
+ padding-left: 10rpx;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ position: relative;
+ height: 60rpx;
+
+ .title {
+ position: absolute;
+ z-index: 1;
+ }
+
+ .bg-box {
+ position: absolute;
+ top: 50%;
+ left: 10rpx;
+ bottom: 0;
+ width: 96rpx;
+ background: linear-gradient(to right, #407BE999, #73A2F900);
+ z-index: 0;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/main.js b/main.js
index a54d5dd..6c5e709 100644
--- a/main.js
+++ b/main.js
@@ -2,7 +2,8 @@
import App from './App'
import store from '@/store';
-
+import boxTitle from '@/components/boxTitle/index.vue';
+Vue.component('box-title', boxTitle) //
Vue.config.productionTip = false;
--
Gitblit v1.9.3