autocomplete

Vue中使用高德地图POI搜索

坚强是说给别人听的谎言 提交于 2020-08-10 16:36:42
创建 loadMap.js /** * 动态加载高德地图 * * @export * @param {*} key 高德地图key * @param {*} plugins 高德地图插件 * @param {string} [v='1.4.14'] 高德地图版本 * @returns */ export default function loadMap(key, plugins, v = '1.4.14') { return new Promise(function(resolve, reject) { if (typeof AMap !== 'undefined') { // eslint-disable-next-line no-undef resolve(AMap) return true } window.onCallback = function() { // eslint-disable-next-line no-undef resolve(AMap) } let script = document.createElement('script') script.type = 'text/javascript' script.src = `https://webapi.amap.com/maps?v=${v}&key=${key}&plugin=${plugins}

使用 nuget server 的 API 来实现搜索安装 nuget 包

淺唱寂寞╮ 提交于 2020-08-10 07:20:06
使用 nuget server 的 API 来实现搜索安装 nuget 包 Intro nuget 现在几乎是 dotnet 开发不可缺少的一部分了,还没有用过 nuget 的就有点落后时代了,还不快用起来 nuget 是 dotnet 里的包管理机制,类似于前端的 npm ,php 的 composer,java 里的 maven ... nuget 定义了一套关于 nuget server 的规范,使得用户可以自己实现一个 nuget server 也正是这些规范,使得我们可以根据这些规范来实现 nuget server 的包管理的功能,今天主要介绍一下,根据 nuget server 的 api 规范使用原始的 HTTP 请求来实现 nuget 包的搜索和使用 nuget 提供的客户端 SDK 来实现 nuget 包的搜索和下载 Nuget Server Api Nuget 协议介绍 nuget 的协议有好几个版本,目前主要用的是 v3,开源的 nuget server Baget 也实现了基于 nuget protocal v3 的规范 我们添加 nuget 源的时候会指定一个 source url,类似 https://api.nuget.org/v3/index.json 这样的,着通常被称为 Service Index,是一个 nuget 源的入口,有点类似于

vue中使用vue-amap(高德地图)

时光怂恿深爱的人放手 提交于 2020-08-10 04:51:36
因为项目要求调用高德地图,就按照官方文档按部就班的捣鼓,这一路上出了不少问题。 前言: vue-cli,node环境什么的自己安装设置推荐一个博客:https://blog.csdn.net/wulala_hei/article/details/80488674 1,找一个磁盘,在里面git bash here 然后vue init webpack XXX(文件夹名字) 你 第一步:在test里面安装install 指令:1.npm install 2.npm install vue-amap --save 注意:我在安装的时候总是出现了说找不到webpack的问题, 即:使用 npm run dev 时报错: Error: Cannot find module 'webpack-cli/bin/config-yargs' 可是我用webpack-v找到了版本号,我就删了又装了两三次,还是不行,最后我在安装的过程中没有让其修复,语句不记得了,就是安装过程中出现警告让你输入修复的,然后就成功了。 第二步:在main.js中加入 解释一下,key就是你申请的key,一串数字和字母 plugin是你在地图上用的组件 例: "AMap.Autocomplete", //输入提示插件 "AMap.PlaceSearch", //POI搜索插件 "AMap.Scale", //右下角缩略图插件

迅睿CMS 登录/注册功能在其他页面调用

余生长醉 提交于 2020-08-09 21:11:27
使用环境:在首页或其他页面进行注册或登录功能 一、登录功能 <form class="content" id="loginform" method="post" novalidate="novalidate"> {dr_form_hidden()} <div class="form-group"> <div class="input-icon"> <i class="fa fa-user"></i> <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="账号/邮箱/手机" name="data[username]"> </div> </div> <div class="form-group"> <div class="input-icon"> <i class="fa fa-lock"></i> <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="登录密码" name="data[password]"> </div> </div> {if $ci->member_cache['login']['code']} <div

如何防止按钮提交表单

百般思念 提交于 2020-08-05 19:00:08
问题: In the following page, with Firefox the remove button submits the form, but the add button doesn't. 在下一页中,使用Firefox,“删除”按钮提交表单,但“添加”按钮不提交。 How do I prevent the remove button from submitting the form? 如何防止“删除”按钮提交表单? <html> <head> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> function addItem() { var v = $('form :hidden:last').attr('name'); var n = /(.*)input/.exec(v); var newPrefix; if ( n[1].length == 0 ) { newPrefix = '1'; } else { newPrefix = parseInt(n[1])+1; } var oldElem = $('form tr:last'); var newElem = oldElem.clone(true); var

SpaceVim插件

删除回忆录丶 提交于 2020-08-05 18:15:59
# All SpaceVim option below [option] section [options] # set spacevim theme. by default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer colorscheme = "gruvbox" colorscheme_bg = "dark" # Disable guicolors in basic mode, many terminal do not support 24bit # true colors enable_guicolors = true # Disable statusline separator, if you want to use other value, please # install nerd fonts statusline_separator = "arrow" statusline_inactive_separator = "arrow" buffer_index_type = 4 enable_tabline_filetype_icon = true enable_statusline_mode =

删除Chrome自动完成功能的输入背景色?

坚强是说给别人听的谎言 提交于 2020-08-05 07:21:56
问题: On a form I'm working on, Chrome is auto-filling the email and password fields. 在我正在处理的表单上,Chrome浏览器会自动填写电子邮件和密码字段。 This is fine, however, Chrome changes the background colour to a pale yellow colour. 很好,但是Chrome将背景颜色更改为浅黄色。 The design I'm working on is using light text on a dark background, so this really messes up the look of the form - I have stark yellow boxes and near-invisible white text. 我正在研究的设计是在深色背景上使用浅色文本,因此这确实弄乱了表单的外观-我有明显的黄色框和几乎看不见的白色文本。 Once the field is focused, the fields return to normal. 聚焦后,场将恢复正常。 Is it possible to stop Chrome changing the colour of these fields?

VSCode add parentheses when automcompleting functions

↘锁芯ラ 提交于 2020-08-02 06:27:38
问题 Is is possible to tweak VSCode so that when function gets autocompleted it is written with () instead of just plain function name? For example when I type str and autocomplete to strlen I would like to get strlen() , it saves quite some time. 回答1: It can be solved by ticking javascript.suggest.completeFunctionCalls property up. Run code snippet to see the gif. <div style='position:relative; padding-bottom:calc(40.34% + 44px)'><iframe src='https://gfycat.com/ifr/CleverActualHornbill'

VSCode add parentheses when automcompleting functions

十年热恋 提交于 2020-08-02 06:27:10
问题 Is is possible to tweak VSCode so that when function gets autocompleted it is written with () instead of just plain function name? For example when I type str and autocomplete to strlen I would like to get strlen() , it saves quite some time. 回答1: It can be solved by ticking javascript.suggest.completeFunctionCalls property up. Run code snippet to see the gif. <div style='position:relative; padding-bottom:calc(40.34% + 44px)'><iframe src='https://gfycat.com/ifr/CleverActualHornbill'

Vue异步加载高德地图API

依然范特西╮ 提交于 2020-07-28 07:31:35
项目中用到了高德地图的API以及UI组件库,因为是直接把引入script写在index.html中,项目打包后运行在服务器,用浏览器访问加载第一次时会非常慢,主要原因是加载高德地图相关的js(近一分钟),用户体验非常不好。 于是在网上找了些资料,改成异步加载的方式。以下是实现方案: 1.首先定义一个asyncLoadJs.js(这里用到了AMap和AMapUI): // 异步加载高德地图API export function loadMP() { const mp = new Promise( function (resolve, reject) { let hasLoaded1 = document.getElementById("amap" ); if (hasLoaded1) { // 只加载一次 return } window.init = function () { resolve(AMap) }; let script = document.createElement("script" ); script.type = "text/javascript" ; script.src = "//webapi.amap.com/maps?v=1.4.6&key=[申请的key]&plugin=AMap.Driving,AMap.Geocoder,AMap.ToolBar