From 2682b706c99054e78c548c9624cc66634994441c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 09 二月 2023 14:14:47 +0800
Subject: [PATCH] #
---
wmsui/components/cu-custom.vue | 65 ++++++++++++++++++++++++++++++++
static/css/main.css | 23 +++++++++++
2 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/static/css/main.css b/static/css/main.css
new file mode 100644
index 0000000..a1bacf3
--- /dev/null
+++ b/static/css/main.css
@@ -0,0 +1,23 @@
+.shadow-warp {
+ position: relative;
+ box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1);
+}
+
+.shadow-warp:before,
+.shadow-warp:after {
+ position: absolute;
+ content: "";
+ top: 20upx;
+ bottom: 30upx;
+ left: 20upx;
+ width: 50%;
+ box-shadow: 0 30upx 20upx rgba(0, 0, 0, 0.2);
+ transform: rotate(-3deg);
+ z-index: -1;
+}
+
+.shadow-warp:after {
+ right: 20upx;
+ left: auto;
+ transform: rotate(3deg);
+}
\ No newline at end of file
diff --git a/wmsui/components/cu-custom.vue b/wmsui/components/cu-custom.vue
new file mode 100644
index 0000000..b09f70d
--- /dev/null
+++ b/wmsui/components/cu-custom.vue
@@ -0,0 +1,65 @@
+<template>
+ <view>
+ <view class="cu-custom" :style="[{height:CustomBar + 'px'}]">
+ <view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
+ <view class="action" @tap="BackPage" v-if="isBack">
+ <text class="cuIcon-back"></text>
+ <slot name="backText"></slot>
+ </view>
+ <view class="content" :style="[{top:StatusBar + 'px'}]">
+ <slot name="content"></slot>
+ </view>
+ <slot name="right"></slot>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ StatusBar: this.StatusBar,
+ CustomBar: this.CustomBar
+ };
+ },
+ name: 'cu-custom',
+ computed: {
+ style() {
+ var StatusBar= this.StatusBar;
+ var CustomBar= this.CustomBar;
+ var bgImage = this.bgImage;
+ var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;
+ if (this.bgImage) {
+ style = `${style}background-image:url(${bgImage});`;
+ }
+ return style
+ }
+ },
+ props: {
+ bgColor: {
+ type: String,
+ default: ''
+ },
+ isBack: {
+ type: [Boolean, String],
+ default: false
+ },
+ bgImage: {
+ type: String,
+ default: ''
+ },
+ },
+ methods: {
+ BackPage() {
+ uni.navigateBack({
+ delta: 1
+ });
+ }
+ }
+ }
+</script>
+
+<style>
+
+</style>
--
Gitblit v1.9.1