From 38b161e4d52362081bfe78fb5b51fbf384db7ce2 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 06 5月 2025 07:22:21 +0800
Subject: [PATCH] 222

---
 HIAWms/web/src/components/ElSelect/ElSelect.tsx |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/HIAWms/web/src/components/ElSelect/ElSelect.tsx b/HIAWms/web/src/components/ElSelect/ElSelect.tsx
new file mode 100644
index 0000000..ceb3207
--- /dev/null
+++ b/HIAWms/web/src/components/ElSelect/ElSelect.tsx
@@ -0,0 +1,52 @@
+/**
+ * 绂佹鍦ㄩ潪Setting閰嶇疆涓嬩娇鐢�
+ */
+import { defineComponent, SetupContext } from 'vue'
+import IconButton from '@/components/IconButton/IconButton'
+import { CaretBottom } from '@element-plus/icons-vue'
+import { useVModel } from '@vueuse/core'
+import Option from './ElOption'
+import { has } from 'lodash'
+import './index.scss'
+
+interface SelectProps {
+  [key: string]: any
+}
+
+export default defineComponent<SelectProps, any>({
+  //@ts-ignore
+  props: ['disabled'],
+  setup(props: SelectProps, { attrs, slots, emit }: any) {
+    const namespace = import.meta.env.VITE_APP_NAMESPACE
+
+    const options = attrs.optionData?.value || (attrs.optionData as Array<any>)
+
+    return () => {
+      const disabled =
+        typeof props.disabled?.value === 'boolean'
+          ? props.disabled?.value
+          : (props.disabled as boolean)
+      return (
+        <el-config-provider namespace={namespace} z-index={500}>
+          <el-select
+            {...attrs}
+            disabled={disabled}
+            class="cs-setting-select_custom_style"
+            popper-class="settings-cs-select_check"
+            suffix-icon={
+              <el-icon>
+                <CaretBottom />
+              </el-icon>
+            }
+          >
+            {options
+              ? options.map((item: any) => {
+                  return <Option {...item} />
+                })
+              : slots.default?.()}
+          </el-select>
+        </el-config-provider>
+      )
+    }
+  },
+})

--
Gitblit v1.9.3