0.7.9 • Published 5 years ago

vicore v0.7.9

Weekly downloads
3
License
MIT
Repository
-
Last release
5 years ago

vicore

Npm version

Usage

//main.js
import Vue from 'vue';!
import App from './app';!
import store from './store';!
import router from './router';!
import { whiteList } from './router/index';!
import i18n from './lang/index';!
import settings from './settings';
import ViCore from 'vicore';!
import './styles/index.scss';!

Vue.use(ViCore, {
    Vue,
    store,
    settings,
    i18n,
    router,
    whiteList,
    currentClientId: process.env.VUE_APP_CLIENT_ID,
    env: process.env
});!

Vue.config.productionTip = false;
new Vue({
    el: '#app',
    router,
    store,
    i18n,
    render: h => h(App),
});!

Conventional

//.env
ENV = 'development'!
NODE_ENV = 'development'!
VUE_CLI_BABEL_TRANSPILE_MODULES = true

VUE_APP_CLIENT_ID = 'Windivi'!
VUE_APP_CLIENT_SECRET = '123456'!

VUE_APP_BASE_PROXY = '/base-proxy'!
VUE_APP_BASE_SERVER = http://192.168.1.226:8002!
VUE_APP_BASE_LOGIN_URL = http://localhost:8081/#/login!
VUE_APP_BASE_SOCKET_PROXY = '/base-websocket'
VUE_APP_BASE_SOCKET = 150.223.10.116:83

VUE_APP_PROXY = '/proxy'
VUE_APP_SERVER = http://150.223.10.116:83
VUE_APP_SOCKET_PROXY = '/websocket'
VUE_APP_SOCKET = 150.223.10.116:83

VUE_APP_RTMP_PROXY = '/rtmp-proxy'
VUE_APP_RTMP_SERVER = http://192.168.1.107:10810

VUE_APP_MEETING_PROXY = '/meeting-proxy'
VUE_APP_MEETING_SERVER = 'https://www.cloudroom.com'
VUE_APP_MEETING_SOCKET_PROXY = '/meeting-websocket'
VUE_APP_MEETING_SOCKET_SERVER = 'wss://59.110.14.207:13100/'
// vue.config.js
const port = 9527;
module.exports = {
        devServer: {
        host: '10.0.75.1',!
        port: port,!
        open: false,
        https: true,!
        disableHostCheck: true,!
        proxy: {
            [process.env.VUE_APP_PROXY]: {
                target: `${process.env.VUE_APP_SERVER}`,
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    ['^' + process.env.VUE_APP_PROXY]: ''
                }
            },
            [process.env.VUE_APP_BASE_PROXY]: {
                target: `${process.env.VUE_APP_BASE_SERVER}`,
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    ['^' + process.env.VUE_APP_BASE_PROXY]: ''
                }
            },!
            [process.env.VUE_APP_RTMP_PROXY]: {
                target: `${process.env.VUE_APP_RTMP_SERVER}`,
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    ['^' + process.env.VUE_APP_RTMP_PROXY]: ''
                }
            },
            [process.env.VUE_APP_MEETING_PROXY]: {
                target: `${process.env.VUE_APP_MEETING_SERVER}`,
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    ['^' + process.env.VUE_APP_MEETING_PROXY]: ''
                }
            }
        },
        before: app => { }
        // after: require('./mock/mock-server.js')
    },
};
//app.vue
<template>
    <div id="app">!
        <router-view />
    </div>
</template>

<script>
export default {
    name: 'App',
};
</script>
###index.scss
@import './element-variables.scss';!
@import '~vicore/dist/vicore.css';!
###element-variables.scss
/**
* I think element-ui's default theme color is too light for long-term use.
* So I modified the default color and you can modify it to your liking.
**/

/* theme color */
$--color-primary: #1890ff;
$--color-success: #13ce66;
$--color-warning: #FFBA00;
$--color-danger: #ff4949;
// $--color-info: #1E1E1E;

$--button-font-weight: 400;

// $--color-text-regular: #1f2d3d;

$--border-color-light: #dfe4ed;
$--border-color-lighter: #e6ebf5;

$--table-border:1px solid#dfe6ec;

/* icon font path, required */
$--font-path: '~element-ui/lib/theme-chalk/fonts';

@import "~element-ui/packages/theme-chalk/src/index";

// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
  theme: $--color-primary;
}

API

Installation

npm install vicore -S
0.7.9

5 years ago

0.7.8

5 years ago

0.7.7

5 years ago

0.7.6

5 years ago

0.7.5

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.0

5 years ago

0.5.9

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.8

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.3

5 years ago

0.4.0

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.9

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.7-rc

5 years ago

0.1.6-rc

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago