Authored by 陈峰

merge

... ... @@ -7,11 +7,13 @@ import Util from './libs/util';
import App from './app.vue';
import 'iview/dist/styles/iview.css';
import bus from './plugin/bus'
Vue.use(VueRouter);
Vue.use(iView);
Vue.use(bus);
// 路由配置
const RouterConfig = {
... ...
import Vue from 'vue'
const bus = new Vue()
export default {
install(Vue) {
Object.defineProperty(Vue, '$bus', {
value() {
return bus
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -3,17 +3,22 @@ const routers = [{
component: (resolve) => require(['./views/layout.vue'], resolve),
children: [
{
path: 'similar',
path: 'index.html',
name: 'similar.index',
component: (resolve) => require(['./views/similar/list'], resolve)
},
{
path: 'similar.html',
name: 'similar.list',
component: (resolve) => require(['./views/similar/list'], resolve)
},
{
path: 'image',
path: 'image.html',
name: 'image.list',
component: (resolve) => require(['./views/image/list'], resolve)
},
{
path: 'image',
path: 'image.html',
name: 'image.edit',
component: (resolve) => require(['./views/image/editor'], resolve)
},
... ...
... ... @@ -77,7 +77,14 @@
},
goTop() {
this.$refs.backtop.back()
},
goNext() {
this.$bus.emit('gonext')
},
goBack() {
this.$bus.emit('goback')
}
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@ fs.open('./src/config/env.js', 'w', function (err, fd) {
module.exports = merge(webpackBaseConfig, {
devtool: '#source-map',
output: {
publicPath: '/dist/',
publicPath: '/dist',
filename: '[name].js',
chunkFilename: '[name].chunk.js'
},
... ... @@ -37,6 +37,9 @@ module.exports = merge(webpackBaseConfig, {
'/api': 'http://localhost:8080'
},
port: 8000,
host: '0.0.0.0'
historyApiFallback: {
index: 'index.html',
logger: console.log.bind(console)
}
}
});
\ No newline at end of file
... ...