|
|
@ -1,61 +1,13 @@
|
|
|
|
import Vue from 'vue'
|
|
|
|
import Vue from 'vue'
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
import {
|
|
|
|
|
|
|
|
Alert, Aside, Autocomplete, Badge, Button, ButtonGroup, Card, Col, ColorPicker, Container, Divider, Form, FormItem, Image,
|
|
|
|
|
|
|
|
Input, Link, Main, Menu, MenuItem, Message, Option, OptionGroup, Radio, RadioGroup, Row, Select, Scrollbar,
|
|
|
|
|
|
|
|
Slider, Submenu, Switch, Table, TableColumn, TabPane, Tabs, Tooltip
|
|
|
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
|
|
|
import axios from 'axios'
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
|
|
import * as i18n from './i18n'
|
|
|
|
import * as i18n from './i18n'
|
|
|
|
import App from './App'
|
|
|
|
import App from './App'
|
|
|
|
import Layout from './layout'
|
|
|
|
|
|
|
|
import Home from './views/Home'
|
|
|
|
|
|
|
|
import StyleGenerator from './views/StyleGenerator'
|
|
|
|
|
|
|
|
import Help from './views/Help'
|
|
|
|
|
|
|
|
import Room from './views/Room'
|
|
|
|
|
|
|
|
import NotFound from './views/NotFound'
|
|
|
|
import NotFound from './views/NotFound'
|
|
|
|
|
|
|
|
|
|
|
|
axios.defaults.timeout = 10 * 1000
|
|
|
|
axios.defaults.timeout = 10 * 1000
|
|
|
|
|
|
|
|
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
|
|
|
|
// 初始化element
|
|
|
|
|
|
|
|
Vue.use(Alert)
|
|
|
|
|
|
|
|
Vue.use(Aside)
|
|
|
|
|
|
|
|
Vue.use(Autocomplete)
|
|
|
|
|
|
|
|
Vue.use(Badge)
|
|
|
|
|
|
|
|
Vue.use(Button)
|
|
|
|
|
|
|
|
Vue.use(ButtonGroup)
|
|
|
|
|
|
|
|
Vue.use(Card)
|
|
|
|
|
|
|
|
Vue.use(Col)
|
|
|
|
|
|
|
|
Vue.use(ColorPicker)
|
|
|
|
|
|
|
|
Vue.use(Container)
|
|
|
|
|
|
|
|
Vue.use(Divider)
|
|
|
|
|
|
|
|
Vue.use(Form)
|
|
|
|
|
|
|
|
Vue.use(FormItem)
|
|
|
|
|
|
|
|
Vue.use(Image)
|
|
|
|
|
|
|
|
Vue.use(Input)
|
|
|
|
|
|
|
|
Vue.use(Link)
|
|
|
|
|
|
|
|
Vue.use(Main)
|
|
|
|
|
|
|
|
Vue.use(Menu)
|
|
|
|
|
|
|
|
Vue.use(MenuItem)
|
|
|
|
|
|
|
|
Vue.use(Option)
|
|
|
|
|
|
|
|
Vue.use(OptionGroup)
|
|
|
|
|
|
|
|
Vue.use(Radio)
|
|
|
|
|
|
|
|
Vue.use(RadioGroup)
|
|
|
|
|
|
|
|
Vue.use(Row)
|
|
|
|
|
|
|
|
Vue.use(Select)
|
|
|
|
|
|
|
|
Vue.use(Scrollbar)
|
|
|
|
|
|
|
|
Vue.use(Slider)
|
|
|
|
|
|
|
|
Vue.use(Submenu)
|
|
|
|
|
|
|
|
Vue.use(Switch)
|
|
|
|
|
|
|
|
Vue.use(Table)
|
|
|
|
|
|
|
|
Vue.use(TableColumn)
|
|
|
|
|
|
|
|
Vue.use(TabPane)
|
|
|
|
|
|
|
|
Vue.use(Tabs)
|
|
|
|
|
|
|
|
Vue.use(Tooltip)
|
|
|
|
|
|
|
|
Vue.prototype.$message = Message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Vue.config.ignoredElements = [
|
|
|
|
Vue.config.ignoredElements = [
|
|
|
|
/^yt-/
|
|
|
|
/^yt-/
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -65,23 +17,23 @@ const router = new VueRouter({
|
|
|
|
routes: [
|
|
|
|
routes: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
path: '/',
|
|
|
|
component: Layout,
|
|
|
|
component: () => import('./layout'),
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{ path: '', name: 'home', component: Home },
|
|
|
|
{ path: '', name: 'home', component: () => import('./views/Home') },
|
|
|
|
{ path: 'stylegen', name: 'stylegen', component: StyleGenerator },
|
|
|
|
{ path: 'stylegen', name: 'stylegen', component: () => import('./views/StyleGenerator') },
|
|
|
|
{ path: 'help', name: 'help', component: Help }
|
|
|
|
{ path: 'help', name: 'help', component: () => import('./views/Help') }
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: '/room/test',
|
|
|
|
path: '/room/test',
|
|
|
|
name: 'test_room',
|
|
|
|
name: 'test_room',
|
|
|
|
component: Room,
|
|
|
|
component: () => import('./views/Room'),
|
|
|
|
props: route => ({ strConfig: route.query })
|
|
|
|
props: route => ({ strConfig: route.query })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: '/room/:roomKeyValue',
|
|
|
|
path: '/room/:roomKeyValue',
|
|
|
|
name: 'room',
|
|
|
|
name: 'room',
|
|
|
|
component: Room,
|
|
|
|
component: () => import('./views/Room'),
|
|
|
|
props(route) {
|
|
|
|
props(route) {
|
|
|
|
let roomKeyType = parseInt(route.query.roomKeyType) || 1
|
|
|
|
let roomKeyType = parseInt(route.query.roomKeyType) || 1
|
|
|
|
if (roomKeyType < 1 || roomKeyType > 2) {
|
|
|
|
if (roomKeyType < 1 || roomKeyType > 2) {
|
|
|
|