tntd 3.1.1 → 3.1.2
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/es/prev-locale.js +199 -0
- package/es/prev-locale.js.map +1 -0
- package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form-backup/Field/Composition/index.less +114 -0
- package/es/query-form-backup/index.less +90 -0
- package/es/steps/stepStyle/icon.less +20 -11
- package/es/steps/steps.js +2 -2
- package/es/steps/steps.js.map +1 -1
- package/es/tabs/tabs.js +2 -2
- package/es/tabs/tabs.js.map +1 -1
- package/es/tntd-action_backup/index.less +114 -0
- package/es/tntd-reference/AHref/index.js +44 -0
- package/es/tntd-reference/AHref/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js +165 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +126 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceCheck/index.js +126 -0
- package/es/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceCheck/index.less +10 -0
- package/es/tntd-reference/ReferenceDrawer/index.js +93 -0
- package/es/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceInfo/index.js +164 -0
- package/es/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/es/tntd-reference/ReferenceInfo/index.less +31 -0
- package/es/tntd-reference/index.js +20 -0
- package/es/tntd-reference/index.js.map +1 -0
- package/lib/prev-locale.d.ts +174 -0
- package/lib/prev-locale.d.ts.map +1 -0
- package/lib/prev-locale.js +207 -0
- package/lib/prev-locale.js.map +1 -0
- package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form-backup/Field/Composition/index.less +114 -0
- package/lib/query-form-backup/index.less +90 -0
- package/lib/steps/stepStyle/icon.less +20 -11
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +2 -2
- package/lib/steps/steps.js.map +1 -1
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +2 -2
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tntd-action_backup/index.less +114 -0
- package/lib/tntd-reference/AHref/index.d.ts +4 -0
- package/lib/tntd-reference/AHref/index.d.ts.map +1 -0
- package/lib/tntd-reference/AHref/index.js +48 -0
- package/lib/tntd-reference/AHref/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +169 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +203 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.js +130 -0
- package/lib/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.less +10 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js +170 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.js +168 -0
- package/lib/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.less +31 -0
- package/lib/tntd-reference/index.d.ts +15 -0
- package/lib/tntd-reference/index.d.ts.map +1 -0
- package/lib/tntd-reference/index.js +24 -0
- package/lib/tntd-reference/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.zh_CN = exports.registerLocales = exports.registerLocale = exports.ko_KR = exports.getText = exports.getLanguage = exports.en_US = exports["default"] = exports.TntdLocaleContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _storage = require("./tntd-layout/storage");
|
|
9
|
+
function _typeof(o) {
|
|
10
|
+
"@babel/helpers - typeof";
|
|
11
|
+
|
|
12
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
13
|
+
return typeof o;
|
|
14
|
+
} : function (o) {
|
|
15
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
16
|
+
}, _typeof(o);
|
|
17
|
+
}
|
|
18
|
+
// 默认语言包
|
|
19
|
+
var defaultZhCN = {
|
|
20
|
+
globalNavigation: '全局导航',
|
|
21
|
+
menuSearch: '菜单搜索',
|
|
22
|
+
// QueryForm
|
|
23
|
+
search: '搜索',
|
|
24
|
+
reset: '重置',
|
|
25
|
+
moreFiltering: '更多过滤',
|
|
26
|
+
expand: '展开',
|
|
27
|
+
collapse: '收起',
|
|
28
|
+
// QueryListScene
|
|
29
|
+
totalRecords: '共%s条记录',
|
|
30
|
+
// user popover
|
|
31
|
+
nameNull: '暂无昵称',
|
|
32
|
+
personalSettings: '个人设置',
|
|
33
|
+
changePwd: '修改密码',
|
|
34
|
+
signOut: '退出',
|
|
35
|
+
// Handle
|
|
36
|
+
handleMore: '更多',
|
|
37
|
+
// Enter
|
|
38
|
+
enter: '请输入',
|
|
39
|
+
// Select
|
|
40
|
+
select: '请选择',
|
|
41
|
+
// Reference
|
|
42
|
+
onLineFail: '上线校验失败',
|
|
43
|
+
weakMsg: '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',
|
|
44
|
+
strongMsg: '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',
|
|
45
|
+
cancel: '取消',
|
|
46
|
+
next: '下一步',
|
|
47
|
+
exist: '存在',
|
|
48
|
+
strong: '强引用',
|
|
49
|
+
weak: '弱引用',
|
|
50
|
+
relationFail: '查询关联关系失败',
|
|
51
|
+
reliableQuery: '请提供一个可靠的查询请求',
|
|
52
|
+
referenceFail: '查询引用关系失败',
|
|
53
|
+
inQuery: '查询中...',
|
|
54
|
+
noData: '暂无数据',
|
|
55
|
+
viewReference: '引用关系查看',
|
|
56
|
+
all: '全选'
|
|
57
|
+
};
|
|
58
|
+
var defaultEnUS = {
|
|
59
|
+
globalNavigation: 'Global Navigation',
|
|
60
|
+
menuSearch: 'Menu Search',
|
|
61
|
+
// QueryForm
|
|
62
|
+
search: 'Search',
|
|
63
|
+
reset: 'Reset',
|
|
64
|
+
moreFiltering: 'More filtering',
|
|
65
|
+
expand: 'Expand',
|
|
66
|
+
collapse: 'Collapse',
|
|
67
|
+
// QueryListScene
|
|
68
|
+
totalRecords: 'Totally %s Record(s)',
|
|
69
|
+
// user popover
|
|
70
|
+
nameNull: 'No nickname yet',
|
|
71
|
+
personalSettings: 'Setting',
|
|
72
|
+
changePwd: 'Change password',
|
|
73
|
+
signOut: 'Sign out',
|
|
74
|
+
// Handle
|
|
75
|
+
handleMore: 'More',
|
|
76
|
+
// Enter
|
|
77
|
+
enter: 'Enter',
|
|
78
|
+
// Select
|
|
79
|
+
select: 'Select',
|
|
80
|
+
// Reference
|
|
81
|
+
onLineFail: 'On-line verification failure',
|
|
82
|
+
weakMsg: 'Caution When performing this operation, weak references exist for status components, such as offline, disabled, to be submitted/online, Import to be submitted/online, temporary, and save',
|
|
83
|
+
strongMsg: 'A strong reference relationship exists (referenced by status components such as online, enabled, online and offline approval, and indicator initialization). Therefore, no operation is allowed',
|
|
84
|
+
cancel: 'Cancel',
|
|
85
|
+
next: 'Next',
|
|
86
|
+
exist: 'Exist',
|
|
87
|
+
strong: 'Strong',
|
|
88
|
+
weak: 'Weak',
|
|
89
|
+
relationFail: 'Description Failed to query the association relationship',
|
|
90
|
+
reliableQuery: 'Please provide a reliable query request',
|
|
91
|
+
referenceFail: 'Description Failed to query the reference relationship',
|
|
92
|
+
inQuery: 'In query...',
|
|
93
|
+
noData: 'No data',
|
|
94
|
+
viewReference: 'Reference relationship viewing',
|
|
95
|
+
all: 'all'
|
|
96
|
+
};
|
|
97
|
+
var defaultKoKR = {
|
|
98
|
+
globalNavigation: '전역 내비게이션',
|
|
99
|
+
menuSearch: '메뉴 검색',
|
|
100
|
+
// QueryForm
|
|
101
|
+
search: '검색',
|
|
102
|
+
reset: '재설정',
|
|
103
|
+
moreFiltering: '더 많은 필터링',
|
|
104
|
+
expand: '확장',
|
|
105
|
+
collapse: '축소',
|
|
106
|
+
// QueryListScene
|
|
107
|
+
totalRecords: '총 %s개 레코드',
|
|
108
|
+
// user popover
|
|
109
|
+
nameNull: '아직 닉네임이 없습니다',
|
|
110
|
+
personalSettings: '개인 설정',
|
|
111
|
+
changePwd: '비밀번호 변경',
|
|
112
|
+
signOut: '로그아웃',
|
|
113
|
+
// Handle
|
|
114
|
+
handleMore: '더보기',
|
|
115
|
+
// Enter
|
|
116
|
+
enter: '입력하세요',
|
|
117
|
+
// Select
|
|
118
|
+
select: '선택하세요',
|
|
119
|
+
// Reference
|
|
120
|
+
onLineFail: '온라인 확인 실패',
|
|
121
|
+
weakMsg: '약한 참조(오프라인, 비활성화, 제출/온라인 대기, 가져오기 제출/온라인 대기, 임시, 저장 등 관련 상태 구성 요소 참조)가 존재합니다. 신중하게 작업하세요',
|
|
122
|
+
strongMsg: '강한 참조 관계(온라인, 활성화, 온라인 및 오프라인 승인 및 지표 초기화 등 관련 상태 구성 요소에서 참조)가 존재합니다. 작업이 금지됩니다',
|
|
123
|
+
cancel: '취소',
|
|
124
|
+
next: '다음',
|
|
125
|
+
exist: '존재',
|
|
126
|
+
strong: '강함',
|
|
127
|
+
weak: '약함',
|
|
128
|
+
relationFail: '연관 관계 조회 실패',
|
|
129
|
+
reliableQuery: '신뢰할 수 있는 조회 요청을 제공하세요',
|
|
130
|
+
referenceFail: '참조 관계 조회 실패',
|
|
131
|
+
inQuery: '조회 중...',
|
|
132
|
+
noData: '데이터 없음',
|
|
133
|
+
viewReference: '참조 관계 보기',
|
|
134
|
+
all: '전체'
|
|
135
|
+
};
|
|
136
|
+
// 存储合并后的语言包(外部传入会覆盖默认值)
|
|
137
|
+
var localeStore = {
|
|
138
|
+
cn: Object.assign({}, defaultZhCN),
|
|
139
|
+
en: Object.assign({}, defaultEnUS),
|
|
140
|
+
ko: Object.assign({}, defaultKoKR)
|
|
141
|
+
};
|
|
142
|
+
// 导出当前语言包(兼容旧用法)
|
|
143
|
+
var zh_CN = exports.zh_CN = localeStore.cn;
|
|
144
|
+
var en_US = exports.en_US = localeStore.en;
|
|
145
|
+
var ko_KR = exports.ko_KR = localeStore.ko;
|
|
146
|
+
/**
|
|
147
|
+
* TntdLocale Context
|
|
148
|
+
* 用于通过 ConfigProvider 传递自定义语言包
|
|
149
|
+
*/
|
|
150
|
+
var TntdLocaleContext = exports.TntdLocaleContext = (0, _react.createContext)(null);
|
|
151
|
+
/**
|
|
152
|
+
* 获取文案(优先从 Context 获取,其次从 localeStore 获取)
|
|
153
|
+
* 如果当前语言包中找不到对应 key,则回退到中文
|
|
154
|
+
*/
|
|
155
|
+
var getText = exports.getText = function getText(key) {
|
|
156
|
+
var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getLanguage();
|
|
157
|
+
var _a, _b;
|
|
158
|
+
var messages = localeStore[language] || localeStore.cn;
|
|
159
|
+
// 如果当前语言包中找不到 key,回退到中文
|
|
160
|
+
var text = (_a = messages === null || messages === void 0 ? void 0 : messages[key]) !== null && _a !== void 0 ? _a : (_b = localeStore.cn) === null || _b === void 0 ? void 0 : _b[key];
|
|
161
|
+
for (var _len = arguments.length, params = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
162
|
+
params[_key - 2] = arguments[_key];
|
|
163
|
+
}
|
|
164
|
+
if ((params === null || params === void 0 ? void 0 : params.length) && text) {
|
|
165
|
+
return params.reduce(function (acc, cur) {
|
|
166
|
+
return acc.replace(/%s/, cur);
|
|
167
|
+
}, text);
|
|
168
|
+
}
|
|
169
|
+
return text;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* 注册/覆盖整个语言包
|
|
173
|
+
* @param {string} langKey - 语言标识,如 'cn', 'en', 'ko', 'ja' 等
|
|
174
|
+
* @param {object} messages - 语言包对象
|
|
175
|
+
* @param {boolean} merge - 是否与现有语言包合并,默认 true;false 则完全覆盖
|
|
176
|
+
*/
|
|
177
|
+
var registerLocale = exports.registerLocale = function registerLocale(langKey, messages) {
|
|
178
|
+
var merge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
179
|
+
if (!langKey || _typeof(messages) !== 'object') return;
|
|
180
|
+
if (merge && localeStore[langKey]) {
|
|
181
|
+
localeStore[langKey] = Object.assign(Object.assign({}, localeStore[langKey]), messages);
|
|
182
|
+
} else {
|
|
183
|
+
localeStore[langKey] = Object.assign({}, messages);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* 批量注册多个语言包
|
|
188
|
+
* @param {object} locales - { cn: {...}, en: {...}, ja: {...} }
|
|
189
|
+
* @param {boolean} merge - 是否合并
|
|
190
|
+
*/
|
|
191
|
+
var registerLocales = exports.registerLocales = function registerLocales(locales) {
|
|
192
|
+
var merge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
193
|
+
if (_typeof(locales) !== 'object') return;
|
|
194
|
+
Object.keys(locales).forEach(function (langKey) {
|
|
195
|
+
registerLocale(langKey, locales[langKey], merge);
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
var getLanguage = exports.getLanguage = function getLanguage() {
|
|
199
|
+
return (0, _storage.getLanguageStore)() || 'cn';
|
|
200
|
+
};
|
|
201
|
+
var _default = exports["default"] = {
|
|
202
|
+
registerLocale: registerLocale,
|
|
203
|
+
registerLocales: registerLocales,
|
|
204
|
+
getLanguage: getLanguage,
|
|
205
|
+
TntdLocaleContext: TntdLocaleContext,
|
|
206
|
+
getText: getText
|
|
207
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prev-locale.js","sourceRoot":"","sources":["../src/prev-locale.js"],"names":[],"mappings":";;;AAAA,iCAAsC;AACtC,mDAAyD;AAEzD,QAAQ;AACR,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,MAAM;IACxB,UAAU,EAAE,MAAM;IAElB,YAAY;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IAEd,iBAAiB;IACjB,YAAY,EAAE,QAAQ;IAEtB,eAAe;IACf,QAAQ,EAAE,MAAM;IAChB,gBAAgB,EAAE,MAAM;IACxB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,IAAI;IAEb,SAAS;IACT,UAAU,EAAE,IAAI;IAEhB,QAAQ;IACR,KAAK,EAAE,KAAK;IAEZ,SAAS;IACT,MAAM,EAAE,KAAK;IAEb,c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E;IACvD,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO;IAExC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACvC,IAAA,sBAAc,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B;AAGK,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,IAAA,0BAAgB,GAAE,IAAI,IAAI,CAAC;AAA/C,QAAA,WAAW,eAAoC;AAE5D,kBAAe;IACb,cAAc,EAAd,sBAAc;IACd,eAAe,EAAf,uBAAe;IACf,WAAW,EAAX,mBAAW;IACX,iBAAiB,EAAjB,yBAAiB;IACjB,OAAO,EAAP,eAAO;CACR,CAAC","sourcesContent":["import { createContext } from 'react';\nimport { getLanguageStore } from './tntd-layout/storage';\n\n// 默认语言包\nconst defaultZhCN = {\n globalNavigation: '全局导航',\n menuSearch: '菜单搜索',\n\n // QueryForm\n search: '搜索',\n reset: '重置',\n moreFiltering: '更多过滤',\n expand: '展开',\n collapse: '收起',\n\n // QueryListScene\n totalRecords: '共%s条记录',\n\n // user popover\n nameNull: '暂无昵称',\n personalSettings: '个人设置',\n changePwd: '修改密码',\n signOut: '退出',\n\n // Handle\n handleMore: '更多',\n\n // Enter\n enter: '请输入',\n\n // Select\n select: '请选择',\n\n // Reference\n onLineFail: '上线校验失败',\n weakMsg:\n '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',\n strongMsg:\n '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',\n cancel: '取消',\n next: '下一步',\n exist: '存在',\n strong: '强引用',\n weak: '弱引用',\n relationFail: '查询关联关系失败',\n reliableQuery: '请提供一个可靠的查询请求',\n referenceFail: '查询引用关系失败',\n inQuery: '查询中...',\n noData: '暂无数据',\n viewReference: '引用关系查看',\n all: '全选',\n};\n\nconst defaultEnUS = {\n globalNavigation: 'Global Navigation',\n menuSearch: 'Menu Search',\n\n // QueryForm\n search: 'Search',\n reset: 'Reset',\n moreFiltering: 'More filtering',\n expand: 'Expand',\n collapse: 'Collapse',\n\n // QueryListScene\n totalRecords: 'Totally %s Record(s)',\n\n // user popover\n nameNull: 'No nickname yet',\n personalSettings: 'Setting',\n changePwd: 'Change password',\n signOut: 'Sign out',\n\n // Handle\n handleMore: 'More',\n\n // Enter\n enter: 'Enter',\n // Select\n select: 'Select',\n\n // Reference\n onLineFail: 'On-line verification failure',\n weakMsg:\n 'Caution When performing this operation, weak references exist for status components, such as offline, disabled, to be submitted/online, Import to be submitted/online, temporary, and save',\n strongMsg:\n 'A strong reference relationship exists (referenced by status components such as online, enabled, online and offline approval, and indicator initialization). Therefore, no operation is allowed',\n cancel: 'Cancel',\n next: 'Next',\n exist: 'Exist',\n strong: 'Strong',\n weak: 'Weak',\n relationFail: 'Description Failed to query the association relationship',\n reliableQuery: 'Please provide a reliable query request',\n referenceFail: 'Description Failed to query the reference relationship',\n inQuery: 'In query...',\n noData: 'No data',\n viewReference: 'Reference relationship viewing',\n all: 'all',\n};\n\nconst defaultKoKR = {\n globalNavigation: '전역 내비게이션',\n menuSearch: '메뉴 검색',\n\n // QueryForm\n search: '검색',\n reset: '재설정',\n moreFiltering: '더 많은 필터링',\n expand: '확장',\n collapse: '축소',\n\n // QueryListScene\n totalRecords: '총 %s개 레코드',\n\n // user popover\n nameNull: '아직 닉네임이 없습니다',\n personalSettings: '개인 설정',\n changePwd: '비밀번호 변경',\n signOut: '로그아웃',\n\n // Handle\n handleMore: '더보기',\n\n // Enter\n enter: '입력하세요',\n\n // Select\n select: '선택하세요',\n\n // Reference\n onLineFail: '온라인 확인 실패',\n weakMsg:\n '약한 참조(오프라인, 비활성화, 제출/온라인 대기, 가져오기 제출/온라인 대기, 임시, 저장 등 관련 상태 구성 요소 참조)가 존재합니다. 신중하게 작업하세요',\n strongMsg:\n '강한 참조 관계(온라인, 활성화, 온라인 및 오프라인 승인 및 지표 초기화 등 관련 상태 구성 요소에서 참조)가 존재합니다. 작업이 금지됩니다',\n cancel: '취소',\n next: '다음',\n exist: '존재',\n strong: '강함',\n weak: '약함',\n relationFail: '연관 관계 조회 실패',\n reliableQuery: '신뢰할 수 있는 조회 요청을 제공하세요',\n referenceFail: '참조 관계 조회 실패',\n inQuery: '조회 중...',\n noData: '데이터 없음',\n viewReference: '참조 관계 보기',\n all: '전체',\n};\n\n// 存储合并后的语言包(外部传入会覆盖默认值)\nconst localeStore = {\n cn: { ...defaultZhCN },\n en: { ...defaultEnUS },\n ko: { ...defaultKoKR },\n};\n\n// 导出当前语言包(兼容旧用法)\nexport const zh_CN = localeStore.cn;\nexport const en_US = localeStore.en;\nexport const ko_KR = localeStore.ko;\n\n/**\n * TntdLocale Context\n * 用于通过 ConfigProvider 传递自定义语言包\n */\nexport const TntdLocaleContext = createContext(null);\n\n/**\n * 获取文案(优先从 Context 获取,其次从 localeStore 获取)\n * 如果当前语言包中找不到对应 key,则回退到中文\n */\nexport const getText = (key, language = getLanguage(), ...params) => {\n const messages = localeStore[language] || localeStore.cn;\n // 如果当前语言包中找不到 key,回退到中文\n const text = messages?.[key] ?? localeStore.cn?.[key];\n\n if (params?.length && text) {\n return params.reduce((acc, cur) => {\n return acc.replace(/%s/, cur);\n }, text);\n }\n\n return text;\n};\n/**\n * 注册/覆盖整个语言包\n * @param {string} langKey - 语言标识,如 'cn', 'en', 'ko', 'ja' 等\n * @param {object} messages - 语言包对象\n * @param {boolean} merge - 是否与现有语言包合并,默认 true;false 则完全覆盖\n */\nexport const registerLocale = (langKey, messages, merge = true) => {\n if (!langKey || typeof messages !== 'object') return;\n\n if (merge && localeStore[langKey]) {\n localeStore[langKey] = { ...localeStore[langKey], ...messages };\n } else {\n localeStore[langKey] = { ...messages };\n }\n};\n\n/**\n * 批量注册多个语言包\n * @param {object} locales - { cn: {...}, en: {...}, ja: {...} }\n * @param {boolean} merge - 是否合并\n */\nexport const registerLocales = (locales, merge = true) => {\n if (typeof locales !== 'object') return;\n\n Object.keys(locales).forEach((langKey) => {\n registerLocale(langKey, locales[langKey], merge);\n });\n};\n\n\nexport const getLanguage = () => getLanguageStore() || 'cn';\n\nexport default {\n registerLocale,\n registerLocales,\n getLanguage,\n TntdLocaleContext,\n getText\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.tnt-queryform-field-popover {
|
|
2
|
+
min-width: 280px;
|
|
3
|
+
.ant-popover-inner-content {
|
|
4
|
+
padding: @padding-sm 0;
|
|
5
|
+
}
|
|
6
|
+
.ant-calendar-picker {
|
|
7
|
+
margin: @margin-xxs 0;
|
|
8
|
+
}
|
|
9
|
+
label {
|
|
10
|
+
color: tint(@text-color, 50%);
|
|
11
|
+
margin-bottom: @margin-xs;
|
|
12
|
+
display: block;
|
|
13
|
+
padding: 0 @padding-sm;
|
|
14
|
+
}
|
|
15
|
+
.ant-select-dropdown-menu {
|
|
16
|
+
&-item {
|
|
17
|
+
padding: @padding-xxs @padding-sm;
|
|
18
|
+
&:hover {
|
|
19
|
+
background-color: @bg-color-quaternary;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&-content {
|
|
24
|
+
padding: @padding-xxs @padding-sm;
|
|
25
|
+
}
|
|
26
|
+
.ant-select-selected-icon {
|
|
27
|
+
position: absolute;
|
|
28
|
+
right: @margin-base;
|
|
29
|
+
top: @margin-xs;
|
|
30
|
+
color: @blue-6;
|
|
31
|
+
}
|
|
32
|
+
.tnt-highlight {
|
|
33
|
+
color: @blue-6;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@import '../../../style/themes/index';
|
|
2
|
+
@import '../../../style/mixins/index';
|
|
3
|
+
@import '../../../input/style/mixin';
|
|
4
|
+
|
|
5
|
+
.tnt-queryform-composition-input {
|
|
6
|
+
// width: 100%;
|
|
7
|
+
max-height: 162px;
|
|
8
|
+
overflow-x: hidden;
|
|
9
|
+
cursor: text;
|
|
10
|
+
padding: 2px @padding-xl;
|
|
11
|
+
position: relative;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
background-color: @select-background;
|
|
14
|
+
border: @border-width-base @border-style-base @select-border-color;
|
|
15
|
+
border-top-width: calc(@border-width-base + 0.02px);
|
|
16
|
+
border-radius: @border-radius-base;
|
|
17
|
+
outline: none;
|
|
18
|
+
transition: all 0.3s @ease-in-out;
|
|
19
|
+
user-select: none;
|
|
20
|
+
margin-bottom: @margin-sm;
|
|
21
|
+
|
|
22
|
+
&-prefix {
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: @padding-sm;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
|
+
i.anticon {
|
|
28
|
+
color: tint(@bg-color-spotilight, 50%);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-width {
|
|
33
|
+
height: 0;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
width: auto;
|
|
36
|
+
position: absolute;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-items {
|
|
41
|
+
float: left;
|
|
42
|
+
padding: 0;
|
|
43
|
+
list-style: none;
|
|
44
|
+
margin: 0;
|
|
45
|
+
width: 100%;
|
|
46
|
+
&-item {
|
|
47
|
+
padding: 3px 0;
|
|
48
|
+
}
|
|
49
|
+
li {
|
|
50
|
+
float: left;
|
|
51
|
+
line-height: 1;
|
|
52
|
+
}
|
|
53
|
+
&-input {
|
|
54
|
+
.inputClass {
|
|
55
|
+
background: none;
|
|
56
|
+
border: none !important;
|
|
57
|
+
outline: none;
|
|
58
|
+
box-shadow: none !important;
|
|
59
|
+
width: 150px !important;
|
|
60
|
+
height: 26px;
|
|
61
|
+
line-height: 26px;
|
|
62
|
+
padding: 0;
|
|
63
|
+
input {
|
|
64
|
+
border: none !important;
|
|
65
|
+
outline: none !important;
|
|
66
|
+
box-shadow: none !important;
|
|
67
|
+
height: 26px;
|
|
68
|
+
line-height: 26px;
|
|
69
|
+
padding: 0;
|
|
70
|
+
}
|
|
71
|
+
textarea {
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.inputClass-with-placeholder {
|
|
76
|
+
min-width: 398px !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
&-clear {
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: @margin-sm;
|
|
83
|
+
top: 50%;
|
|
84
|
+
transform: translateY(-50%);
|
|
85
|
+
display: none;
|
|
86
|
+
i.anticon {
|
|
87
|
+
color: tint(@bg-color-spotilight, 50%);
|
|
88
|
+
}
|
|
89
|
+
&:hover {
|
|
90
|
+
.anticon {
|
|
91
|
+
color: @text-color-secondary !important;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
&:hover {
|
|
96
|
+
border-color: @blue-6;
|
|
97
|
+
outline: 0;
|
|
98
|
+
.tnt-queryform-composition-input-clear {
|
|
99
|
+
display: block;
|
|
100
|
+
}
|
|
101
|
+
// box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
|
|
102
|
+
}
|
|
103
|
+
&:focus,
|
|
104
|
+
&:active {
|
|
105
|
+
border-color: @blue-5;
|
|
106
|
+
outline: 0;
|
|
107
|
+
// box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
|
|
108
|
+
}
|
|
109
|
+
.ant-tag {
|
|
110
|
+
padding: 0 @padding-xs;
|
|
111
|
+
border: none;
|
|
112
|
+
background: @fill-color-tertiary;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.tnt-queryform {
|
|
2
|
+
&-top {
|
|
3
|
+
display: flex;
|
|
4
|
+
&-body {
|
|
5
|
+
flex: 1;
|
|
6
|
+
.ant-btn {
|
|
7
|
+
margin-right: 10px;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-extra {
|
|
13
|
+
& > * {
|
|
14
|
+
margin-left: 10px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-form {
|
|
19
|
+
// margin-bottom: @margin-sm;
|
|
20
|
+
&.ant-form-inline {
|
|
21
|
+
flex-wrap: unset;
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.ant-form-inline .ant-form-item {
|
|
26
|
+
margin-right: 10px;
|
|
27
|
+
margin-bottom: @margin-sm;
|
|
28
|
+
display: inline-block;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ant-form-item-control {
|
|
32
|
+
// min-width: 160px;
|
|
33
|
+
line-height: unset;
|
|
34
|
+
.ant-calendar-picker-input {
|
|
35
|
+
padding: 0 @padding-sm;
|
|
36
|
+
}
|
|
37
|
+
.ant-form-item-children {
|
|
38
|
+
& > .ant-input,
|
|
39
|
+
& > .ant-input-affix-wrapper {
|
|
40
|
+
width: 160px;
|
|
41
|
+
// width: 200px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&-drawer {
|
|
48
|
+
margin-top: @margin-xxl;
|
|
49
|
+
&.large-size {
|
|
50
|
+
margin-top: 60px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.ant-drawer.ant-drawer-open {
|
|
54
|
+
.ant-drawer-mask {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
background: unset;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.ant-drawer-body {
|
|
60
|
+
.ant-form-item {
|
|
61
|
+
display: block;
|
|
62
|
+
margin-right: 0;
|
|
63
|
+
margin-bottom: @margin-md;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
.ant-form-item-label {
|
|
67
|
+
display: block;
|
|
68
|
+
text-align: left;
|
|
69
|
+
line-height: 22px;
|
|
70
|
+
margin-bottom: 10px;
|
|
71
|
+
}
|
|
72
|
+
.ant-form-item-control-wrapper,
|
|
73
|
+
.ant-form-item-control,
|
|
74
|
+
.ant-calendar-picker,
|
|
75
|
+
.ant-input {
|
|
76
|
+
min-width: 100%;
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
& > .ant-btn {
|
|
81
|
+
display: block;
|
|
82
|
+
width: 100%;
|
|
83
|
+
margin-bottom: 10px;
|
|
84
|
+
&.ant-btn-primary {
|
|
85
|
+
margin-top: @margin-md;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
.@{tnt-steps-cls}:not(.@{steps-prefix-cls}-dot).@{steps-prefix-cls}{
|
|
2
2
|
.@{steps-prefix-cls}-item{
|
|
3
3
|
&-icon{
|
|
4
|
-
border: none;
|
|
5
4
|
font-weight: 500;
|
|
5
|
+
border-width: 0;
|
|
6
6
|
margin: 2px 12px 2px 0;
|
|
7
7
|
width: @td-steps-icon-size;
|
|
8
8
|
height: @td-steps-icon-size;
|
|
9
9
|
line-height: @td-steps-icon-size;
|
|
10
10
|
border-radius:@td-steps-icon-size;
|
|
11
11
|
>.@{steps-prefix-cls}-icon{
|
|
12
|
-
top:0;
|
|
13
12
|
i{
|
|
14
13
|
font-size: @td-steps-icon-size;
|
|
15
14
|
font-weight: normal;
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
&-
|
|
20
|
-
&-error.@{step-prefix-cls}-default-icon {
|
|
18
|
+
&-wait.@{step-prefix-cls}-default-icon {
|
|
21
19
|
.@{steps-prefix-cls}-item-icon {
|
|
22
|
-
background-color:
|
|
20
|
+
background-color: @fill-color-tertiary;
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
|
-
|
|
26
|
-
&-
|
|
23
|
+
&-finish.@{step-prefix-cls}-default-icon,
|
|
24
|
+
&-error.@{step-prefix-cls}-default-icon {
|
|
27
25
|
.@{steps-prefix-cls}-item-icon {
|
|
28
|
-
|
|
26
|
+
line-height:calc(@td-steps-icon-size - 1px);
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
border-width:1px;
|
|
29
|
+
i{
|
|
30
|
+
font-size: calc(@td-steps-icon-size / 2);
|
|
31
|
+
}
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
35
|
&-small {
|
|
36
36
|
.@{steps-prefix-cls}-item{
|
|
37
37
|
&-icon{
|
|
@@ -45,6 +45,15 @@
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
&-finish.@{step-prefix-cls}-default-icon,
|
|
49
|
+
&-error.@{step-prefix-cls}-default-icon {
|
|
50
|
+
.@{steps-prefix-cls}-item-icon {
|
|
51
|
+
line-height:calc(@td-steps-small-icon-size - 1px);
|
|
52
|
+
i{
|
|
53
|
+
font-size: calc(@td-steps-small-icon-size / 2);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
}
|
|
49
58
|
}
|
|
50
59
|
}
|
package/lib/steps/steps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,cAAc,eAAe,CAAA;AAE7B,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACpC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;CAC5C;AACD,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,IAAI,EACJ,cAAqB,EACrB,cAAc,EACd,GAAG,IAAI,EACR,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,cAAc,eAAe,CAAA;AAE7B,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IACpC,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;CAC5C;AACD,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,IAAI,EACJ,cAAqB,EACrB,cAAc,EACd,GAAG,IAAI,EACR,EAAE,UAAU,qBAiCZ;yBAvCe,KAAK"}
|
package/lib/steps/steps.js
CHANGED
|
@@ -109,11 +109,11 @@ function Steps(_a) {
|
|
|
109
109
|
iconsInfo = {
|
|
110
110
|
icons: {
|
|
111
111
|
finish: _react["default"].createElement(_icon["default"], {
|
|
112
|
-
type:
|
|
112
|
+
type: "check",
|
|
113
113
|
className: "".concat(prefixCls, "-finish-icon")
|
|
114
114
|
}),
|
|
115
115
|
error: _react["default"].createElement(_icon["default"], {
|
|
116
|
-
type: "close
|
|
116
|
+
type: "close",
|
|
117
117
|
className: "".concat(prefixCls, "-error-icon")
|
|
118
118
|
})
|
|
119
119
|
}
|
package/lib/steps/steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,4DAAmC;AACnC,kDAAyB;AACzB,mDAA0B;AAC1B,2DAAkC;AAElC,wDAAmD;AACnD,0DAAoD;AAEpD,gDAA6B;AAW7B,SAAgB,KAAK,CAAC,EAMT;QANS,EACpB,SAAS,EACT,IAAI,EACJ,cAAc,GAAG,IAAI,EACrB,cAAc,OAEH,EADR,IAAI,cALa,yDAMrB,CADQ;IAEP,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;QACvC,MAAM,OAAO,GAAG,CAAC,cAAc,IAAI,cAAc,KAAK,YAAY,CAAA;QAElE,IAAI,SAAS,GAAW,EAAE,CAAA;QAC1B,IAAI,OAAO,EAAE;YACX,SAAS,GAAG;gBACV,KAAK,EAAE;oBACL,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,4DAAmC;AACnC,kDAAyB;AACzB,mDAA0B;AAC1B,2DAAkC;AAElC,wDAAmD;AACnD,0DAAoD;AAEpD,gDAA6B;AAW7B,SAAgB,KAAK,CAAC,EAMT;QANS,EACpB,SAAS,EACT,IAAI,EACJ,cAAc,GAAG,IAAI,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AC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,MAAM,SAAS,GAAG;YAChB,KAAK;YACL,QAAQ;SACT,CAAA;QAED,IAAI,aAAa,EAAE;YACjB,SAAS,CAAC,KAAK,GAAG,CAChB,8BAAC,kBAAQ,IACP,MAAM,EACJ,8BAAC,kBAAQ,IACP,UAAU,EAAC,KAAK,EAChB,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,GAAG,SAAS,oBAAoB,GAC3C,EAEJ,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;YACD,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;SAC1B;QAED,OAAO,CACL,8BAAC,eAAS,CAAC,IAAI,kBACb,SAAS,EAAE,IAAA,oBAAU,EAAC,UAAU,EAAE,SAAS,EAAE;gBAC3C,CAAC,GAAG,SAAS,eAAe,CAAC,EAAE,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA;aAC3C,CAAC,IACE,IAAI,EACJ,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2026-01-20 18:48:00\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2026-01-21 09:30:35\n * @FilePath: /tntd3/packages/tntd/src/steps/steps.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { StepsProps as AntdStepsProps } from 'antd/lib/steps'\nimport type { StepProps as AntdStepProps } from 'antd/lib/steps'\nimport classNames from 'classnames'\nimport React from 'react'\nimport Icon from '../icon'\nimport Ellipsis from '../ellipsis'\n\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdSteps } from 'antd/lib/steps'\n\nexport * from 'antd/lib/steps'\n\nexport interface StepsProps extends AntdStepsProps {\n showBackground?: boolean\n children?: Array<React.ReactElement>\n icons?: { finish: Element; error: Element }\n}\nexport interface StepProps extends AntdStepProps {\n titleEllipsis?: boolean\n}\n\nexport function Steps({\n className,\n size,\n showBackground = true,\n labelPlacement,\n ...rest\n}: StepsProps) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('steps')\n const tdSteps = !labelPlacement || labelPlacement === 'horizontal'\n\n let iconsInfo: object = {}\n if (tdSteps) {\n iconsInfo = {\n icons: {\n finish: <Icon type=\"check\" className={`${prefixCls}-finish-icon`} />,\n error: <Icon type=\"close\" className={`${prefixCls}-error-icon`} />,\n },\n }\n }\n\n return (\n <AntdSteps\n className={classNames(className, {\n ['tnt-steps']: tdSteps,\n [`${prefixCls}-background`]:\n (!rest?.direction || rest?.direction === 'horizontal') && showBackground, // 水平方向的才支持背景图\n })}\n {...iconsInfo}\n size={size}\n labelPlacement={labelPlacement}\n {...rest}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nSteps.Step = function ({ className, title, subTitle, titleEllipsis = true, ...rest }: StepProps) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('step')\n const stepTitle = {\n title,\n subTitle,\n }\n\n if (titleEllipsis) {\n stepTitle.title = (\n <Ellipsis\n suffix={\n <Ellipsis\n widthLimit=\"30%\"\n title={subTitle}\n className={`${prefixCls}-ellipsis-subtitle`}\n />\n }\n title={title}\n />\n )\n stepTitle.subTitle = null\n }\n\n return (\n <AntdSteps.Step\n className={classNames('tnt-step', className, {\n [`${prefixCls}-default-icon`]: !rest?.icon,\n })}\n {...rest}\n {...stepTitle}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
|
package/lib/tabs/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src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D;AAED,UAAU,aACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAClF,OAAO,EAAE,OAAO,QAAQ,CAAC,OAAO,CAAA;CACjC;AA8BD,eAAO,MAAM,IAAI,eAmDC,CAAA"}
|
package/lib/tabs/tabs.js
CHANGED
|
@@ -97,7 +97,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
97
97
|
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
98
98
|
* @Date: 2023-10-16 11:08:28
|
|
99
99
|
* @LastEditors: 郑泳健
|
|
100
|
-
* @LastEditTime: 2026-01-
|
|
100
|
+
* @LastEditTime: 2026-01-22 20:10:07
|
|
101
101
|
* @FilePath: /tntd/packages/tntd/src/tabs/tabs.tsx
|
|
102
102
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
103
103
|
*/
|
|
@@ -140,7 +140,7 @@ var Tabs = exports.Tabs = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
140
140
|
}, [type]);
|
|
141
141
|
(0, _react.useEffect)(function () {
|
|
142
142
|
if (type === 'ladder-card') {
|
|
143
|
-
var boxes = document.querySelectorAll('.ant-tabs-ladder-card .ant-tabs-nav .ant-tabs-tab');
|
|
143
|
+
var boxes = document.querySelectorAll('.ant-tabs-ladder-card .ant-tabs-nav .ant-tabs-tab') || document.querySelectorAll('.ant-tabs-ladder-card .ant-tabs-nav-scroll .ant-tabs-tab');
|
|
144
144
|
boxes.forEach(function (box, index) {
|
|
145
145
|
box.style.zIndex = boxes.length - index;
|
|
146
146
|
});
|
package/lib/tabs/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/tabs/tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;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CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IAEV,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;QACnC,MAAM,SAAS,GAAG,IAAA,oBAAS,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE;YAC3C,UAAU,EAAE,IAAI;YAChB,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,sBAAsB;SACrF,CAAC,CAAA;QAEF,OAAO,CACL,8BAAC,wBAAc,IAAC,aAAa,EAAC,MAAM,IACjC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YACtB,OAAO,CACL,8BAAC,cAAQ,oBACH,IAAI,IACR,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,EAC/D,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAmB,EACzB,SAAS,EAAE,SAAS,IACpB,CACH,CAAA;QACH,CAAC,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACe,CAAA;AAElB,YAAI,CAAC,OAAO,GAAG,cAAQ,CAAC,OAAO,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-10-16 11:08:28\n * @LastEditors: 郑泳健\n * @LastEditTime: 2026-01-22 20:10:07\n * @FilePath: /tntd/packages/tntd/src/tabs/tabs.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef, useMemo, useEffect } from 'react'\nimport type { TabsProps as AntdTabsProps, TabsType } from 'antd/lib/tabs'\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdTabs } from 'antd/lib/tabs'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport { doUpperTitle } from '../utils'\nimport classname from 'classnames'\nexport * from 'antd/lib/tabs'\nexport interface TabsProps extends Omit<AntdTabsProps, 'type'> {\n children?: Array<React.ReactElement>\n upperCaseIgnore?: Array<string>\n type?: TabsType | 'ladder-card' | 'editable-ladder-card'\n}\n\ninterface TabsComponent\n extends React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<AntdTabs>> {\n TabPane: typeof AntdTabs.TabPane\n}\n\nconst getNewChildren = (\n children: any,\n upperCaseIgnore: string[] | undefined,\n localeCode: string | undefined\n) => {\n let newChildren: string | React.ReactNode = children\n if (Array.isArray(newChildren)) {\n newChildren = newChildren?.map((child: string | React.ReactNode) => {\n if (React.isValidElement(child)) {\n const upperIgnore: boolean = child?.props?.upperIgnore\n const tab: string | React.ReactNode = child?.props?.tab\n return {\n ...child,\n props: {\n ...child?.props,\n tab: upperIgnore ? tab : doUpperTitle(tab, upperCaseIgnore, localeCode),\n },\n }\n }\n if (typeof child === 'string') {\n return doUpperTitle(child, upperCaseIgnore, localeCode)\n }\n return child\n })\n }\n return newChildren\n}\n\nexport const Tabs = forwardRef<AntdTabs, TabsProps>(\n ({ children, upperCaseIgnore, type, ...rest }, ref) => {\n const newType = useMemo(() => {\n let newType = type\n if (type === 'ladder-card') {\n newType = 'card'\n } else if (type === 'editable-ladder-card') {\n newType = 'editable-card'\n }\n return newType\n }, [type])\n\n useEffect(() => {\n if (type === 'ladder-card') {\n const boxes =\n document.querySelectorAll('.ant-tabs-ladder-card .ant-tabs-nav .ant-tabs-tab') ||\n document.querySelectorAll('.ant-tabs-ladder-card .ant-tabs-nav-scroll .ant-tabs-tab')\n boxes.forEach((box: any, index: any) => {\n box.style.zIndex = boxes.length - index\n })\n }\n }, [type])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefix = getPrefixCls('tabs')\n const className = classname(rest?.className, {\n 'tnt-tabs': true,\n [`${prefix}-ladder-card`]: type === 'ladder-card' || type === 'editable-ladder-card',\n })\n\n return (\n <LocaleReceiver componentName=\"Tabs\">\n {(locale, localeCode) => {\n return (\n <AntdTabs\n {...rest}\n children={getNewChildren(children, upperCaseIgnore, localeCode)}\n ref={ref}\n type={newType as TabsType}\n className={className}\n />\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n }\n) as TabsComponent\n\nTabs.TabPane = AntdTabs.TabPane\n"]}
|