Skip to content

Commit 97392e4

Browse files
committed
modify global mixin
1 parent d4eace9 commit 97392e4

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

src/js/component/table/list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</template>
3030
<script>
3131
import listBody from './body.vue';
32-
import vueScroll from './vuescroll/vuescroll-native.js';
32+
const vueScroll = require('./vuescroll/vuescroll-native.js');
3333
export default {
3434
components: {
3535
vueScroll,

src/js/component/table/table.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default {
180180
},
181181
};
182182
</script>
183-
<style lang="sass" src="./index.scss"></style>
183+
<style lang="scss" src="./index.scss"></style>
184184
<style>
185185
.list-view {
186186
width: 100%;

src/js/module/globalHistory/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
v-model="searchBar.proxyUser"
2828
placeholder="请输入用户名搜索"
2929
style="width:120px;"
30-
:readonly="isLogModuleShow"></Input>
30+
:readonly="isLogModuleShow" />
3131
</FormItem>
3232
<Divider
3333
type="vertical"
@@ -148,14 +148,13 @@ import log from './log.vue';
148148
import Module from './index';
149149
import api from '@/js/service/api';
150150
import util from '@/js/util';
151-
import envMixin from '@js/service/mixin';
152151
export default {
153152
name: 'GlobalHistory',
154153
components: {
155154
historyTable: table.historyTable,
156155
log,
157156
},
158-
mixins: [Module.mixin, envMixin],
157+
mixins: [Module.mixin],
159158
data() {
160159
return {
161160
list: [],

src/js/service/mixin.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import Vue from 'vue';
21
import storage from '@/js/helper/storage';
32

4-
Vue.mixin({
3+
export default{
54
data: function() {
65
return {
76
SUPPORTED_LANG_MODES: Object.freeze([
@@ -49,6 +48,4 @@ Vue.mixin({
4948
return !!findRole;
5049
},
5150
},
52-
});
53-
54-
// 注入自己的对象
51+
};

src/js/view/home/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<we-panel-item
4747
:index="2"
4848
class="center-panel">
49-
<template scope="props">
49+
<template slot-scope="props">
5050
<workbench
5151
:width="props.width"
5252
v-if="props.width"/>

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import VueRouter from 'vue-router'
55
import App from './js/view/app.vue'
66
import router from './js/service/router'
77
import './js/module'
8-
import './js/service/mixin'
98
import component from './js/component'
9+
import mixin from '../src/js/service/mixin'
1010

1111
Vue.config.productionTip = false
1212

1313
Vue.use(iView)
1414
Vue.use(VueRouter)
1515
Vue.use(component)
16+
Vue.mixin(mixin);
1617

1718
new Vue({
1819
router,

0 commit comments

Comments
 (0)