@donglegeyu/company-ui 1.2.9 → 1.2.11
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/dist/cjs/template-components/DetailPageTemplate/index.js +36 -41
- package/dist/cjs/template-components/DetailPageTemplate/index.scss +28 -24
- package/dist/es/template-components/DetailPageTemplate/index.js +44 -47
- package/dist/es/template-components/DetailPageTemplate/index.scss +28 -24
- package/package.json +1 -1
|
@@ -103,50 +103,45 @@ function DetailPageTemplate({
|
|
|
103
103
|
actions: titleActions
|
|
104
104
|
}
|
|
105
105
|
),
|
|
106
|
-
|
|
107
|
-
hasHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-top", children: [
|
|
108
|
-
(avatar !== void 0 || primaryName !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-identity", children: [
|
|
109
|
-
avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-avatar", children: avatar }),
|
|
110
|
-
primaryName !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-primary-name", children: primaryName })
|
|
111
|
-
] }),
|
|
112
|
-
tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-tags", children: tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_basic_components.CompanyTag, { className: tagVariantClass[tag.variant ?? "default"], children: tag.text }, index)) })
|
|
113
|
-
] }),
|
|
114
|
-
infoFields && infoFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
className: "dpt-info-fields",
|
|
118
|
-
style: { gridTemplateColumns: `repeat(${infoColumns}, minmax(0, 1fr))` },
|
|
119
|
-
children: infoFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-field-item", children: [
|
|
120
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dpt-field-label", children: [
|
|
121
|
-
field.label,
|
|
122
|
-
":"
|
|
123
|
-
] }),
|
|
124
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-field-value", children: field.value ?? "--" })
|
|
125
|
-
] }, index))
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
infoArea
|
|
129
|
-
] }),
|
|
130
|
-
showDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-divider" }),
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
132
107
|
"div",
|
|
133
108
|
{
|
|
134
|
-
className: `dpt-
|
|
109
|
+
className: `dpt-scroll${isScrolling ? " scrolling" : ""}`,
|
|
135
110
|
onScroll: handleScroll,
|
|
136
|
-
children:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
111
|
+
children: [
|
|
112
|
+
hasInfoCard && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-card", children: [
|
|
113
|
+
hasHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-top", children: [
|
|
114
|
+
(avatar !== void 0 || primaryName !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-identity", children: [
|
|
115
|
+
avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-avatar", children: avatar }),
|
|
116
|
+
primaryName !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-primary-name", children: primaryName })
|
|
117
|
+
] }),
|
|
118
|
+
tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-tags", children: tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_basic_components.CompanyTag, { className: tagVariantClass[tag.variant ?? "default"], children: tag.text }, index)) })
|
|
119
|
+
] }),
|
|
120
|
+
infoFields && infoFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-fields", children: infoFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-field-item", children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dpt-field-label", children: [
|
|
122
|
+
field.label,
|
|
123
|
+
":"
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-field-value", children: field.value ?? "--" })
|
|
126
|
+
] }, index)) }),
|
|
127
|
+
infoArea
|
|
128
|
+
] }),
|
|
129
|
+
showDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-divider" }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-container", children: tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
131
|
+
import_basic_components.CompanyTabs,
|
|
132
|
+
{
|
|
133
|
+
activeKey: activeTab,
|
|
134
|
+
onChange: handleTabChange,
|
|
135
|
+
items: tabs.map((tab) => ({
|
|
136
|
+
key: tab.key,
|
|
137
|
+
label: tab.label,
|
|
138
|
+
disabled: tab.disabled,
|
|
139
|
+
children: tab.children
|
|
140
|
+
}))
|
|
141
|
+
}
|
|
142
|
+
) : children })
|
|
143
|
+
]
|
|
149
144
|
}
|
|
150
|
-
)
|
|
145
|
+
)
|
|
151
146
|
] });
|
|
152
147
|
}
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
background: #f5f5f5;
|
|
11
11
|
|
|
12
12
|
.dpt-page-title {
|
|
13
|
-
|
|
14
|
-
top: 0;
|
|
15
|
-
z-index: 20;
|
|
13
|
+
flex-shrink: 0;
|
|
16
14
|
background: var(--ant-color-bg-container);
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -64,8 +62,10 @@
|
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
.dpt-info-fields {
|
|
67
|
-
display:
|
|
68
|
-
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
gap: 8px calc(16px + 24px);
|
|
69
69
|
|
|
70
70
|
.dpt-field-item {
|
|
71
71
|
display: flex;
|
|
@@ -127,32 +127,14 @@
|
|
|
127
127
|
color: #faad14;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.dpt-
|
|
131
|
-
height: 12px;
|
|
132
|
-
flex-shrink: 0;
|
|
133
|
-
background: #f5f5f5;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.dpt-container {
|
|
137
|
-
width: 100%;
|
|
130
|
+
.dpt-scroll {
|
|
138
131
|
flex: 1;
|
|
139
132
|
display: flex;
|
|
140
133
|
flex-direction: column;
|
|
141
|
-
flex-grow: 1;
|
|
142
|
-
align-self: stretch;
|
|
143
|
-
z-index: 3;
|
|
144
|
-
border-radius: 6px 6px 0 0;
|
|
145
|
-
background: #ffffff;
|
|
146
|
-
overflow: hidden;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.dpt-content {
|
|
150
|
-
flex: 1;
|
|
151
134
|
overflow-y: auto;
|
|
152
135
|
overflow-x: hidden;
|
|
153
136
|
scrollbar-width: thin;
|
|
154
137
|
scrollbar-color: transparent transparent;
|
|
155
|
-
padding: 0 16px 16px;
|
|
156
138
|
|
|
157
139
|
&::-webkit-scrollbar {
|
|
158
140
|
width: 6px;
|
|
@@ -174,4 +156,26 @@
|
|
|
174
156
|
background-color: rgba(0, 0, 0, 0.2);
|
|
175
157
|
}
|
|
176
158
|
}
|
|
159
|
+
|
|
160
|
+
.dpt-divider {
|
|
161
|
+
height: 12px;
|
|
162
|
+
flex-shrink: 0;
|
|
163
|
+
background: #f5f5f5;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.dpt-container {
|
|
167
|
+
width: 100%;
|
|
168
|
+
flex-grow: 1;
|
|
169
|
+
background: #ffffff;
|
|
170
|
+
border-radius: 6px 6px 0 0;
|
|
171
|
+
padding: 0 16px;
|
|
172
|
+
|
|
173
|
+
.ant-tabs-nav {
|
|
174
|
+
position: sticky;
|
|
175
|
+
top: 0;
|
|
176
|
+
z-index: 10;
|
|
177
|
+
margin: 0;
|
|
178
|
+
background: #ffffff;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
177
181
|
}
|
|
@@ -78,55 +78,52 @@ export default function DetailPageTemplate(_ref) {
|
|
|
78
78
|
onBack: onBack,
|
|
79
79
|
className: "dpt-page-title",
|
|
80
80
|
actions: titleActions
|
|
81
|
-
}),
|
|
82
|
-
className: "dpt-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
81
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
82
|
+
className: "dpt-scroll".concat(isScrolling ? ' scrolling' : ''),
|
|
83
|
+
onScroll: handleScroll,
|
|
84
|
+
children: [hasInfoCard && /*#__PURE__*/_jsxs("div", {
|
|
85
|
+
className: "dpt-info-card",
|
|
86
|
+
children: [hasHeader && /*#__PURE__*/_jsxs("div", {
|
|
87
|
+
className: "dpt-info-top",
|
|
88
|
+
children: [(avatar !== undefined || primaryName !== undefined) && /*#__PURE__*/_jsxs("div", {
|
|
89
|
+
className: "dpt-info-identity",
|
|
90
|
+
children: [avatar !== undefined && /*#__PURE__*/_jsx("div", {
|
|
91
|
+
className: "dpt-avatar",
|
|
92
|
+
children: avatar
|
|
93
|
+
}), primaryName !== undefined && /*#__PURE__*/_jsx("span", {
|
|
94
|
+
className: "dpt-primary-name",
|
|
95
|
+
children: primaryName
|
|
96
|
+
})]
|
|
97
|
+
}), tags && tags.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
98
|
+
className: "dpt-info-tags",
|
|
99
|
+
children: tags.map(function (tag, index) {
|
|
100
|
+
var _tag$variant;
|
|
101
|
+
return /*#__PURE__*/_jsx(CompanyTag, {
|
|
102
|
+
className: tagVariantClass[(_tag$variant = tag.variant) !== null && _tag$variant !== void 0 ? _tag$variant : 'default'],
|
|
103
|
+
children: tag.text
|
|
104
|
+
}, index);
|
|
105
|
+
})
|
|
93
106
|
})]
|
|
94
|
-
}),
|
|
95
|
-
className: "dpt-info-
|
|
96
|
-
children:
|
|
97
|
-
var
|
|
98
|
-
return /*#__PURE__*/
|
|
99
|
-
className:
|
|
100
|
-
children:
|
|
107
|
+
}), infoFields && infoFields.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: "dpt-info-fields",
|
|
109
|
+
children: infoFields.map(function (field, index) {
|
|
110
|
+
var _field$value;
|
|
111
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
112
|
+
className: "dpt-field-item",
|
|
113
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
114
|
+
className: "dpt-field-label",
|
|
115
|
+
children: [field.label, "\uFF1A"]
|
|
116
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
117
|
+
className: "dpt-field-value",
|
|
118
|
+
children: (_field$value = field.value) !== null && _field$value !== void 0 ? _field$value : '--'
|
|
119
|
+
})]
|
|
101
120
|
}, index);
|
|
102
121
|
})
|
|
103
|
-
})]
|
|
104
|
-
}),
|
|
105
|
-
className: "dpt-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
children: infoFields.map(function (field, index) {
|
|
110
|
-
var _field$value;
|
|
111
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
112
|
-
className: "dpt-field-item",
|
|
113
|
-
children: [/*#__PURE__*/_jsxs("span", {
|
|
114
|
-
className: "dpt-field-label",
|
|
115
|
-
children: [field.label, "\uFF1A"]
|
|
116
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
117
|
-
className: "dpt-field-value",
|
|
118
|
-
children: (_field$value = field.value) !== null && _field$value !== void 0 ? _field$value : '--'
|
|
119
|
-
})]
|
|
120
|
-
}, index);
|
|
121
|
-
})
|
|
122
|
-
}), infoArea]
|
|
123
|
-
}), showDivider && /*#__PURE__*/_jsx("div", {
|
|
124
|
-
className: "dpt-divider"
|
|
125
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
126
|
-
className: "dpt-container",
|
|
127
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
128
|
-
className: "dpt-content".concat(isScrolling ? ' scrolling' : ''),
|
|
129
|
-
onScroll: handleScroll,
|
|
122
|
+
}), infoArea]
|
|
123
|
+
}), showDivider && /*#__PURE__*/_jsx("div", {
|
|
124
|
+
className: "dpt-divider"
|
|
125
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
126
|
+
className: "dpt-container",
|
|
130
127
|
children: tabs && tabs.length > 0 ? /*#__PURE__*/_jsx(CompanyTabs, {
|
|
131
128
|
activeKey: activeTab,
|
|
132
129
|
onChange: handleTabChange,
|
|
@@ -139,7 +136,7 @@ export default function DetailPageTemplate(_ref) {
|
|
|
139
136
|
};
|
|
140
137
|
})
|
|
141
138
|
}) : children
|
|
142
|
-
})
|
|
139
|
+
})]
|
|
143
140
|
})]
|
|
144
141
|
});
|
|
145
142
|
}
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
background: #f5f5f5;
|
|
11
11
|
|
|
12
12
|
.dpt-page-title {
|
|
13
|
-
|
|
14
|
-
top: 0;
|
|
15
|
-
z-index: 20;
|
|
13
|
+
flex-shrink: 0;
|
|
16
14
|
background: var(--ant-color-bg-container);
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -64,8 +62,10 @@
|
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
.dpt-info-fields {
|
|
67
|
-
display:
|
|
68
|
-
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
gap: 8px calc(16px + 24px);
|
|
69
69
|
|
|
70
70
|
.dpt-field-item {
|
|
71
71
|
display: flex;
|
|
@@ -127,32 +127,14 @@
|
|
|
127
127
|
color: #faad14;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.dpt-
|
|
131
|
-
height: 12px;
|
|
132
|
-
flex-shrink: 0;
|
|
133
|
-
background: #f5f5f5;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.dpt-container {
|
|
137
|
-
width: 100%;
|
|
130
|
+
.dpt-scroll {
|
|
138
131
|
flex: 1;
|
|
139
132
|
display: flex;
|
|
140
133
|
flex-direction: column;
|
|
141
|
-
flex-grow: 1;
|
|
142
|
-
align-self: stretch;
|
|
143
|
-
z-index: 3;
|
|
144
|
-
border-radius: 6px 6px 0 0;
|
|
145
|
-
background: #ffffff;
|
|
146
|
-
overflow: hidden;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.dpt-content {
|
|
150
|
-
flex: 1;
|
|
151
134
|
overflow-y: auto;
|
|
152
135
|
overflow-x: hidden;
|
|
153
136
|
scrollbar-width: thin;
|
|
154
137
|
scrollbar-color: transparent transparent;
|
|
155
|
-
padding: 0 16px 16px;
|
|
156
138
|
|
|
157
139
|
&::-webkit-scrollbar {
|
|
158
140
|
width: 6px;
|
|
@@ -174,4 +156,26 @@
|
|
|
174
156
|
background-color: rgba(0, 0, 0, 0.2);
|
|
175
157
|
}
|
|
176
158
|
}
|
|
159
|
+
|
|
160
|
+
.dpt-divider {
|
|
161
|
+
height: 12px;
|
|
162
|
+
flex-shrink: 0;
|
|
163
|
+
background: #f5f5f5;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.dpt-container {
|
|
167
|
+
width: 100%;
|
|
168
|
+
flex-grow: 1;
|
|
169
|
+
background: #ffffff;
|
|
170
|
+
border-radius: 6px 6px 0 0;
|
|
171
|
+
padding: 0 16px;
|
|
172
|
+
|
|
173
|
+
.ant-tabs-nav {
|
|
174
|
+
position: sticky;
|
|
175
|
+
top: 0;
|
|
176
|
+
z-index: 10;
|
|
177
|
+
margin: 0;
|
|
178
|
+
background: #ffffff;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
177
181
|
}
|