35afadb5 by 焦小希

全局搜素框增加自动聚焦功能

1 parent 82f3f4c1
......@@ -61,6 +61,13 @@ var self = new Vue({
isActive:1,
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
handleSizeChange(){
......
......@@ -113,7 +113,7 @@
<div style="float: right" class="div-search">
<!-- <el-input style="width:300px;margin-right: 20px" placeholder="请输入搜索的内容"></el-input>-->
<!-- <el-button type ="primary" size="mini" icon="el-icon-search">查询</el-button>-->
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</div>
......
......@@ -32,6 +32,13 @@ var self = new Vue({
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods: {
getData() {
axios.post(CONF_NEWGHSC_SERVERURL + '/dblb/list/workings', null,{
......
......@@ -115,7 +115,7 @@
<div style="float: right" class="div-search" >
<!-- <el-input style="width:300px;margin-right: 20px" placeholder="请输入搜索的内容"></el-input>-->
<!-- <el-button type ="primary" size="mini" icon="el-icon-search">查询</el-button>-->
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</div>
......
......@@ -61,6 +61,13 @@ var self = new Vue({
isActive:1,
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
handleSizeChange(){
......
......@@ -113,7 +113,7 @@
<div style="float: right" class="div-search">
<!-- <el-input style="width:300px;margin-right: 20px" placeholder="请输入搜索的内容"></el-input>-->
<!-- <el-button type ="primary" size="mini" icon="el-icon-search">查询</el-button>-->
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</div>
......
......@@ -83,6 +83,13 @@ var self = new Vue({
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
getData() {
axios.get(CONF_NEWGHSC_SERVERURL + '/dblb/list/worked', {
......
......@@ -119,7 +119,7 @@
<div style="float: right" class="div-search">
<!-- <el-input style="width:300px;margin-right: 20px" placeholder="请输入搜索的内容"></el-input>-->
<!-- <el-button type ="primary" size="mini" icon="el-icon-search">查询</el-button>-->
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</div>
......
......@@ -36,6 +36,13 @@ var self = new Vue({
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
handleSizeChange(){
......
......@@ -115,7 +115,7 @@
</el-col>
<el-col :span="6">
<div class="div-search">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</el-col>
......
......@@ -33,6 +33,13 @@ var self = new Vue({
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
}
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
getData() {
axios.get(CONF_NEWGHSC_SERVERURL + '/dblb/list/worked', {
......
......@@ -115,7 +115,7 @@
</el-col>
<el-col :span="6">
<div class="div-search">
<input id="searchInput" type="text" placeholder="搜索已办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索已办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</el-col>
......
......@@ -41,6 +41,13 @@ var self = new Vue({
mounted(){
this.getData();
},
directives:{
focus: {
inserted:function f(el) {
el.focus()
}
}
},
methods:{
getData() {
axios.get(CONF_NEWGHSC_SERVERURL + '/ghjg/backlog/'+this.pageNum+'/'+this.pageSize, {
......
......@@ -116,7 +116,7 @@
</el-col>
<el-col :span="6">
<div class="div-search">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo">
<input id="searchInput" type="text" placeholder="搜索待办项目" style="width: 82%;" v-model="search" @keyup.enter="SearchInfo" v-focus>
<img id="searchBtn" src="../../../../image/projecttask/search.png" style="margin-right: 10px; margin-top: 4px; width: 20px; height: 20px; float: right;">
</div>
</el-col>
......