chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -138,13 +138,13 @@ export const ColorPicker: FC<IProps> = props => {
|
||||
})}
|
||||
</div>
|
||||
<Input
|
||||
// 因为是不受控模式,当点击色块时,需要重置 input.value。所以这里以 color 为 key
|
||||
// Because it is in uncontrolled mode, when clicking on the color block, you need to reset the input.value. So here color is the key
|
||||
key={`input-${color}`}
|
||||
disabled={readonly}
|
||||
prefix={<ColorRect color={color as string} size={16} />}
|
||||
type="text"
|
||||
className="w-[110px]"
|
||||
// 为什么不使用受控模式?使用受控模式,用户输入过程中触发的格式校验处理起来比较麻烦
|
||||
// Why not use controlled mode? With controlled mode, format checking triggered during user input is cumbersome to handle
|
||||
defaultValue={color}
|
||||
onChange={v => {
|
||||
if (isHexColor(v)) {
|
||||
|
||||
@@ -64,8 +64,8 @@ export const FontSize: FC<IProps> = props => {
|
||||
<IconCozFontSize className="text-[16px] coz-fg-secondary m-[8px]" />
|
||||
}
|
||||
/**
|
||||
* 因为开启了 allowCreate,所以 optionList 不会再响应动态变化
|
||||
* 这里给个 key ,重新渲染 select,保证 optionList 符合预期
|
||||
* Since allowCreate is enabled, the optionList will no longer respond to dynamic changes
|
||||
* Give a key here, re-render select, and ensure that the optionList meets expectations
|
||||
*/
|
||||
key={_optionsList.map(d => d.label).join()}
|
||||
value={value}
|
||||
|
||||
@@ -30,8 +30,8 @@ export const InputNumber = forwardRef<InputNumberProps, InputNumberProps>(
|
||||
min={min}
|
||||
max={max}
|
||||
value={value}
|
||||
// InputNumber 长按 + - 时,会一直触发变化。这里有 bug,有时定时器清不掉,会鬼畜(一直增加/减小)。
|
||||
// 把 pressInterval 设置成 24h ,变相禁用长按增减
|
||||
// InputNumber When long pressing + -, it will keep triggering changes. There are bugs here, and sometimes the timer can't be cleared, and it will be ghost (keep increasing/decreasing).
|
||||
// Set pressInterval to 24h, and disable long press increase or decrease in disguise
|
||||
pressInterval={1000 * 60 * 60 * 24}
|
||||
onNumberChange={v => {
|
||||
if (Number.isFinite(v)) {
|
||||
|
||||
@@ -71,8 +71,8 @@ export const LineHeight: FC<IProps> = props => {
|
||||
}
|
||||
{...rest}
|
||||
/**
|
||||
* 因为开启了 allowCreate,所以 optionList 不会再响应动态变化
|
||||
* 这里给个 key ,重新渲染 select,保证 optionList 符合预期
|
||||
* Since allowCreate is enabled, the optionList will no longer respond to dynamic changes
|
||||
* Give a key here, re-render select, and ensure that the optionList meets expectations
|
||||
*/
|
||||
key={_optionsList.map(d => d.label).join()}
|
||||
filter
|
||||
|
||||
Reference in New Issue
Block a user