From 7ecca2a5e7a9c9ae811b68dc98e05c689b18aca6 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 04 5月 2025 15:41:43 +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