n20-common-lib 2.7.0-beta.22 → 2.7.0-beta.24

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.
Files changed (46) hide show
  1. package/package.json +21 -14
  2. package/src/_qiankun/index.js +5 -0
  3. package/src/_qiankun/postMessage.js +4 -1
  4. package/src/assets/.DS_Store +0 -0
  5. package/src/assets/css/advanced-filter.scss +4 -153
  6. package/src/assets/css/cl-layout-header.scss +2 -2
  7. package/src/assets/css/font-icon.scss +2 -2
  8. package/src/assets/iconFont/demo_index.html +26 -3
  9. package/src/assets/iconFont/iconfont.css +7 -3
  10. package/src/assets/iconFont/iconfont.js +1 -1
  11. package/src/assets/iconFont/iconfont.json +7 -0
  12. package/src/assets/iconFont/iconfont.ttf +0 -0
  13. package/src/assets/iconFont/iconfont.woff +0 -0
  14. package/src/assets/iconFont/iconfont.woff2 +0 -0
  15. package/src/components/AdvancedFilter/index.vue +10 -5
  16. package/src/components/ApprovalButtons/index.vue +8 -15
  17. package/src/components/ApprovalRecord/approvalImgPro/index.vue +9 -7
  18. package/src/components/DatePicker/por.vue +17 -0
  19. package/src/components/FileUploadTable/index.vue +5 -1
  20. package/src/components/Layout/HeaderWrap/index.vue +3 -3
  21. package/src/components/Layout/HeaderWrap/indexN.vue +16 -0
  22. package/src/components/Layout/HeaderWrap/menuDrawer.vue +4 -1
  23. package/src/components/LoginTemporary/indexN.vue +8 -4
  24. package/src/components/Pagination/remotePagination.vue +10 -5
  25. package/src/components/TablePro/index.vue +9 -10
  26. package/src/i18n.json +1940 -656
  27. package/src/utils/auth.js +1 -1
  28. package/src/utils/axios.js +1 -1
  29. package/src/utils/i18n/index.js +7 -1
  30. package/style/fonts/iconfont.09d221ee.woff +0 -0
  31. package/style/fonts/{iconfont.2be34155.ttf → iconfont.1c4bfacc.ttf} +0 -0
  32. package/style/fonts/iconfont.a6f34dc7.woff2 +0 -0
  33. package/style/index.css +2 -2
  34. package/theme/blue.css +2 -2
  35. package/theme/cctcRed.css +2 -2
  36. package/theme/fonts/iconfont.09d221ee.woff +0 -0
  37. package/theme/fonts/iconfont.1c4bfacc.ttf +0 -0
  38. package/theme/fonts/iconfont.a6f34dc7.woff2 +0 -0
  39. package/theme/green.css +2 -2
  40. package/theme/lightBlue.css +2 -2
  41. package/theme/orange.css +2 -2
  42. package/theme/purple.css +2 -2
  43. package/theme/red.css +2 -2
  44. package/theme/yellow.css +2 -2
  45. package/style/fonts/iconfont.1676b4d9.woff2 +0 -0
  46. package/style/fonts/iconfont.ac432622.woff +0 -0
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.7.0-beta.22",
3
+ "version": "2.7.0-beta.24",
4
4
  "private": false,
5
- "main": "src/index.js",
6
5
  "scripts": {
7
- "dev": "vue-cli-service serve --doc",
8
- "build:docs": "vue-cli-service build --doc",
9
6
  "serve": "vue-cli-service serve",
10
- "serve:theme": "vue-cli-service serve --testTheme",
11
- "test": "vue-cli-service serve --test",
12
7
  "build": "node versionInfo.js && npm run build:css && vue-cli-service build --testTheme",
8
+ "test:unit": "vue-cli-service test:unit",
13
9
  "lint": "vue-cli-service lint",
14
- "info": "node versionInfo.js",
15
10
  "build:Jenkins_1": "vue-cli-service build --serverConfig ./server-config-jenkins.jsonc",
16
- "build:gzip": "vue-cli-service build --gzip",
17
- "build:report": "vue-cli-service build --analy",
18
11
  "build:css": "node build_css",
19
- "build:js": "vue-cli-service build --formats umd-min --target lib src/index.js --name index --dest lib --analy",
20
12
  "build:doc": "node versionInfo.js && vue-cli-service build --testTheme",
21
- "getI18n": "node ./node_modules/nstc-get-i18n"
13
+ "build:docs": "vue-cli-service build --doc",
14
+ "build:gzip": "vue-cli-service build --gzip",
15
+ "build:js": "vue-cli-service build --formats umd-min --target lib src/index.js --name index --dest lib --analy",
16
+ "build:report": "vue-cli-service build --analy",
17
+ "dev": "vue-cli-service serve --doc",
18
+ "getI18n": "node ./node_modules/nstc-get-i18n",
19
+ "info": "node versionInfo.js",
20
+ "serve:theme": "vue-cli-service serve --testTheme",
21
+ "test": "vue-cli-service serve --test"
22
22
  },
23
+ "main": "src/index.js",
23
24
  "files": [
24
25
  "src/_qiankun",
25
26
  "src/assets",
@@ -59,17 +60,22 @@
59
60
  "qrcode": "*",
60
61
  "resize-detector": "*",
61
62
  "strip-json-comments": "*",
63
+ "vuedraggable": "*",
62
64
  "v-viewer": "1.6.4",
63
- "vuedraggable": "*"
65
+ "xe-utils": "^3.5.11"
64
66
  },
65
67
  "devDependencies": {
66
68
  "@babel/plugin-proposal-optional-chaining": "^7.14.5",
67
69
  "@babel/plugin-transform-flow-comments": "^7.14.5",
68
70
  "@vue/cli-plugin-babel": "~4.5.0",
69
71
  "@vue/cli-plugin-eslint": "~4.5.0",
72
+ "@vue/cli-plugin-unit-jest": "^5.0.8",
70
73
  "@vue/cli-service": "~4.5.0",
71
74
  "@vue/compiler-dom": "^3.2.47",
75
+ "@vue/test-utils": "^1.1.3",
76
+ "@vue/vue2-jest": "^27.0.0-alpha.2",
72
77
  "babel-eslint": "^10.1.0",
78
+ "babel-jest": "^27.0.6",
73
79
  "babel-plugin-component": "^1.1.1",
74
80
  "clipboard": "^2.0.11",
75
81
  "compression-webpack-plugin": "^3.1.0",
@@ -83,6 +89,7 @@
83
89
  "file-saver": "^2.0.5",
84
90
  "fuse.js": "^6.6.2",
85
91
  "html-webpack-tags-plugin": "^2.0.17",
92
+ "jest": "^27.0.5",
86
93
  "jszip": "^3.10.0",
87
94
  "lodash": "^4.17.21",
88
95
  "md2vue-loader": "file:./md2vue-loader",
@@ -103,12 +110,12 @@
103
110
  "vue": "^2.6.11",
104
111
  "vue-cli-plugin-axios": "~0.0.4",
105
112
  "vue-grid-layout": "^2.3.12",
113
+ "vue-jest": "^3.0.7",
106
114
  "vue-router": "^3.5.2",
107
115
  "vue-template-compiler": "^2.6.11",
108
116
  "vuex": "^3.6.2",
109
117
  "vxe-table": "^3.6.17",
110
118
  "webpack-bundle-analyzer": "^3.9.0",
111
- "xe-utils": "^3.5.11",
112
119
  "xlsx": "0.14.1",
113
120
  "xlsx-style": "^0.8.13"
114
121
  },
@@ -117,4 +124,4 @@
117
124
  "last 2 versions",
118
125
  "not dead"
119
126
  ]
120
- }
127
+ }
@@ -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) => {
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
  }
Binary file
@@ -1,156 +1,3 @@
1
- // &-item {
2
- // position: relative;
3
- // display: inline-block;
4
- // vertical-align: middle;
5
- // max-width: 426px;
6
- // margin-right: 8px;
7
- // padding-left: 8px;
8
- // border-radius: 4px;
9
- // border: 1px solid #dcdfe5;
10
- // background: #fff;
11
- // cursor: pointer;
12
-
13
- // &__name {
14
- // display: inline-block;
15
- // vertical-align: middle;
16
- // white-space: nowrap;
17
- // overflow: hidden;
18
- // max-width: 168px;
19
- // margin-right: 6px;
20
- // color: #182b50;
21
- // }
22
-
23
- // &__value {
24
- // display: inline-block;
25
- // vertical-align: middle;
26
- // white-space: nowrap;
27
- // overflow: hidden;
28
- // text-overflow: ellipsis;
29
- // max-width: 312px;
30
-
31
- // //margin-right: 14px;
32
- // .el-input .el-input__inner {
33
- // border: none;
34
- // padding-left: 0;
35
- // background-color: transparent;
36
- // }
37
-
38
- // .el-input__inner:focus {
39
- // box-shadow: none;
40
- // }
41
-
42
- // }
43
-
44
- // .filter_remove {
45
- // display: none;
46
- // position: absolute;
47
- // height: 13px;
48
- // width: 13px;
49
- // background: #f1f1f1;
50
- // right: -5px;
51
- // top: -7px;
52
- // font-size: 14px;
53
- // z-index: 1;
54
- // border-radius: 50%;
55
- // cursor: pointer;
56
- // }
57
-
58
- // &:hover {
59
- // .filter_remove {
60
- // display: block;
61
- // }
62
- // }
63
-
64
-
65
-
66
- // .el-form-item__label {
67
- // padding: 0;
68
- // display: inline-block;
69
- // vertical-align: middle;
70
- // white-space: nowrap;
71
- // overflow: hidden;
72
- // text-overflow: ellipsis;
73
- // margin-right: 4px;
74
- // }
75
-
76
-
77
- // .el-range-editor.el-input__inner {
78
- // min-width: 168px;
79
- // max-width: 224px;
80
-
81
- // .el-range-input {
82
- // background-color: transparent;
83
- // }
84
- // }
85
-
86
- // .n20-date-editor.el-date-editor--datetimerange.el-range-editor--small.has-value {
87
- // min-width: 168px;
88
- // max-width: 380px;
89
- // }
90
-
91
- // .n20-date-editor .el-input__prefix {
92
- // display: none;
93
- // }
94
-
95
- // .el-input,
96
- // .el-input__inner {
97
- // border: none;
98
- // width: 100%;
99
- // background-color: transparent;
100
- // }
101
-
102
-
103
-
104
- // .el-input__inner:active,
105
- // .el-input__inner:focus {
106
- // box-shadow: none;
107
- // border: none;
108
- // border-color: #fff;
109
- // }
110
-
111
- // .el-checkbox-group {
112
- // height: 32px;
113
- // line-height: 32px;
114
- // vertical-align: middle;
115
- // padding: 0 10px;
116
- // }
117
-
118
- // .el-radio-group {
119
- // padding: 0 10px;
120
- // }
121
-
122
- // .n20-num-w {
123
- // padding-left: 5px;
124
-
125
- // .el-input,
126
- // .el-input__inner {
127
- // padding-left: 0;
128
- // }
129
-
130
- // .el-input--suffix .el-input__inner {
131
- // padding-right: 26px;
132
- // }
133
- // }
134
-
135
- // .n20-numberRange {
136
- // padding-right: 8px;
137
- // }
138
-
139
- // &-close {
140
- // display: none;
141
- // position: absolute;
142
- // top: -6px;
143
- // right: -20px;
144
- // }
145
-
146
- // &:hover {
147
- // .n20-advanced-filter-item-close {
148
- // display: inline-block;
149
- // }
150
- // }
151
- // }
152
-
153
-
154
1
  .n20-advanced-filter {
155
2
  box-sizing: border-box;
156
3
  position: relative;
@@ -254,6 +101,10 @@
254
101
  padding: 0 10px;
255
102
  }
256
103
 
104
+ .el-date-editor .el-range-separator {
105
+ padding: 0;
106
+ }
107
+
257
108
  .n20-num-w {
258
109
  // padding-left: 5px;
259
110
 
@@ -303,7 +303,7 @@ $--header-color: #3d4a57;
303
303
  align-items: center;
304
304
 
305
305
  &_drawer_box {
306
- width: 992px;
306
+ width: 1024px;
307
307
  }
308
308
 
309
309
  &_drawer_layout {
@@ -318,6 +318,7 @@ $--header-color: #3d4a57;
318
318
  &_title {
319
319
 
320
320
  display: inline-block;
321
+ font-weight: 700;
321
322
  padding: 4px;
322
323
 
323
324
  &:hover {
@@ -334,7 +335,6 @@ $--header-color: #3d4a57;
334
335
 
335
336
  &-first-item {
336
337
  flex: 0 0 33.33%;
337
- margin-bottom: 8px;
338
338
 
339
339
  &_title {
340
340
 
@@ -1,4 +1,4 @@
1
-
1
+ @import url('../iconFont/iconfont.css');
2
2
 
3
3
  .n20-icon- {
4
4
  font-family: 'core-lib-iconfont' !important;
@@ -34,7 +34,7 @@
34
34
  margin-left: 5px;
35
35
  }
36
36
 
37
- @import url('../iconFont/iconfont.css');
37
+
38
38
  @import url('../iconFont2/iconfont.css');
39
39
 
40
40
  .iconfont {
@@ -54,6 +54,12 @@
54
54
  <div class="content unicode" style="display: block;">
55
55
  <ul class="icon_lists dib-box">
56
56
 
57
+ <li class="dib">
58
+ <span class="icon core-lib-iconfont">&#xe630;</span>
59
+ <div class="name">越南语言切换_画板 1</div>
60
+ <div class="code-name">&amp;#xe630;</div>
61
+ </li>
62
+
57
63
  <li class="dib">
58
64
  <span class="icon core-lib-iconfont">&#xe62f;</span>
59
65
  <div class="name">语言切换</div>
@@ -624,9 +630,9 @@
624
630
  <pre><code class="language-css"
625
631
  >@font-face {
626
632
  font-family: 'core-lib-iconfont';
627
- src: url('iconfont.woff2?t=1710992109527') format('woff2'),
628
- url('iconfont.woff?t=1710992109527') format('woff'),
629
- url('iconfont.ttf?t=1710992109527') format('truetype');
633
+ src: url('iconfont.woff2?t=1711971557024') format('woff2'),
634
+ url('iconfont.woff?t=1711971557024') format('woff'),
635
+ url('iconfont.ttf?t=1711971557024') format('truetype');
630
636
  }
631
637
  </code></pre>
632
638
  <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -652,6 +658,15 @@
652
658
  <div class="content font-class">
653
659
  <ul class="icon_lists dib-box">
654
660
 
661
+ <li class="dib">
662
+ <span class="icon core-lib-iconfont n20-icon-a-yuenanyuyanqiehuan_huaban1"></span>
663
+ <div class="name">
664
+ 越南语言切换_画板 1
665
+ </div>
666
+ <div class="code-name">.n20-icon-a-yuenanyuyanqiehuan_huaban1
667
+ </div>
668
+ </li>
669
+
655
670
  <li class="dib">
656
671
  <span class="icon core-lib-iconfont n20-icon-yuyanqiehuan"></span>
657
672
  <div class="name">
@@ -1507,6 +1522,14 @@
1507
1522
  <div class="content symbol">
1508
1523
  <ul class="icon_lists dib-box">
1509
1524
 
1525
+ <li class="dib">
1526
+ <svg class="icon svg-icon" aria-hidden="true">
1527
+ <use xlink:href="#n20-icon-a-yuenanyuyanqiehuan_huaban1"></use>
1528
+ </svg>
1529
+ <div class="name">越南语言切换_画板 1</div>
1530
+ <div class="code-name">#n20-icon-a-yuenanyuyanqiehuan_huaban1</div>
1531
+ </li>
1532
+
1510
1533
  <li class="dib">
1511
1534
  <svg class="icon svg-icon" aria-hidden="true">
1512
1535
  <use xlink:href="#n20-icon-yuyanqiehuan"></use>
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "core-lib-iconfont"; /* Project id 2782772 */
3
- src: url('iconfont.woff2?t=1710992109527') format('woff2'),
4
- url('iconfont.woff?t=1710992109527') format('woff'),
5
- url('iconfont.ttf?t=1710992109527') format('truetype');
3
+ src: url('iconfont.woff2?t=1711971557024') format('woff2'),
4
+ url('iconfont.woff?t=1711971557024') format('woff'),
5
+ url('iconfont.ttf?t=1711971557024') format('truetype');
6
6
  }
7
7
 
8
8
  .core-lib-iconfont {
@@ -13,6 +13,10 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .n20-icon-a-yuenanyuyanqiehuan_huaban1:before {
17
+ content: "\e630";
18
+ }
19
+
16
20
  .n20-icon-yuyanqiehuan:before {
17
21
  content: "\e62f";
18
22
  }