From 50ee7232f3c98fe24a1f2e31dba9508cfec14887 Mon Sep 17 00:00:00 2001
From: gjj <Ganjj@probim.com.cn>
Date: Fri, 21 Feb 2025 17:35:39 +0800
Subject: [PATCH] 模型预览

---
 src/components/Divide.vue |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/src/components/Divide.vue b/src/components/Divide.vue
new file mode 100644
index 0000000..d7a2028
--- /dev/null
+++ b/src/components/Divide.vue
@@ -0,0 +1,46 @@
+<template>
+  <div :style="styleObj"></div>
+</template>
+
+<script>
+  const Directions = ["x", "y"];
+  export default {
+    name: "Divide",
+    props: {
+      direction: {
+        type: String,
+        default: "y",
+        validator(v) {
+          return Directions.includes(v);
+        },
+      },
+      width: {
+        type: String,
+        default: "1px",
+      },
+      height: {
+        type: String,
+        default: "24px",
+      },
+      bgc: {
+        type: String,
+        default: "#fff",
+      },
+      opacity: {
+        type: Number,
+        default: 1,
+      },
+    },
+    computed: {
+      styleObj() {
+        return {
+          width: this.width,
+          height: this.height,
+          backgroundColor: this.bgc,
+          opacity: this.opacity,
+          transform: this.direction === "x" ? "rotate3d(0,0,1,90deg)" : "",
+        };
+      },
+    },
+  };
+</script>

--
Gitblit v1.9.3