Commit 52e2fb3b by cwq0219

create

1 parent d98b7bc6
...@@ -5,8 +5,7 @@ import App from './App' ...@@ -5,8 +5,7 @@ import App from './App'
import router from '@/router/index.js' import router from '@/router/index.js'
import GlsxVueComponents from 'glsx-vue-components' import GlsxVueComponents from 'glsx-vue-components'
import 'glsx-vue-components/dist/glsx-vue-components.css' import 'glsx-vue-components/dist/glsx-vue-components.css'
import { GlsxVueCommon, GlConst } from 'glsx-vue-common' import GlsxVueCommon from 'glsx-vue-common'
const { AppConst } = GlConst
// import _ from 'lodash' // import _ from 'lodash'
Vue.use(GlsxVueComponents) Vue.use(GlsxVueComponents)
...@@ -14,23 +13,24 @@ Vue.use(GlsxVueCommon) ...@@ -14,23 +13,24 @@ Vue.use(GlsxVueCommon)
var mixin = { var mixin = {
mounted () { mounted () {
const _this = this
const theme = new this.$Theme() const theme = new this.$Theme()
const menus = new this.$get_config_by_key(AppConst.Auth.Resources.Key)
const connection = this.$Penpal.connectToParent({ const connection = this.$Penpal.connectToParent({
methods: { methods: {
setTheme (color) { setTheme (color) {
theme.change(color) theme.change(color)
}, },
setResources (resources) {
menus.change(resources)
},
height () { height () {
return document.height || document.body.offsetHeight // document.documentElement.clientHeight || document.body.clientHeight // return document.height || document.body.offsetHeight // document.documentElement.clientHeight || document.body.clientHeight //
} }
} }
}) })
connection.promise.then(parent => { connection.promise.then(parent => {
parent.onload() const cfg = _this.$get_session_config()
if (cfg) return
parent.getResources().then(config => {
_this.$set_session_config(config)
})
}) })
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!