From 3f65ce2e1c34a87fb0e93cb4eabfbf80227d19da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 13 Sep 2024 17:35:14 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CustomSelect/index.js | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.js b/pc4mobx/hrmSalary/components/CustomSelect/index.js index ce218290..73bed78b 100644 --- a/pc4mobx/hrmSalary/components/CustomSelect/index.js +++ b/pc4mobx/hrmSalary/components/CustomSelect/index.js @@ -9,15 +9,60 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider } from "ecCom"; +import classNames from "classnames"; +import { Button, Select } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; +const Option = Select.Option; class Index extends Component { - render() { - return ( -
+ constructor(props) { + super(props); + this.state = { + loading: false, data: [], activeKey: "", dropdownWidth: 200 + }; + this.selectedData = {}; + } + componentDidMount() { + const { dropdownWidth } = this.state; + const w = $(this.refs.customSelectMui).outerWidth(); + if (dropdownWidth < w) { + this.setState({ dropdownWidth: w }); + } + } + + render() { + const { data, dropdownWidth } = this.state; + const clsname = classNames({ + "mr12": true, + "wea-associative-search-mult": true + }); + return ( +
+ +
+
); }