Commit 0c154234 by 前端

commit

1 parent e63390c3
...@@ -12,8 +12,9 @@ let instance = null ...@@ -12,8 +12,9 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) { export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig() const { response, request, sign, secret, sign_common, request_common ,merchantId} = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
......
...@@ -20,18 +20,17 @@ export default { ...@@ -20,18 +20,17 @@ export default {
componentName: 'selectyy', componentName: 'selectyy',
data() { data() {
return { return {
groupStyle: '' groupStyle: '',
includeData:['el-input__inner','placeholder','el-select__caret el-input__icon el-icon-arrow-up']
} }
}, },
mounted() { mounted() {
if (this.appendToBody) document.body.appendChild(this.$el) if (this.appendToBody) document.body.appendChild(this.$el)
this.getBoundingClientRect() this.getBoundingClientRect()
window.addEventListener('resize', this.getBoundingClientRect) window.addEventListener('resize', this.getBoundingClientRect)
document.addEventListener('click', e => { document.addEventListener('click', e => {
console.log(this.$options.componentName) if (!this.includeData.includes(e.target.className)) {
if (e.target.className != 'group-select') { this.removeEl()
// this.removeEl()
} }
}) })
}, },
...@@ -41,8 +40,8 @@ export default { ...@@ -41,8 +40,8 @@ export default {
this.groupStyle = { left: left + 'px', top: top + 45 + 'px' } this.groupStyle = { left: left + 'px', top: top + 45 + 'px' }
}, },
removeEl() { removeEl() {
console.log(document.body.contains(this.$el))
document.body.contains(this.$el) && document.body.removeChild(this.$el) document.body.contains(this.$el) && document.body.removeChild(this.$el)
this.$emit('changeStatu')
} }
}, },
beforeDestroy() { beforeDestroy() {
...@@ -54,7 +53,7 @@ export default { ...@@ -54,7 +53,7 @@ export default {
.group-select { .group-select {
min-width: 284px; min-width: 284px;
transform-origin: center top; transform-origin: center top;
z-index: 2005; z-index: 10000;
position: fixed; position: fixed;
top: 740px; top: 740px;
left: 600px; left: 600px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!