How to use vconsole - 6 common examples

To help you get started, we’ve selected a few vconsole examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BryanAdamss / fe-awesome-demos / Vue / vue-music / src / main.js View on Github external
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'
import fastclick from 'fastclick'
import VueLazyLoad from 'vue-lazyload'

// Vue.config.productionTip = false
import 'common/stylus/index.styl'

/* eslint-disable no-unused-vars */
import VConsole from 'vconsole'
var vConsole=new VConsole();
console.log('test');


fastclick.attach(document.body)

Vue.use(VueLazyLoad,{
  loading:require('common/image/default.png')
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
github 122177638 / vue-apiCloud-model-mobile / src / main.js View on Github external
// alert(window.navigator.userAgent);
// 该判断只在云编译环境下才有效 使用isApp变量手动设置环境(ios必须要有测试包的情况下,才会携带apicloud标识)
// 标识可以在config.xml文件userAgent字段设置
if (window.navigator.userAgent.match(/APICloud/i)) {
  window.apiready = function() {
    process.env.NODE_ENV === "development" && new VConsole();
    // 将API链接Vue原型,后续通过this.$APICLOUD代替window.api
    Vue.prototype.$APICLOUD = window.api;
    new Vue({
      router,
      store,
      render: h => h(App)
    }).$mount("#app");
  };
} else {
  process.env.NODE_ENV === "development" && new VConsole();
  new Vue({
    router,
    store,
    render: h => h(App)
  }).$mount("#app");
}
github czero1995 / fancy-store / src / main.js View on Github external
import App from "./App.vue";
import router from "./router";
import store from "./store";
import i18n from "./lang";
import axios from "./assets/js/axios";
import VueTouch from "vue-touch";
import VueLazyLoad from "vue-lazyload";
import Vconsole from "vconsole";
import fastclick from "fastclick";
import Raven from "raven-js";
import RavenVue from "raven-js/plugins/vue";
import { mapGetters, mapMutations } from "vuex";
// import "../public/js/rem.js";
// 控制台插件
let vConsole = null;
process.env.NODE_ENV == "development" && (vConsole = new Vconsole());
export default vConsole;

// axios全局拦截
Vue.prototype.$http = axios;

// mock模拟数据
require("../mock");

// 去除移动端点击200ms延迟
fastclick.attach(document.body);

// Sentry错误日志监控
Raven.config("https://ce431a99e0884612a053541eef0f2810@sentry.io/1245961", {
    release: process.env.RELEASE_VERSION,
    debug: true
})
github vasttian / vue-admin-vuetify / src / utils / vconsole.js View on Github external
// vconsole
import Vconsole from 'vconsole';

const vConsole = new Vconsole();

export default vConsole;
github yhtml5 / yhtml5-app / apps / test-tools / src / Containers / TestDashboard / Components / Vconsole.jsx View on Github external
import React from 'react';
import VConsole from 'vconsole';
import styles from './Vconsole.pcss';

const vConsole = new VConsole();
class Vconsole extends React.PureComponent {
  constructor(props) {
    super(props)
    this.state = {}
    this.toggleVconsole = this.toggleVconsole.bind(this)
    process.env.NODE_ENV === "production" || console.log('Vconsole.constructor')
  }
  componentWillMount() {
    process.env.NODE_ENV === "production" || console.log('Vconsole.componentWillMount')
  }
  componentDidMount() {
    window.APP.vConsole = vConsole
    if (this.props.page === 1) {
      vConsole.show()
    }
    process.env.NODE_ENV === "production" || console.log('Vconsole.componentDidMount')
github kallsave / vue-router-cache / examples / base / src / common / helpers / vconsole.js View on Github external
import VConsole from 'vconsole'

const platform = window.navigator.platform

let vConsole

if (!/^(Win|Mac)/i.test(platform)) {
  vConsole = new VConsole()
}

function observeProperty(obj, key, fn) {
  var val = obj[key]
  Object.defineProperty(obj, key, {
    enumerable: true,
    configurable: true,
    get: function () {
      return val
    },
    set: function (newVal) {
      if (val === newVal) {
        return
      }
      val = newVal
      if (typeof fn === 'function') {

vconsole

A lightweight, extendable front-end developer tool for mobile web page.

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis

Popular vconsole functions