Skip to content

Commit

Permalink
更新版本管理样式
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Dec 14, 2021
1 parent d230458 commit fa0f213
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/app/DatabaseVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ class DatabaseVersionContext extends React.Component {
<span>版本号:</span>
<Input
disabled={versionReadonly}
style={{ width: '500px' }}
allowClear={false}
style={{ width: '300px' ,textAlign:'left'}}
defaultValue={'V1.0.0' || this.getNewVersion()}
placeholder='例如:v1.0.0【请勿低于系统默认的数据库版本v0.0.0】'
onChange={e => this.onChange(e, 'version')} />
Expand All @@ -296,7 +297,7 @@ class DatabaseVersionContext extends React.Component {
defaultValue={defaultMessage}
wrapperStyle={{ width: '100%' }}
style={{ width: '100%' }}
placeholder='例如:初始化当前项目版本'
placeholder='例如:初始化版本'
onChange={e => this.onChange(e, 'message')} />
</div>
</div>);
Expand Down Expand Up @@ -451,6 +452,7 @@ export default class DatabaseVersion extends React.Component {
histroy.writeH(data)
};
_getVersionMessage = () => {
const projectId=this.props.dataSource.id;
getDirListPromise(this.basePathDir).then((res) => {
// 从每个版本的文件中获取版本信息
const versions = res.filter(r => r.endsWith('.pdman.json'));
Expand Down
8 changes: 6 additions & 2 deletions src/components/input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,19 @@ export default class Input extends React.Component {
otherProps.value = this.fixControlledValue(otherProps.value);
delete otherProps.defaultValue;
}
const { prefix = 'pdman', style, defaultValue, wrapperStyle, value, autoFocus, suffix, placeholder, disabled } = otherProps;
let { prefix = 'pdman', style, defaultValue, wrapperStyle, value, autoFocus, suffix, placeholder, disabled,allowClear } = otherProps;
if(allowClear==null){
allowClear=true;
}

const renValue =this.state.value
return (<div className={`${prefix}-input-wrapper`} style={wrapperStyle}>
<AInput
onKeyDown={e => this._onKeyDown(e)}
placeholder={placeholder}
ref={instance => this.instance = instance}
autoFocus={autoFocus}
draggable allowClear
draggable allowClear={allowClear}
onDragStart={this._onDragStart}
onBlur={this._onBlur}
className={`${prefix}-input`}
Expand Down
5 changes: 5 additions & 0 deletions src/components/textarea/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@
display: block;
text-align: center;
}
}

*::placeholder {
/* modern browser */
color: #8b8b8b;
}

0 comments on commit fa0f213

Please sign in to comment.