Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var Vue = require('vue');
Vue = 'default' in Vue ? Vue['default'] : Vue;
var version = '2.2.2';
var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Vue.util.warn('VueClickaway ' + version + ' only supports Vue 2.x, and does not support Vue ' + Vue.version);
}
// @SECTION: implementation
var HANDLER = '_vue_clickaway_handler';
function bind(el, binding, vnode) {
unbind(el);
var vm = vnode.context;
var callback = binding.value;
if (typeof callback !== 'function') {
if (process.env.NODE_ENV !== 'production') {
//设置title
router.beforeEach((to, from, next) => {
$("#content").hide()
document.title = to.meta.title || '启明星'
window.scrollTo(0, 0)
let zaneEle = $('div.zane-calendar');
if(zaneEle.length) $('div.zane-calendar').parent().remove();
next()
})
router.afterEach((to, from, next) => {
$("#content").fadeIn()
})
Vue.config.productionTip = false
const app = new Vue(Vue.util.extend({
router,
}, App))
// 从而让整个应用都有路由功能
app.$mount('#app')
startAt = moment().utc().startOf('minute').format();
else {
// TODO: figure out whether we can stitch data
// without looking at the existing watcher
const optimal = moment().utc().startOf('minute')
.subtract(this.requiredHistoricalData, 'minutes')
.unix();
const available = moment
.utc(this.existingMarketWatcher.events.initial.candle.start)
.unix();
startAt = moment.unix(Math.max(optimal, available)).utc().format();
}
const gekkoConfig = Vue.util.extend({
market: {
type: 'leech',
from: startAt
},
mode: 'realtime'
}, this.config);
return gekkoConfig;
},
existingMarketWatcher: function() {
import Vue from 'vue';
export var version = '2.1.0';
var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Vue.util.warn('VueFocus ' + version + ' only supports Vue 2.x, and does not support Vue ' + Vue.version);
}
export var focus = {
inserted: function(el, binding) {
if (binding.value) el.focus();
else el.blur();
},
componentUpdated: function(el, binding) {
if (binding.modifiers.lazy) {
if (Boolean(binding.value) === Boolean(binding.oldValue)) {
return;
}
}
if (binding.value) el.focus();
import Vue from 'vue';
import { deepAssign } from '../utils/deep-assign';
import defaultMessages from './lang/zh-CN';
declare module 'vue' {
interface VueConstructor {
util: {
defineReactive(obj: object, key: string, value: any): void;
};
}
}
const proto = Vue.prototype;
const { defineReactive } = Vue.util;
defineReactive(proto, '$vantLang', 'zh-CN');
defineReactive(proto, '$vantMessages', {
'zh-CN': defaultMessages
});
export default {
messages() {
return proto.$vantMessages[proto.$vantLang];
},
use(lang: string, messages?: object) {
proto.$vantLang = lang;
this.add({ [lang]: messages });
},
sounds.forEach(sound => {
Vue.util.defineReactive(sound, 'end')
})
}
unbind: function(){
Vue.util.off(this.el, 'click', this._cb);
}
}
unbind: function(){
Vue.util.off(this.el, 'click', this._cb);
}
}
export const updateStratrunner = (state, update) => {
let index = state.stratrunners.findIndex(i => i.id === update.gekko_id);
let item = state.stratrunners[index];
if(!item)
return state;
let updated = Vue.util.extend(item, update.updates);
Vue.set(state.stratrunners, index, updated);
return state;
}
export const addTradeToStratrunner = (state, update) => {
Vue.prototype.defineReactive = function(map) {
for(const k in map) {
Vue.util.defineReactive(this, k, map[k]);
}
};