From 3500a34fc17827eef64ca0b7e4b2a3121b24ab5b Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周二, 29 4月 2025 17:33:29 +0800
Subject: [PATCH] 去掉生成的代码
---
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