From c6e8b600398de38b6684f5fa1eaaaade8562859b Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 20 九月 2025 15:16:56 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu

---
 项目代码/WCS/WCSClient/src/views/JElDescription.vue |  162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/JElDescription.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/JElDescription.vue"
new file mode 100644
index 0000000..12ec17d
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSClient/src/views/JElDescription.vue"
@@ -0,0 +1,162 @@
+<template>
+  <div class="j-description wordwrap" :class="class__" :style="style__">{{value}}</div>
+</template>
+
+<script>
+  export default {
+    name: "j-el-description",
+    inject: {
+      elForm: {
+        default: ''
+      },
+      elFormItem: {
+        default: ''
+      }
+    },
+
+    props: {
+      value: [String, Number],    // 鍐呭
+      type: {                     // 涓婚
+        type: String,
+        validator(value) {
+          return ['primary', 'success', 'info', 'warning', 'danger'].indexOf(value) !== -1;
+        }
+      },
+      size: {                     // 灏哄
+        type: String,
+        validator(value) {
+          return ['medium', 'small', 'mini'].indexOf(value) !== -1;
+        }
+      },
+      height: [String, Number],   // 闄愬埗楂樺害
+      ellipsis: Boolean,          // 鐪佺暐鍙�
+    },
+
+    computed: {
+      elFormItemSize__() {
+        return (this.elFormItem || {}).elFormItemSize;
+      },
+      size__() {
+        return this.size || this.elFormItemSize__ || (this.$ELEMENT || {}).size;
+      },
+      class__() {
+        let _class = [];
+        if (this.type) {
+          _class.push(this.type);
+        }
+        if (this.size__) {
+          _class.push(this.size__);
+        }
+        if (this.height) {
+          _class.push('scroll');
+        }
+        if (this.ellipsis) {
+          _class.push('ellipsis');
+        }
+        return _class;
+      },
+      style__() {
+        let _style = {};
+        if (!this.ellipsis && this.height) {
+          if (isNaN(this.height)) {
+            _style.height = this.height;
+          } else {
+            _style.height = this.height + 'px';
+          }
+        }
+        return _style;
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .j-description {
+    min-height: 40px;
+    line-height: 40px;
+    padding: 0 50%;
+  }
+
+  /*澶у皬*/
+  .j-description.medium {
+    min-height: 36px;
+    line-height: 36px;
+  }
+
+  .j-description.small {
+    min-height: 32px;
+    line-height: 32px;
+  }
+
+  .j-description.mini {
+    min-height: 28px;
+    line-height: 28px;
+  }
+
+  /*婊氬姩*/
+  .j-description.scroll {
+    overflow-x: hidden;
+    overflow-y: auto;
+  }
+
+  .j-description.scroll::-webkit-scrollbar {
+    width: 9px;
+    height: 9px;
+    background: #F3F3F3;
+  }
+
+  .j-description.scroll::-webkit-scrollbar-thumb {
+    border: 1px solid #ffffff;
+    border-radius: 6px;
+    background: #c9c9c9;
+  }
+
+  .j-description.scroll::-webkit-scrollbar-thumb:hover {
+    background: #b5b5b5;
+  }
+
+  /*鎹㈣*/
+  .j-description.wordwrap {
+    table-layout: fixed;
+    word-break: break-all;
+    word-wrap: break-word;
+  }
+
+  /*鐪佺暐鍙�*/
+  .j-description.ellipsis {
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+
+  /*涓婚*/
+  .j-description.primary {
+    background-color: #ecf5ff;
+    border: 1px solid #d9ecff;
+    color: #409eff;
+  }
+
+  .j-description.success {
+    background-color: #f0f9eb;
+    border-color: #e1f3d8;
+    color: #67c23a;
+  }
+
+  .j-description.info {
+    background-color: #f4f4f5;
+    border-color: #e9e9eb;
+    color: #909399;
+  }
+
+  .j-description.warning {
+    background-color: #fdf6ec;
+    border-color: #faecd8;
+    color: #e6a23c;
+  }
+
+  .j-description.danger {
+    background-color: #fef0f0;
+    border-color: #fde2e2;
+    color: #f56c6c;
+  }
+</style>
\ No newline at end of file

--
Gitblit v1.9.3