Skip to content

Commit

Permalink
Merge pull request #4742 from nwind/fix-input-password-icon-2
Browse files Browse the repository at this point in the history
fix: 修复 input-password 在 antd 下不显示问题
  • Loading branch information
lurunze1226 authored Jun 30, 2022
2 parents b2c1303 + 9240b15 commit 890b4ee
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/amis-ui/scss/_properties.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// 这里放 css 自定义变量
@import './themes/cxd-colors';

:root {
--black: #{$black};
Expand Down Expand Up @@ -736,6 +737,10 @@
--Form-input-onHover-bg: #{rgba($white, 0.6)};
--Form-input-onHover-borderColor: var(--Form-input-onFocused-borderColor);
--Form-input-paddingX: #{px2rem(8px)};

--Form-input-password-icon-size: #{px2rem(16px)};
--Form-input-password-icon-color: #{$G5};

--Form-inputNumber-paddingX: #{px2rem(12px)};
--Form-inputNumber-base-width: #{px2rem(24px)};
--Form-inputNumber-base-height: #{px2rem(32px)};
Expand Down
2 changes: 0 additions & 2 deletions packages/amis-ui/scss/themes/_cxd-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ $L1: 0px 4px 6px 0px rgba(8, 14, 26, 0.06),
--Form-input-clearBtn-color: #{$G7};
--Form-input-clearBtn-color-onHover: #{$G4};
--Form-input-clearBtn-color-onActive: #{$G3};
--Form-input-password-icon-size: #{px2rem(16px)};
--Form-input-password-icon-color: #{$G5};

--Form-select-borderWidth: #{px2rem(1px)};
--Form-select-borderRadius: #{$R3};
Expand Down
34 changes: 34 additions & 0 deletions scripts/var-not-in-common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* 用于查找某个变量在 cxd-variables 里但不在 properties.scss 里的情况
*/

const fs = require('fs');
const path = require('path');

const cxdVariables = fs.readFileSync(
path.join(__dirname, '..', 'scss', 'themes', '_cxd-variables.scss'),
{encoding: 'utf8'}
);

const commonVariables = fs.readFileSync(
path.join(__dirname, '..', 'scss', '_properties.scss'),
{encoding: 'utf8'}
);

const cxdVariableSet = new Set();

cxdVariables.match(/\-\-[\-a-zA-Z0-9]+/g).forEach(function (variable) {
cxdVariableSet.add(variable);
});

const commonVariableSet = new Set();

commonVariables.match(/\-\-[\-a-zA-Z0-9]+/g).forEach(function (variable) {
commonVariableSet.add(variable);
});

for (const variable of cxdVariableSet) {
if (!commonVariableSet.has(variable)) {
console.log(variable);
}
}

0 comments on commit 890b4ee

Please sign in to comment.