mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix(amis-theme-editor-helper): 字体、边框、内外边距等外观配置增加默认placeholder
This commit is contained in:
parent
b8e486f906
commit
556a3b107b
@ -270,16 +270,18 @@ function BoxBorder(props: BorderProps & FormControlProps) {
|
|||||||
}-border-width`}
|
}-border-width`}
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.[getKey('width')]}
|
placeholder={editorDefaultValue?.[getKey('width')] || '边框粗细'}
|
||||||
/>
|
/>
|
||||||
<div className="Theme-Border-settings-style-color">
|
<div className="Theme-Border-settings-style-color">
|
||||||
<Select
|
<Select
|
||||||
options={borderStyleOptions}
|
options={borderStyleOptions}
|
||||||
value={borderData[getKey('style')]}
|
value={borderData[getKey('style')]}
|
||||||
placeholder={getLabel(
|
placeholder={
|
||||||
editorDefaultValue?.[getKey('style')],
|
getLabel(
|
||||||
borderStyleOptions
|
editorDefaultValue?.[getKey('style')],
|
||||||
)}
|
borderStyleOptions
|
||||||
|
) || '边框样式'
|
||||||
|
}
|
||||||
onChange={(item: any) => changeItem('style')(item.value)}
|
onChange={(item: any) => changeItem('style')(item.value)}
|
||||||
clearable={!!editorDefaultValue}
|
clearable={!!editorDefaultValue}
|
||||||
renderMenu={(item: Options) => {
|
renderMenu={(item: Options) => {
|
||||||
@ -322,7 +324,7 @@ function BoxBorder(props: BorderProps & FormControlProps) {
|
|||||||
itemName={`${
|
itemName={`${
|
||||||
borderType === 'all' ? 'top' : borderType
|
borderType === 'all' ? 'top' : borderType
|
||||||
}-border-color`}
|
}-border-color`}
|
||||||
placeholder={editorDefaultValue?.[getKey('color')]}
|
placeholder={editorDefaultValue?.[getKey('color')] || '边框颜色'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1001,7 +1001,7 @@ function FontEditor(props: FontEditorProps) {
|
|||||||
}}
|
}}
|
||||||
itemName="color"
|
itemName="color"
|
||||||
state={state}
|
state={state}
|
||||||
placeholder={editorDefaultValue?.color}
|
placeholder={editorDefaultValue?.color || '字体颜色'}
|
||||||
editorInheritValue={editorInheritValue?.color}
|
editorInheritValue={editorInheritValue?.color}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -1019,7 +1019,7 @@ function FontEditor(props: FontEditorProps) {
|
|||||||
menuTpl="label"
|
menuTpl="label"
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.fontSize}
|
placeholder={editorDefaultValue?.fontSize || '字体大小'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -1038,7 +1038,7 @@ function FontEditor(props: FontEditorProps) {
|
|||||||
menuTpl="label"
|
menuTpl="label"
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.fontWeight}
|
placeholder={editorDefaultValue?.fontWeight || '字体字重'}
|
||||||
/>
|
/>
|
||||||
{(!hideLineHeight || !hideFontFamily) && (
|
{(!hideLineHeight || !hideFontFamily) && (
|
||||||
<div className="Theme-FontEditor-item-label">字重</div>
|
<div className="Theme-FontEditor-item-label">字重</div>
|
||||||
@ -1058,7 +1058,7 @@ function FontEditor(props: FontEditorProps) {
|
|||||||
menuTpl="label"
|
menuTpl="label"
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.lineHeight}
|
placeholder={editorDefaultValue?.lineHeight || '字体行高'}
|
||||||
/>
|
/>
|
||||||
<div className="Theme-FontEditor-item-label">行高</div>
|
<div className="Theme-FontEditor-item-label">行高</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -231,7 +231,7 @@ function PaddingAndMarginDialog(props: PaddingAndMarginProps) {
|
|||||||
itemName="margin-all"
|
itemName="margin-all"
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.margin}
|
placeholder={editorDefaultValue?.margin || '外边距'}
|
||||||
/>
|
/>
|
||||||
<div className="Theme-PaddingAndMargin-input-label">外边距</div>
|
<div className="Theme-PaddingAndMargin-input-label">外边距</div>
|
||||||
</div>
|
</div>
|
||||||
@ -250,7 +250,7 @@ function PaddingAndMarginDialog(props: PaddingAndMarginProps) {
|
|||||||
itemName="padding-all"
|
itemName="padding-all"
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.padding}
|
placeholder={editorDefaultValue?.padding || '内边距'}
|
||||||
/>
|
/>
|
||||||
<div className="Theme-PaddingAndMargin-input-label">内边距</div>
|
<div className="Theme-PaddingAndMargin-input-label">内边距</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -196,7 +196,7 @@ function BoxRadius(props: RadiusProps & RendererProps) {
|
|||||||
itemName={'all-border-radius'}
|
itemName={'all-border-radius'}
|
||||||
state={state}
|
state={state}
|
||||||
inheritValue={editorThemePath ? 'inherit' : ''}
|
inheritValue={editorThemePath ? 'inherit' : ''}
|
||||||
placeholder={editorDefaultValue?.[getKey('all')]}
|
placeholder={editorDefaultValue?.[getKey('all')] || '圆角'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user