n20-common-lib 3.2.4 → 3.2.6

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": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -51,6 +51,7 @@
51
51
  @import './view-toggle.scss';
52
52
  @import './pivot.scss';
53
53
  @import './dynamic-table.scss';
54
+ @import './dynamic-field.scss';
54
55
  @import './v3/table.scss';
55
56
  @import './v3/secondary-tab.scss';
56
57
  @import './v3/header.scss';
@@ -58,6 +59,7 @@
58
59
  @import './v3/radioCard.scss';
59
60
  @import './v3/collapse.scss';
60
61
  @import './v3/anchor.scss';
62
+ @import './info-card.scss';
61
63
 
62
64
  //临时引入
63
65
  @import '../../components/ChildRange/style.scss';
@@ -0,0 +1,86 @@
1
+ /**
2
+ * DynamicField 模块样式
3
+ * 包含 DynamicField、DynamicFormView、ContentPop、TableView 组件样式
4
+ */
5
+
6
+ /* DynamicField 表单组件样式 */
7
+ .cl-dynamic-field.vertical-form {
8
+ .el-form-item__content {
9
+ width: 100%;
10
+ .input-w {
11
+ width: 100%;
12
+ }
13
+ }
14
+
15
+ // 无标签字段隐藏
16
+ .no-label {
17
+ display: none !important;
18
+ .el-form-item__label {
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ .n20-form-expandable-pane {
24
+ container-type: inline-size;
25
+ // Anchor Item 标题容器样式
26
+ .anchor-title-wrapper {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: space-between;
30
+ gap: 16px;
31
+ width: calc(100cqw - 44px);
32
+ min-height: 40px;
33
+ }
34
+
35
+ .anchor-title-left {
36
+ flex: 0 0 auto;
37
+ display: flex;
38
+ align-items: center;
39
+ }
40
+
41
+ .anchor-title-right {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 12px;
45
+ flex: 1;
46
+ justify-content: flex-end;
47
+ }
48
+
49
+ // 块级插槽样式
50
+ .tab-block-slot {
51
+ width: 100%;
52
+ padding: 12px 0;
53
+ }
54
+
55
+ .field-block-slot {
56
+ width: 100%;
57
+ padding: 2px 0;
58
+ }
59
+
60
+ .tab-top-slot {
61
+ border-bottom: 1px solid var(--color-border-lighter, #ebeef5);
62
+ margin-bottom: 16px;
63
+ }
64
+
65
+ .tab-bottom-slot {
66
+ border-top: 1px solid var(--color-border-lighter, #ebeef5);
67
+ margin-top: 16px;
68
+ }
69
+
70
+ .field-after-index-slot {
71
+ margin-top: 16px;
72
+ padding: 12px;
73
+ background-color: var(--color-bg-light, #f5f7fa);
74
+ border-radius: 4px;
75
+ }
76
+ }
77
+ }
78
+
79
+ /* DynamicFormView 表单详情视图样式 */
80
+ .CustomFormView {
81
+ font-size: 14px;
82
+ }
83
+ /* ContentPop / TableView 弹窗内容样式 */
84
+ .contentPop {
85
+ font-size: 14px;
86
+ }
@@ -0,0 +1,168 @@
1
+ /**
2
+ * InfoCard 模块样式
3
+ * 信息卡片组件,支持折叠展开、装饰logo等
4
+ */
5
+
6
+ .info-card + .info-card {
7
+ margin-top: 8px;
8
+ }
9
+ .info-card {
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: flex-start;
13
+ position: relative;
14
+ width: 100%;
15
+ height: 100%;
16
+ padding: 12px 16px;
17
+ border-radius: 4px;
18
+ box-sizing: border-box;
19
+
20
+ // 右下角装饰logo - 相对于整个卡片定位
21
+ .corner-logo {
22
+ position: absolute;
23
+ bottom: 0;
24
+ right: -16px;
25
+ width: 120px;
26
+ height: 120px;
27
+ pointer-events: none;
28
+ z-index: 0;
29
+ }
30
+
31
+ .info-card-header {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 12px;
35
+ align-items: flex-start;
36
+ position: relative;
37
+ width: 100%;
38
+ flex-shrink: 0;
39
+ z-index: 1;
40
+
41
+ .header-left {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 4px;
45
+ position: relative;
46
+ flex-shrink: 0;
47
+
48
+ .header-logo {
49
+ width: 16px;
50
+ height: 16px;
51
+ flex-shrink: 0;
52
+ position: relative;
53
+ }
54
+
55
+ .header-title {
56
+ font-family: 'PingFang SC', 'Medium', sans-serif;
57
+ font-size: 14px;
58
+ font-weight: 500;
59
+ line-height: 22px;
60
+ color: #1d2129;
61
+ white-space: nowrap;
62
+ position: relative;
63
+ flex-shrink: 0;
64
+ }
65
+ }
66
+
67
+ .header-right {
68
+ position: absolute;
69
+ top: 0;
70
+ right: 0;
71
+ display: flex;
72
+ align-items: center;
73
+ gap: 4px;
74
+ padding: 4px;
75
+ cursor: pointer;
76
+ border-radius: 2px;
77
+ overflow: hidden;
78
+ transition: background-color 0.2s;
79
+
80
+ &:hover {
81
+ background-color: rgba(0, 122, 255, 0.06);
82
+ }
83
+
84
+ .collapse-text {
85
+ font-family: 'PingFang SC', 'Regular', sans-serif;
86
+ font-size: 14px;
87
+ font-weight: 400;
88
+ line-height: 22px;
89
+ color: #007aff;
90
+ white-space: nowrap;
91
+ }
92
+
93
+ .collapse-arrow {
94
+ width: 14px;
95
+ height: 14px;
96
+ position: relative;
97
+ flex-shrink: 0;
98
+ transition: transform 0.3s ease;
99
+
100
+ &::before,
101
+ &::after {
102
+ content: '';
103
+ position: absolute;
104
+ width: 8px;
105
+ height: 2px;
106
+ background-color: #007aff;
107
+ border-radius: 1px;
108
+ top: 50%;
109
+ left: 50%;
110
+ transition: all 0.3s ease;
111
+ }
112
+
113
+ &::before {
114
+ transform: translate(-50%, -50%) rotate(45deg);
115
+ margin-left: -2px;
116
+ }
117
+
118
+ &::after {
119
+ transform: translate(-50%, -50%) rotate(-45deg);
120
+ margin-left: 2px;
121
+ }
122
+
123
+ &.expanded {
124
+ &::before {
125
+ transform: translate(-50%, -50%) rotate(-45deg);
126
+ margin-left: -3px;
127
+ }
128
+
129
+ &::after {
130
+ transform: translate(-50%, -50%) rotate(45deg);
131
+ margin-left: 3px;
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+ .info-card-content {
139
+ display: flex;
140
+ flex-wrap: wrap;
141
+ align-items: flex-start;
142
+ position: relative;
143
+ width: 100%;
144
+ flex: 1;
145
+ z-index: 1;
146
+ }
147
+
148
+ // 折叠动画(Vue 2.6 transition 类名:无 -from/-to 后缀)
149
+ .collapse-enter-active,
150
+ .collapse-leave-active {
151
+ transition: all 0.3s ease;
152
+ overflow: hidden;
153
+ }
154
+
155
+ .collapse-enter,
156
+ .collapse-leave-to {
157
+ max-height: 0;
158
+ opacity: 0;
159
+ transform: translateY(-10px);
160
+ }
161
+
162
+ .collapse-enter-to,
163
+ .collapse-leave {
164
+ max-height: 2000px;
165
+ opacity: 1;
166
+ transform: translateY(0);
167
+ }
168
+ }
@@ -23,9 +23,10 @@
23
23
  </template>
24
24
 
25
25
  <script>
26
+ import axios from '../../utils/axios.js'
26
27
  import Dialog from '../Dialog/index.vue'
27
28
  import clUpload from '../Upload/index.vue'
28
- import axios from '../../utils/axios.js'
29
+
29
30
  let dayjs = undefined
30
31
  import('../../index.js').then((res) => {
31
32
  dayjs = res.dayjs
@@ -99,4 +100,3 @@ export default {
99
100
  }
100
101
  }
101
102
  </script>
102
- <style lang="scss" scoped></style>
@@ -340,12 +340,14 @@
340
340
 
341
341
  <script>
342
342
  import 'viewerjs/dist/viewer.css'
343
+
343
344
  import getJsonc from '../../assets/getJsonc.js'
344
345
  import axios from '../../utils/axios'
345
346
  import { $lc } from '../../utils/i18n/index'
346
347
  import importG from '../../utils/importGlobal.js'
347
348
  import { linkPush } from '../../utils/urlToGo.js'
348
349
  import Dialog from '../Dialog/index.vue'
350
+
349
351
  const ViewerImg = async function () {
350
352
  let { component } = await importG('v-viewer', () => import(/*webpackChunkName: "v-viewer"*/ 'v-viewer'))
351
353
  return component
@@ -428,6 +430,10 @@ export default {
428
430
  align: {
429
431
  type: String,
430
432
  default: 'left-right'
433
+ },
434
+ seeTypes: {
435
+ type: RegExp,
436
+ default: /\.(jpg|png|gif|svg|pdf|swf|xlsx|xls|docx|doc|txt)$/i
431
437
  }
432
438
  },
433
439
  data() {
@@ -464,7 +470,6 @@ export default {
464
470
  imgType: /\.(jpg|png1|gif|svg)$/i,
465
471
  previewName: '',
466
472
  previewSameOrg: false,
467
- seeTypes: /\.(jpg|png|gif|svg|pdf|swf|xlsx|xls|docx|doc)$/i,
468
473
  seeRow: {},
469
474
  showFlowHistory: true,
470
475
  showFlowHistoryChild: true
@@ -282,5 +282,3 @@ export default {
282
282
  }
283
283
  }
284
284
  </script>
285
-
286
- <style lang="less" scoped></style>