mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
feat: style setter 国际化
This commit is contained in:
parent
6ae17cf5f1
commit
4619ee3d57
@ -1,7 +1,10 @@
|
||||
import './style.less';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import LowStyleSetter from '@ali/lc-style-setter';
|
||||
import './style.less';
|
||||
import { createIntl } from '../../../globals';
|
||||
|
||||
const { getLocale } = createIntl();
|
||||
|
||||
export default class StyleSetter extends Component{
|
||||
|
||||
@ -16,7 +19,7 @@ export default class StyleSetter extends Component{
|
||||
value: {},
|
||||
onChange: () => {},
|
||||
placeholder: '',
|
||||
locale: 'zh-CN'
|
||||
locale: getLocale() || 'en-US'
|
||||
};
|
||||
|
||||
onChange = (val: any) => {
|
||||
@ -25,11 +28,10 @@ export default class StyleSetter extends Component{
|
||||
}
|
||||
|
||||
render () {
|
||||
console.log(this.props);
|
||||
const { value } = this.props;
|
||||
return (
|
||||
<div className="lc-block-setter">
|
||||
<LowStyleSetter value={value} onChange={this.onChange} />
|
||||
<LowStyleSetter {...this.props} value={value} onChange={this.onChange} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user