From d7f4282e1dca73253629d829c12280799bc9a620 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?LAPTOP-D7TKRI82=5C=E9=82=93?= <52643018@qq.com>
Date: Thu, 12 Aug 2021 14:55:27 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20[=E5=85=AC=E5=85=B1?=
=?UTF-8?q?=E6=96=B9=E6=B3=95]=20=E6=97=B6=E9=97=B4=E6=88=B3=E8=BD=AC?=
=?UTF-8?q?=E5=8C=96=E4=B8=BA=E6=97=B6=E9=97=B4=E6=97=A5=E6=9C=9F=E6=A0=BC?=
=?UTF-8?q?=E5=BC=8F=20[=E6=96=B0=E5=A2=9E]=20[=E5=85=AC=E5=85=B1=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F]=20=E6=96=B0=E7=9A=84=E7=B1=BB=E5=90=8D=EF=BC=8C?=
=?UTF-8?q?=E6=94=B9=E5=8F=98=E7=9B=92=E5=AD=90=E6=A8=A1=E5=9E=8B=20[?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=84=E4=BB=B6]=20image=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=20[=E6=96=B0=E5=A2=9E=E7=BB=84=E4=BB=B6]=20=E9=A2=84=E8=A7=88?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=84=E4=BB=B6=20[=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6]=20=E6=AD=A5=E9=AA=A4=E6=9D=A1=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/shared.js | 26 +-
common/styles/common.css | 8 +
components/lf-image/lf-image.vue | 190 +++++++++++
.../lf-previewImage/lf-previewImage.vue | 315 ++++++++++++++++++
components/lf-stepbar/lf-stepbar.vue | 118 +++++++
5 files changed, 656 insertions(+), 1 deletion(-)
create mode 100644 components/lf-image/lf-image.vue
create mode 100644 components/lf-previewImage/lf-previewImage.vue
create mode 100644 components/lf-stepbar/lf-stepbar.vue
diff --git a/common/shared.js b/common/shared.js
index 043dfaf..597f90a 100644
--- a/common/shared.js
+++ b/common/shared.js
@@ -24,4 +24,28 @@ export function isRight(obj) {
export function isValueType(value) {
let str = Object.prototype.toString.call(value);
return str.match(/\[object (.*?)\]/)[1].toLowerCase();
-}
\ No newline at end of file
+}
+
+// 解析时间戳,参数非必传,不传参时默认显示当前最新日期+时间;
+// 第一个参数为当前日期时间戳,第二个日期分隔符,第三个不传参或传all显示日期+时间,传date显示日期,time显示时间
+export function recordTime(time = new Date(), separator = "-", swf = 'all'){
+ let year = time.getFullYear();
+ let month = time.getMonth() + 1;
+ let day = time.getDate();
+ let hour = time.getHours();
+ let min = time.getMinutes();
+ let ppn = time.getSeconds();
+ if(swf === "time"){
+ return [hour, min, ppn].map(cover).join(":");
+ }else if(swf === "date"){
+ return [year, month, day].map(cover).join(String(separator));
+ }else{
+ return [year, month, day].map(cover).join(String(separator)) +" "+ [hour, min, ppn].map(cover).join(":");
+ }
+}
+// 位数不足2,前面补0
+var cover = function(par) {
+ par = par.toString()[1] ? par : "0" + par;
+ return par;
+}
+
diff --git a/common/styles/common.css b/common/styles/common.css
index 56b2730..b4e1b41 100644
--- a/common/styles/common.css
+++ b/common/styles/common.css
@@ -11,6 +11,10 @@
height: 100%;
}
+.lf-h-maxcontent{
+ height: max-content;
+}
+
.lf-flex {
display: flex;
align-items: center;
@@ -266,6 +270,10 @@
border-left: 1px solid #EEEEEE;
}
+.lf-border-box{
+ box-sizing: border-box;
+}
+
.lf-m-1 {
margin: 1rpx !important;
}
diff --git a/components/lf-image/lf-image.vue b/components/lf-image/lf-image.vue
new file mode 100644
index 0000000..ed6358f
--- /dev/null
+++ b/components/lf-image/lf-image.vue
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
diff --git a/components/lf-previewImage/lf-previewImage.vue b/components/lf-previewImage/lf-previewImage.vue
new file mode 100644
index 0000000..acfe67e
--- /dev/null
+++ b/components/lf-previewImage/lf-previewImage.vue
@@ -0,0 +1,315 @@
+
+
+ switchItem(e.detail.current)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ swiper_current + 1 }} / {{ images.length }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/lf-stepbar/lf-stepbar.vue b/components/lf-stepbar/lf-stepbar.vue
new file mode 100644
index 0000000..398137b
--- /dev/null
+++ b/components/lf-stepbar/lf-stepbar.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.action }}
+ {{ item.created_at }}
+
+
+
+
+
+
+
+
+