Skip to content

Commit

Permalink
修改密码输入框
Browse files Browse the repository at this point in the history
  • Loading branch information
ty4z2008 committed Nov 2, 2018
1 parent 1b188e9 commit ce43942
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion iysql/app/public/include/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: Jeffery
* @Date: 2018-10-24 12:07:46
* @Last Modified by: Jeffery
* @Last Modified time: 2018-10-24 17:22:39
* @Last Modified time: 2018-11-02 10:45:25
*/
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, textarea, select, optgroup, option, fieldset, legend, p, blockquote, th, td {
font-family: Arial, "Helvetica Neue", sans-serif, 宋体;
Expand Down Expand Up @@ -77,6 +77,9 @@ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, text
.configs .el-select {
width: 100%;
}
.configs .el-icon-view{
cursor: pointer;
}

/*result*/
.logs {
Expand Down
10 changes: 9 additions & 1 deletion iysql/app/public/include/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var vm = new Vue({
querystring: 'SELECT * FROM tables WHERE id=1',
is_connect: false, //是否已经连接DB
is_remember: storage.get('configs') === null ? false : true, //是否记住连接信息
password_mode: 'password', //密码输入框模式
configs: {
host: "127.0.0.1",
port: 3306,
Expand Down Expand Up @@ -76,6 +77,13 @@ var vm = new Vue({
self.checked_plugin = res['types'];
});
},
/**
* 切换密码输入框模式
* @return {[type]} [description]
*/
togglePasswordMode() {
this.password_mode = this.password_mode == 'password' ? 'text' : 'password';
},
/**
* 选择所有插件
* @return {[type]} [description]
Expand Down Expand Up @@ -200,7 +208,7 @@ var vm = new Vue({
return true;
};
this.configs = configs;

},
initApp() {
this.initSocket();
Expand Down
3 changes: 2 additions & 1 deletion iysql/app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
</div>
<div class="input-wrapper">
<label class="label">密码:</label>
<el-input placeholder="密码" v-model="configs['password']" clearable>
<el-input placeholder="密码" v-model="configs['password']" :type="password_mode">
<i slot="suffix" class="el-input__icon el-icon-view" @click="togglePasswordMode"></i>
</el-input>
</div>
<div class="input-wrapper">
Expand Down

0 comments on commit ce43942

Please sign in to comment.