position

vue+ele爬坑之路(三)—vue-amap

家住魔仙堡 提交于 2019-12-01 20:11:56
地图几乎是很多项目中不可或缺的一部分,这里介绍下在vue+element中vue-map的使用。 1、安装 npm install vue-amap --save 2、配置 全局配置,在 main.js 中配置,代码如下: import VueAMap from 'vue-amap'; Vue.use(VueAMap); //初始化 VueAMap.initAMapApiLoader({ key: 'your key', plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],//依赖配置,根据自己的需求引入 // 默认高德 sdk 版本为 1.4.4 v: '1.4.4' }); 3、使用 3-1、只显示地图及中心点定位 <template> <div class="content"> <div class="amap-wrapper"> <el-amap class="amap-box" :zoom="zoom" :center="center" :mapStyle="mapStyle"></el-amap> </div> <

使用vue-amap

烈酒焚心 提交于 2019-12-01 20:05:54
(图一) 页面预览 :当前位置(红色 图标处) (图二)页面预览: 文字设置 + 弹框设置 (图三) 搜索插件 + toolBar 插件 (图四) 时间轴插件 < template > < div class = "amap-page-container" > < ! -- 搜索框 -- > < el - amap - search - box class = "search-box" : search - option = "searchOption" : on - search - result = "onSearchResult" > < / el - amap - search - box > < el - amap ref = "map" vid = "amapDemo" : center = "center" : map - manager = "amapManager" : zoom = "zoom" : plugin = "plugin" : events = "events" class = "amap-demo" > < ! -- 在地图上标记点 -- > < el - amap - marker v - for = "(marker,index) in markers" : key = "index" : position = "marker" > < /

太极图

爱⌒轻易说出口 提交于 2019-12-01 19:44:57
<div class="taiji"></div> .taiji { width: 140px; height: 280px; border-radius: 100%; /* background-color: red; */ border: 2px solid black; border-left: 140px solid black; position: relative; } .taiji::before { content: ""; position: absolute; right: 50%; top: 0; width: 40px; height: 40px; border-radius: 100%; background: black; border: 50px solid #ffffff; } .taiji::after { content: ""; position: absolute; right: 50%; bottom: 0; width: 40px; height: 40px; border-radius: 100%; background: #fff; border: 50px solid black; } 1. .taiji { width: 140px; height: 280px; border-radius: 100%; /*

android 中TextToSpeech的用法

浪尽此生 提交于 2019-12-01 19:09:44
目前只支持5种语言,分别是 English 、 French 、 German 、 Italian 和 Spanish. 系统要求为android 1.6以上 直接上代码啦: [java] public class TTSActivity extends Activity implements TextToSpeech.OnInitListener { private static final String TAG = "TextToSpeechDemo" ; private TextToSpeech mTts;//首先来个对象,至于TextToSpeech类,按F3可以查看 [java] //TODO complete javadoc + add links to constants public class TextToSpeech { /** * Denotes a successful operation. */ public static final int SUCCESS = 0 ; /** * Denotes a generic operation failure. */ public static final int ERROR = - 1 ; 以上只包含部分代码,其他的就省略了。 [java] mTts = new TextToSpeech( this ,

12.1 网格listview 点击事件

南笙酒味 提交于 2019-12-01 18:25:39
实现界面: 事件:当点击时可以出现点击事件 实现思路,图片下面有一个文本框,又要以网格的形式实现界面, 那么就需要使用girdview完成网格布局, 同时使用一个打气筒将一个layout转成一个view, xml: main <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.example

Mysql数据库常用语句笔记

纵饮孤独 提交于 2019-12-01 17:59:24
一、连接MySQL 格式: mysql -h 主机地址 -u 用户名 -p 用户密码 1、例1:连接到本机上的MYSQL。 首先在打开DOS窗口,然后进入目录 mysql bin,再键入命令mysql -uroot -p,回车后提示你输密码,如果刚安装好MYSQL,超级用户root是没有密码的,故直接回车即可进入到MYSQL中了,MYSQL的提示符是: mysql>。 2、例2:连接到远程主机上的MYSQL。假设远程主机的IP为:110.110.110.110,用户名为root,密码为abcd123。则键入以下命令: mysql -h 110.110.110.110 -uroot -p abcd123 (注:u与root可以不用加空格,其它也一样) 3、退出MYSQL命令: exit (回车)。 二、修改密码 格式:mysqladmin -u用户名 -p旧密码 password 新密码 1、例1:给root加个密码ab12。首先在DOS下进入目录mysql bin,然后键入以下命令: mysqladmin -uroot -password ab12 注:因为开始时root没有密码,所以-p旧密码一项就可以省略了。 2、例2:再将root的密码改为djg345。 mysqladmin -uroot -pab12 password djg345 三、增加新用户。 (注意:和上面不同

Content appearing behind fixed header

本秂侑毒 提交于 2019-12-01 17:53:31
I fixed the header section of a website, but the first div of the page appears behind the header; instead of starting from the end of the header. When you apply position: fixed or position: absolute the element is being removed from the document flow, so the elements that come after treat it as a non-existent. That's why your div jumps up. To fix that apply a margin-top that equals to your header height - http://jsfiddle.net/2xjES/ 来源: https://stackoverflow.com/questions/11126482/content-appearing-behind-fixed-header

Android listview item background change

雨燕双飞 提交于 2019-12-01 17:30:00
i have a android listview. i want to change listview item background when i click one listview item. and then previous selected item must go back to default background. this means only one item has to be selected. i have searched it for a long time. i can change background of selected item using onItemClick() but i can't change previous selected item. for example, if i select second item, it was changed. and then i select third item. oh my god! it is changed too! what can i do for this. how can i get the previous position? here is my android code. private class ListViewItemClickListener

How to get cardinal mouse direction from mouse coordinates

故事扮演 提交于 2019-12-01 17:23:35
is it possible to get the mouse direction (Left, Right, Up, Down) based on mouse last position and current position? I have written the code to calculate the angle between two vectors but I am not sure if it is right. Can someone please point me to the right direction? public enum Direction { Left = 0, Right = 1, Down = 2, Up = 3 } private int lastX; private int lastY; private Direction direction; private void Form1_MouseDown(object sender, MouseEventArgs e) { lastX = e.X; lastY = e.Y; } private void Form1_MouseMove(object sender, MouseEventArgs e) { double angle = GetAngleBetweenVectors(lastX

Content appearing behind fixed header

送分小仙女□ 提交于 2019-12-01 17:18:40
问题 I fixed the header section of a website, but the first div of the page appears behind the header; instead of starting from the end of the header. 回答1: When you apply position: fixed or position: absolute the element is being removed from the document flow, so the elements that come after treat it as a non-existent. That's why your div jumps up. To fix that apply a margin-top that equals to your header height - http://jsfiddle.net/2xjES/ 来源: https://stackoverflow.com/questions/11126482/content