n20-common-lib 2.6.79 → 2.6.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.6.79",
3
+ "version": "2.6.80",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -113,6 +113,11 @@ export async function bootstrap() {
113
113
  }
114
114
  export async function mount(props) {
115
115
  // console.log('[vue] props from main framework', props)
116
+ props.onGlobalStateChange((state, prev) => {
117
+ // state: 变更后的状态; prev 变更前的状态
118
+ // console.log('onGlobalStateChange111', state, prev)
119
+ vuePar.store.commit('MP/setGlobalState', state)
120
+ }, true)
116
121
  /* 从其他子运用再切回这个运用,是否保持之前的状态 */
117
122
  KEEP_ALIVE && !props.router ? _mountKeep(props) : _mount(props)
118
123
  }
@@ -1,4 +1,4 @@
1
- import { addTab, closeTab, setTabName, refreshTab } from '../utils/handleTab.js'
1
+ import { addTab, closeTab, refreshTab, setTabName } from '../utils/handleTab.js'
2
2
 
3
3
  const PM = {
4
4
  namespaced: true,
@@ -17,6 +17,9 @@ const PM = {
17
17
  },
18
18
  refreshTab(state, opt) {
19
19
  refreshTab(opt)
20
+ },
21
+ setGlobalState(state, data) {
22
+ Object.assign(state, data)
20
23
  }
21
24
  }
22
25
  }
@@ -7,7 +7,12 @@
7
7
  :data="data"
8
8
  :height="height"
9
9
  :class="{ 'cell-default-set--': cellDefault }"
10
- :checkbox-config="{ checkField: 'checked', checkMethod: forbidSelect }"
10
+ :checkbox-config="{
11
+ checkField: 'checked',
12
+ checkMethod: forbidSelect,
13
+ ...$attrs.checkboxConfig,
14
+ ...$attrs['checkbox-config']
15
+ }"
11
16
  show-header-overflow
12
17
  show-overflow
13
18
  :row-config="{ isHover: true, useKey: true, ...$attrs.rowConfig, ...$attrs['row-config'] }"