Comments (5)
sorry, it works for me
from gohttpserver.
I figure out, the search icon, is broken. not sure why?
If I type 'xxx' at search box top right corner, then click enter, the search works fine.
But if I click the search icon with magnify glass icon, nothing happen.
So need to fix the search icon, attach it to search event.
from gohttpserver.
Ok, spend 6 hours , finally fix this problem.
This is vue version 1, not 2, so you need to be aware.
The search icon isn't working, you have to do below steps to make click search icon works:
index.js
add function under method:{}
` methods: {
// ------------ search icon clicked event ----------------
search_clicked: function (event) {
// `this` inside methods points to the Vue instance
// alert('Hello ' + this.search + '!')
var searchParams = new URLSearchParams(window.location.search)
searchParams.set("search", this.search);
// this cause reload https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter
//window.location.search = searchParams.toString();
// to avoid reload
// var newRelativePathQuery = window.location.pathname + '?' + searchParams.toString();
//history.pushState(null, '', newRelativePathQuery);
// here I do want reload, so must use this.
window.location.search = searchParams.toString();
// no need this, because last line already cause reload.
// location.reload();
// `event` is the native DOM event
if (event) {
// alert(event.target.tagName)
}
},`
index.html page, replace search input and icon with this
` <!--
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
<input type="text" name="search" class="form-control" placeholder="Search" v-bind:value="search"
autofocus>
-->
<span class="input-group-btn">
<button class="btn btn-default" type="button" v-on:click="search_clicked">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
<input type="text" name="search" class="form-control" placeholder="Search" v-model="search"
autofocus>
`
from gohttpserver.
without fix the search icon, you have to click enter key to be able to search.
if you only click search icon, nothing happen.
if you want to make search icon works as well, you have to make 2 change as above I showed you.
from gohttpserver.
Sorry for the delay.
from gohttpserver.
Related Issues (20)
- 添加用户校验,安卓手机无法下载 HOT 4
- 树莓派3B下编译失败
- 怎么配置可以禁止访问目录而可以访问目录下的文件? HOT 1
- 不能按名称、大小排序
- 建议提供下Prometheus的exporter 支持
- gohttpserver有做性能测试吗,高并发场景能用吗 HOT 1
- docker arm 芯片不兼容
- 此处文件大小统计时,如果同目录下的两个文件夹有相同前缀,会导致统计重复
- dockerhub image outdated
- 怎样设置可以让访问gohttpserver页面的时候需要登录,而访问资源url的时候不需要添加账号密码
- 上传大文件发生内存泄漏 HOT 1
- [Feature request] Graceful stop & log export HOT 1
- openid对接问题
- 可以取消下载功能吗 HOT 1
- 访问带token限制的目录
- 可否增加https 证书自定义? HOT 1
- Suggest a little bit code modification to support latest version of package androidbinary and remove changepath of fafa-home due to it seems not working for my firefox browser.
- docker修改了一下配置文件,里面的文件都找不到了 HOT 1
- 内存泄露
- Supports Pages?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gohttpserver.