This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Events = (function() { | |
var listen, | |
trigger, | |
remove, | |
once, | |
clientMap = {}; | |
listen = function(key, fn) { | |
(clientMap[key] || (clientMap[key] = [])).push(fn); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pi = Math.PI; | |
const a = 6378245.0; | |
const ee = 0.006693421622965943; | |
function gps2Mars(lng, lat) { | |
if (outOfChina(lng, lat)) { | |
return { | |
lng: lng, | |
lat: lat | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function oneOf(value, targetList) { | |
return targetList.filter(target => value === target).length !== 0 | |
} | |
export function getType(param) { | |
return Object.prototype.toString.call(param).slice(8,-1).toLowerCase() | |
} | |
export function padStart(str, len, ch = ' ') { | |
const times = len - `${str}`.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getType } from '@/utils' | |
export const clickOutside = { | |
bind(el, binding, vnode, oldVnode) { | |
function handler(e) { | |
if (!el.contains(e.target) && getType(binding.value) === 'function') { | |
binding.value(e) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="calendar-wrap" :class="size" v-clickOutside="handleClose"> | |
<input | |
type="text" | |
readonly="readonly" | |
class="calendar-input" | |
:value="selectDateString" | |
@click="handleToggle"> | |
<transition name="slide-down" @after-leave="handleAfterLeave"> | |
<div class="calendar-drop" :style="dropStyle" v-show="visible"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Top{ | |
background-color: #006284; | |
border-bottom: 0; | |
} | |
#Top .content img{ | |
-webkit-filter: invert(1); | |
filter: invert(1); | |
} |