Просмотр исходного кода

🎨 style: remove all prefix icons to simplify the layout of the sidesheet component

t0ng7u 8 месяцев назад
Родитель
Сommit
1a0aac81df

+ 0 - 3
web/src/pages/Redemption/EditRedemption.js

@@ -28,7 +28,6 @@ import {
   IconCreditCard,
   IconSave,
   IconClose,
-  IconPlusCircle,
   IconGift,
 } from '@douyinfe/semi-icons';
 
@@ -261,7 +260,6 @@ const EditRedemption = (props) => {
                     autoComplete="new-password"
                     type="number"
                     className="w-full !rounded-lg"
-                    prefix={<IconCreditCard />}
                     data={[
                       { value: 500000, label: '1$' },
                       { value: 5000000, label: '10$' },
@@ -283,7 +281,6 @@ const EditRedemption = (props) => {
                       autoComplete="new-password"
                       type="number"
                       className="!rounded-lg"
-                      prefix={<IconPlusCircle />}
                     />
                   </div>
                 )}

+ 0 - 12
web/src/pages/Token/EditToken.js

@@ -27,11 +27,8 @@ import {
   Avatar,
 } from '@douyinfe/semi-ui';
 import {
-  IconClock,
-  IconCalendar,
   IconCreditCard,
   IconLink,
-  IconServer,
   IconUserGroup,
   IconSave,
   IconClose,
@@ -375,7 +372,6 @@ const EditToken = (props) => {
                     autoComplete='new-password'
                     type='dateTime'
                     className='w-full !rounded-lg'
-                    prefix={<IconCalendar />}
                   />
                 </div>
 
@@ -393,7 +389,6 @@ const EditToken = (props) => {
                     type='tertiary'
                     onClick={() => setExpiredTime(0, 0, 1, 0)}
                     className='!rounded-full'
-                    icon={<IconClock />}
                   >
                     {t('一小时')}
                   </Button>
@@ -402,7 +397,6 @@ const EditToken = (props) => {
                     type='tertiary'
                     onClick={() => setExpiredTime(0, 1, 0, 0)}
                     className='!rounded-full'
-                    icon={<IconCalendar />}
                   >
                     {t('一天')}
                   </Button>
@@ -411,7 +405,6 @@ const EditToken = (props) => {
                     type='tertiary'
                     onClick={() => setExpiredTime(1, 0, 0, 0)}
                     className='!rounded-full'
-                    icon={<IconCalendar />}
                   >
                     {t('一个月')}
                   </Button>
@@ -455,7 +448,6 @@ const EditToken = (props) => {
                   autoComplete='new-password'
                   type='number'
                   className='w-full !rounded-lg'
-                  prefix={<IconCreditCard />}
                   data={[
                     { value: 500000, label: '1$' },
                     { value: 5000000, label: '10$' },
@@ -481,7 +473,6 @@ const EditToken = (props) => {
                     autoComplete='off'
                     type='number'
                     className='w-full !rounded-lg'
-                    prefix={<IconPlusCircle />}
                     data={[
                       { value: 10, label: t('10个') },
                       { value: 20, label: t('20个') },
@@ -560,7 +551,6 @@ const EditToken = (props) => {
                   value={inputs.model_limits}
                   multiple
                   className='w-full !rounded-lg'
-                  prefix={<IconServer />}
                   optionList={models}
                   disabled={!model_limits_enabled}
                   maxTagCount={3}
@@ -595,7 +585,6 @@ const EditToken = (props) => {
                   renderOptionItem={renderGroupOption}
                   value={inputs.group}
                   className='w-full !rounded-lg'
-                  prefix={<IconUserGroup />}
                   optionList={groups}
                 />
               ) : (
@@ -603,7 +592,6 @@ const EditToken = (props) => {
                   placeholder={t('管理员未设置用户可选分组')}
                   disabled={true}
                   className='w-full !rounded-lg'
-                  prefix={<IconUserGroup />}
                 />
               )}
             </div>

+ 0 - 7
web/src/pages/User/AddUser.js

@@ -12,12 +12,9 @@ import {
   Avatar
 } from '@douyinfe/semi-ui';
 import {
-  IconUser,
   IconSave,
   IconClose,
-  IconKey,
   IconUserAdd,
-  IconEdit,
 } from '@douyinfe/semi-icons';
 import { useTranslation } from 'react-i18next';
 
@@ -131,7 +128,6 @@ const AddUser = (props) => {
                     value={username}
                     autoComplete="off"
                     className="!rounded-lg"
-                    prefix={<IconUser />}
                     showClear
                     required
                   />
@@ -145,7 +141,6 @@ const AddUser = (props) => {
                     value={display_name}
                     autoComplete="off"
                     className="!rounded-lg"
-                    prefix={<IconUser />}
                     showClear
                   />
                 </div>
@@ -159,7 +154,6 @@ const AddUser = (props) => {
                     value={password}
                     autoComplete="off"
                     className="!rounded-lg"
-                    prefix={<IconKey />}
                     required
                   />
                 </div>
@@ -172,7 +166,6 @@ const AddUser = (props) => {
                     value={remark}
                     autoComplete="off"
                     className="!rounded-lg"
-                    prefix={<IconEdit />}
                     showClear
                   />
                 </div>

+ 0 - 8
web/src/pages/User/EditUser.js

@@ -18,12 +18,9 @@ import {
   IconUser,
   IconSave,
   IconClose,
-  IconKey,
-  IconCreditCard,
   IconLink,
   IconUserGroup,
   IconPlus,
-  IconEdit,
 } from '@douyinfe/semi-icons';
 import { useTranslation } from 'react-i18next';
 
@@ -222,7 +219,6 @@ const EditUser = (props) => {
                     value={password}
                     autoComplete="new-password"
                     className="!rounded-lg"
-                    prefix={<IconKey />}
                   />
                 </div>
 
@@ -246,7 +242,6 @@ const EditUser = (props) => {
                     value={remark}
                     autoComplete="off"
                     className="!rounded-lg"
-                    prefix={<IconEdit />}
                     showClear
                   />
                 </div>
@@ -281,7 +276,6 @@ const EditUser = (props) => {
                       autoComplete="new-password"
                       optionList={groupOptions}
                       className="w-full !rounded-lg"
-                      prefix={<IconUserGroup />}
                     />
                   </div>
 
@@ -298,7 +292,6 @@ const EditUser = (props) => {
                         type="number"
                         autoComplete="new-password"
                         className="flex-1 !rounded-lg"
-                        prefix={<IconCreditCard />}
                       />
                       <Button
                         onClick={openAddQuotaModal}
@@ -425,7 +418,6 @@ const EditUser = (props) => {
           type="number"
           autoComplete="new-password"
           className="!rounded-lg"
-          prefix={<IconCreditCard />}
         />
       </Modal>
     </>