mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
禁止自动填充密码。
This commit is contained in:
parent
9e42b280d9
commit
59e8fc5fde
15
.eslintrc
15
.eslintrc
@ -1,6 +1,9 @@
|
||||
{
|
||||
/* See all the pre-defined configs here: https://www.npmjs.com/package/eslint-config-defaults */
|
||||
"extends": "defaults/configurations/eslint",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
@ -17,7 +20,6 @@
|
||||
"worker": true
|
||||
},
|
||||
"rules": {
|
||||
|
||||
"eqeqeq": 2,
|
||||
"comma-dangle": 1,
|
||||
"no-console": 0,
|
||||
@ -31,11 +33,12 @@
|
||||
"semi-spacing": 1,
|
||||
"valid-jsdoc": [
|
||||
2,
|
||||
{ "requireReturn": false }
|
||||
{
|
||||
"requireReturn": false
|
||||
}
|
||||
],
|
||||
|
||||
"react/display-name": 2,
|
||||
"react/forbid-prop-types": 1,
|
||||
"react/forbid-prop-types": 0,
|
||||
"react/jsx-boolean-value": 1,
|
||||
"react/jsx-closing-bracket-location": 1,
|
||||
"react/jsx-curly-spacing": 1,
|
||||
@ -55,7 +58,7 @@
|
||||
"react/no-multi-comp": 1,
|
||||
"react/no-set-state": 0,
|
||||
"react/no-unknown-property": 1,
|
||||
"react/prop-types":0,
|
||||
"react/prop-types": 0,
|
||||
"react/react-in-jsx-scope": 0,
|
||||
"react/require-extension": 0,
|
||||
"react/self-closing-comp": 1,
|
||||
|
||||
@ -839,5 +839,6 @@
|
||||
"Delete User": "删除用户",
|
||||
"RoleID is not defined.": "RoleID未定义。",
|
||||
"Authorities is not defined.": "Authorities未定义。",
|
||||
"Role": "角色"
|
||||
"Role": "角色",
|
||||
"Initialization": "初始化"
|
||||
}
|
||||
@ -11,6 +11,7 @@ class SystemMenu extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.handleInitialization = this.handleInitialization.bind(this);
|
||||
this.handleUser = this.handleUser.bind(this);
|
||||
this.handleRole = this.handleRole.bind(this);
|
||||
this.handleAuthority = this.handleAuthority.bind(this);
|
||||
@ -18,13 +19,19 @@ class SystemMenu extends React.Component {
|
||||
|
||||
render() {
|
||||
return <MenuItem title={_t('System')}>
|
||||
<MenuItem title={_t('User Management')} onClick={this.handleUser}></MenuItem>
|
||||
<MenuItem title={_t('Role Management')} onClick={this.handleRole}></MenuItem>
|
||||
<MenuItemSeparator></MenuItemSeparator>
|
||||
<MenuItem title={_t('Authority Management')} onClick={this.handleAuthority}></MenuItem>
|
||||
<MenuItem title={_t('Initialization')} onClick={this.handleInitialization} />
|
||||
<MenuItemSeparator />
|
||||
<MenuItem title={_t('User Management')} onClick={this.handleUser} />
|
||||
<MenuItem title={_t('Role Management')} onClick={this.handleRole} />
|
||||
<MenuItemSeparator />
|
||||
<MenuItem title={_t('Authority Management')} onClick={this.handleAuthority} />
|
||||
</MenuItem>;
|
||||
}
|
||||
|
||||
handleInitialization() {
|
||||
debugger;
|
||||
}
|
||||
|
||||
handleUser() {
|
||||
const win = app.createElement(UserManageWindow);
|
||||
app.addElement(win);
|
||||
|
||||
@ -21,7 +21,7 @@ class LoginWindow extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { username, password } = this.state;
|
||||
const { username, password, passwordType } = this.state;
|
||||
|
||||
return <Window
|
||||
className={'Login'}
|
||||
|
||||
@ -10,6 +10,7 @@ class Input extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.handleFocus = this.handleFocus.bind(this, props.onFocus);
|
||||
this.handleChange = this.handleChange.bind(this, props.onChange);
|
||||
this.handleInput = this.handleInput.bind(this, props.onInput);
|
||||
}
|
||||
@ -28,9 +29,15 @@ class Input extends React.Component {
|
||||
max={max}
|
||||
step={step}
|
||||
disabled={disabled}
|
||||
autoComplete={'off'}
|
||||
autoComplete={'new-password'}
|
||||
onFocus={this.handleFocus}
|
||||
onChange={this.handleChange}
|
||||
onInput={this.handleInput} />;
|
||||
onInput={this.handleInput}
|
||||
/>;
|
||||
}
|
||||
|
||||
handleFocus(onFocus, event) {
|
||||
onFocus && onFocus(event);
|
||||
}
|
||||
|
||||
handleChange(onChange, event) {
|
||||
@ -79,8 +86,9 @@ Input.propTypes = {
|
||||
precision: PropTypes.number,
|
||||
disabled: PropTypes.bool,
|
||||
show: PropTypes.bool,
|
||||
onFocus: PropTypes.func,
|
||||
onChange: PropTypes.func,
|
||||
onInput: PropTypes.func,
|
||||
onInput: PropTypes.func
|
||||
};
|
||||
|
||||
Input.defaultProps = {
|
||||
@ -95,8 +103,9 @@ Input.defaultProps = {
|
||||
precision: 3,
|
||||
disabled: false,
|
||||
show: true,
|
||||
onFocus: null,
|
||||
onChange: null,
|
||||
onInput: null,
|
||||
onInput: null
|
||||
};
|
||||
|
||||
export default Input;
|
||||
Loading…
x
Reference in New Issue
Block a user