n20-common-lib 2.2.16 → 2.2.18

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.2.16",
3
+ "version": "2.2.18",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -102,4 +102,12 @@
102
102
  padding: 16px;
103
103
  }
104
104
 
105
- @import url('../../components/TableSetSize/style.scss');
105
+ @import '../../components/TableSetSize/style.scss';
106
+ .el-table-set-size-item {
107
+ .icon-mini {
108
+ background-image: url('../../components/TableSetSize/small.png');
109
+ }
110
+ .icon-mini {
111
+ background-image: url('../../components/TableSetSize/mini.png');
112
+ }
113
+ }
@@ -1,5 +1,15 @@
1
1
  <template>
2
- <el-tabs :value="init" class="n20-secondary-tab m-b" :before-leave="beforeFn" @tab-click="clickFn">
2
+ <div v-if="data.length === 0" class="n20-secondary-tab m-b">
3
+ <div class="el-tabs__item is-active">{{ init }}</div>
4
+ </div>
5
+ <div v-else-if="data.length === 1" class="n20-secondary-tab m-b">
6
+ <div class="el-tabs__item is-active">
7
+ <span v-if="data[0].icon" :class="data[0].icon"></span>
8
+ <sup v-if="data[0].badge" class="el-tabs__item-badge"></sup>
9
+ {{ data[0].name }}
10
+ </div>
11
+ </div>
12
+ <el-tabs v-else :value="init" class="n20-secondary-tab m-b" :before-leave="beforeFn" @tab-click="clickFn">
3
13
  <el-tab-pane
4
14
  v-for="item of data"
5
15
  :key="item.name"
@@ -1,5 +1,5 @@
1
1
  @import '@/assets/css/element-variables.scss';
2
- .el-table .hidden-columns {
2
+ .el-table div.hidden-columns {
3
3
  visibility: initial;
4
4
  position: initial;
5
5
  height: 0;
@@ -63,11 +63,9 @@
63
63
  margin: 4px auto 0;
64
64
  }
65
65
  .icon-small {
66
- background: url('./small.png');
67
66
  background-size: 100% 100%;
68
67
  }
69
68
  .icon-mini {
70
- background: url('./mini.png');
71
69
  background-size: 100% 100%;
72
70
  }
73
71
  .text-small,
@@ -8,7 +8,12 @@ export function setItem(key, obj) {
8
8
  export function getItem(key) {
9
9
  let obj = window['_keep_' + key]
10
10
  if (!obj) {
11
- obj = JSON.parse(sessionStorage.getItem(key))
11
+ if (key === 'relaNosGlobal') {
12
+ let relaNos = getItem('relaNos') || []
13
+ obj = relaNos.map((item) => item.relaNos).flat()
14
+ } else {
15
+ obj = JSON.parse(sessionStorage.getItem(key))
16
+ }
12
17
  window['_keep_' + key] = obj
13
18
  }
14
19
  return obj