javascript mui的select使用

 <FormControl fullWidth>
              <InputLabel>相位类型</InputLabel>
              <Select
                defaultValue={formik.values.currentphaseParameter['phaseType']}
                size="small"
                name={setField('phaseType')}
                label="相位类型"
                onChange={formik.handleChange}
                onBlur={formik.handleBlur}
              >
                {Object.keys(PhaseType).map((t) => (
                  <MenuItem key={t} value={t}>
                    {PhaseType[t as keyof typeof PhaseType]}
                  </MenuItem>
                ))}
              </Select>
            </FormControl>

 

posted @ 2022-07-29 10:40  古德拉克  阅读(450)  评论(0编辑  收藏  举报