How to use view-design - 7 common examples

To help you get started, we’ve selected a few view-design 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 hunzhiwange / queryphp / frontend / src / router / index.js View on Github external
router.beforeEach((to, from, next) => {
    ViewUI.LoadingBar.start()

    setTimeout(() => utils.title(to.meta.title), 0)

    if (!getToken() && to.name !== 'login') {
        next({
            name: 'login',
        })
    } else if (getToken() && to.name === 'login') {
        next({
            name: 'dashboard',
        })
    }

    // 判断当前是否是锁定状态
    else if (isLock() && to.name !== 'locking') {
        next({
github hunzhiwange / queryphp / frontend / src / router / index.js View on Github external
import Router from 'vue-router'
import ViewUI from 'view-design'
import {routers} from './router'
import {getToken, isLock} from '../utils/auth'

Vue.use(Router)

let router = new Router({
    // mode: 'history', 后端支持可开
    scrollBehavior: () => ({y: 0}),
    routes: routers,
})

export default router

ViewUI.LoadingBar.config({
    color: '#08fa34',
    //failedColor: '#f0ad4e',
    //height: 5
})

let ignoreRouter = ['404', '403', '500', 'locking', 'login', 'dashboard', 'profile_index', 'message_index']

router.beforeEach((to, from, next) => {
    ViewUI.LoadingBar.start()

    setTimeout(() => utils.title(to.meta.title), 0)

    if (!getToken() && to.name !== 'login') {
        next({
            name: 'login',
        })
github devfeel / rockman / webui / webapp / src / common / http.js View on Github external
}, error => {
  if (error.response) {
    let code = error.response.status;
    switch (code) {
      case 500:
        Message.error(error.response.data.RetMsg)
        break;
      default:
        Message.error(codeMessage[code])
    }
  }
  return Promise.reject(error.response.data);// 返回接口返回的错误信息
})
github devfeel / rockman / webui / webapp / src / common / http.js View on Github external
}, error => {
  if (error.response) {
    let code = error.response.status;
    switch (code) {
      case 500:
        Message.error(error.response.data.RetMsg)
        break;
      default:
        Message.error(codeMessage[code])
    }
  }
  return Promise.reject(error.response.data);// 返回接口返回的错误信息
})
github WeBankPartners / open-monitor / monitor-ui / src / assets / js / httpRequestEntrance.js View on Github external
function errorMessage(content) {
  console.log(content)
  Message.error({
    content: content,
    duration: 5,
    closable: true
  })
}
github view-design / view-ui-project / src / main.js View on Github external
router.afterEach((to, from, next) => {
    ViewUI.LoadingBar.finish();
    window.scrollTo(0, 0);
});
github view-design / view-ui-project / src / main.js View on Github external
router.beforeEach((to, from, next) => {
    ViewUI.LoadingBar.start();
    Util.title(to.meta.title);
    next();
});

view-design

A high quality UI components Library with Vue.js

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis