antd-solid 0.0.5 → 0.0.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 +3 -2
- package/src/Button.tsx +125 -0
- package/src/Collapse/index.tsx +86 -0
- package/src/ColorPicker.tsx +11 -0
- package/src/Compact.tsx +15 -0
- package/src/DatePicker.tsx +22 -0
- package/src/Empty/PRESENTED_IMAGE_SIMPLE.tsx +15 -0
- package/src/Empty/assets/EmptySvg.tsx +43 -0
- package/src/Empty/assets/SimpleEmptySvg.tsx +16 -0
- package/src/Empty/index.tsx +20 -0
- package/src/Image.tsx +29 -0
- package/src/Input.tsx +202 -0
- package/src/InputNumber.test.tsx +46 -0
- package/src/InputNumber.tsx +125 -0
- package/src/Modal.tsx +196 -0
- package/src/Popconfirm.tsx +75 -0
- package/src/Popover.tsx +30 -0
- package/src/Progress.tsx +4 -0
- package/src/Radio.tsx +132 -0
- package/src/Result.tsx +38 -0
- package/src/Segmented/index.tsx +95 -0
- package/src/Select.tsx +128 -0
- package/src/Skeleton.tsx +14 -0
- package/src/Spin.tsx +23 -0
- package/src/Switch.tsx +34 -0
- package/src/Table.tsx +53 -0
- package/src/Tabs.tsx +131 -0
- package/src/Timeline.tsx +33 -0
- package/src/Tooltip.tsx +355 -0
- package/src/Tree.tsx +246 -0
- package/src/Upload.tsx +10 -0
- package/src/form/Form.tsx +94 -0
- package/src/form/FormItem.tsx +139 -0
- package/src/form/context.ts +16 -0
- package/src/form/index.ts +13 -0
- package/src/hooks/createControllableValue.ts +68 -0
- package/src/hooks/createUpdateEffect.ts +16 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useClickAway.ts +18 -0
- package/src/hooks/useSize.ts +26 -0
- package/src/types/index.ts +5 -0
- package/src/utils/EventEmitter.ts +15 -0
- package/src/utils/ReactToSolid.tsx +38 -0
- package/src/utils/SolidToReact.tsx +27 -0
- package/src/utils/array.ts +21 -0
- package/src/utils/component.tsx +85 -0
- package/src/utils/solid.ts +53 -0
- package/src/utils/zh_CN.ts +236 -0
- package/dist/index.esm.js +0 -2369
- package/dist/index.umd.js +0 -1
package/dist/index.esm.js
DELETED
|
@@ -1,2369 +0,0 @@
|
|
|
1
|
-
import { delegateEvents, use, insert, createComponent, effect, className, style, template, mergeProps as mergeProps$1, Dynamic, render, memo, Portal, setAttribute, spread } from 'solid-js/web';
|
|
2
|
-
import { mergeProps, createSignal, createMemo, Show, createEffect, on, splitProps, untrack, For, onMount, onCleanup, children, createSelector, createContext, useContext, Index, Switch as Switch$1, Match } from 'solid-js';
|
|
3
|
-
import cs from 'classnames';
|
|
4
|
-
import { omit, isNil, clamp, compact, isEmpty, max, get, set, mapValues } from 'lodash-es';
|
|
5
|
-
import React, { useRef, useEffect } from 'react';
|
|
6
|
-
import { ConfigProvider, DatePicker as DatePicker$1, ColorPicker as ColorPicker$1, Progress as Progress$1, Upload as Upload$1, Skeleton as Skeleton$1, Image as Image$2 } from 'antd';
|
|
7
|
-
export { message } from 'antd';
|
|
8
|
-
import { createRoot } from 'react-dom/client';
|
|
9
|
-
import { nanoid } from 'nanoid';
|
|
10
|
-
import { Transition } from 'solid-transition-group';
|
|
11
|
-
|
|
12
|
-
const _tmpl$$q = /*#__PURE__*/template(`<span class="i-ant-design:loading ant-[vertical-align:-0.125em] keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-mr-8px">`),
|
|
13
|
-
_tmpl$2$d = /*#__PURE__*/template(`<button><span>`);
|
|
14
|
-
const sizeClassMap = {
|
|
15
|
-
large: 'ant-px-15px ant-py-6px ant-h-40px ant-rounded-8px',
|
|
16
|
-
middle: 'ant-px-15px ant-py-4px ant-h-32px ant-rounded-6px',
|
|
17
|
-
small: 'ant-px-7px ant-h-24px ant-rounded-4px',
|
|
18
|
-
plain: 'ant-p-0'
|
|
19
|
-
};
|
|
20
|
-
const typeClassMap = {
|
|
21
|
-
default: danger => cs('ant-bg-white', danger ? 'ant-[border:1px_solid_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_solid_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--light-primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-[border-color:var(--dark-primary-color)] active:ant-text-[var(--dark-primary-color)]'),
|
|
22
|
-
primary: danger => cs('ant-border-none ant-text-white', danger ? 'ant-bg-[var(--ant-color-error)] hover:ant-bg-[var(--light-error-color)] active:ant-bg-[var(--dark-error-color)]' : 'ant-bg-[var(--primary-color)] hover:ant-bg-[var(--light-primary-color)] active:ant-bg-[var(--dark-primary-color)]'),
|
|
23
|
-
dashed: danger => cs(' ant-bg-white', danger ? 'ant-[border:1px_dashed_var(--ant-color-error)] ant-text-[var(--ant-color-error)] hover:ant-[border-color:var(--light-error-color)] hover:ant-text-[var(--light-error-color)] active:ant-[border-color:var(--dark-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-[border:1px_dashed_var(--ant-color-border)] ant-text-[var(--dark-color)] hover:ant-[border-color:var(--light-primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-[border-color:var(--dark-primary-color)] active:ant-text-[var(--dark-primary-color)]'),
|
|
24
|
-
text: danger => cs('ant-border-none ant-bg-transparent', danger ? 'ant-text-[var(--ant-color-error)] hover:ant-bg-[var(--error-bg-color)] active:ant-bg-[var(--error-bg-color)]' : 'ant-text-[var(--dark-color)] hover:ant-bg-[rgba(0,0,0,0.06)] active:ant-bg-[rgba(0,0,0,.15)]'),
|
|
25
|
-
link: danger => cs('ant-border-none ant-bg-transparent', danger ? 'ant-text-[var(--ant-color-error)] hover:ant-text-[var(--light-error-color)] active:ant-text-[var(--dark-error-color)]' : 'ant-text-[var(--primary-color)] hover:ant-text-[var(--light-primary-color)] active:ant-text-[var(--dark-primary-color)]')
|
|
26
|
-
};
|
|
27
|
-
const Button = props => {
|
|
28
|
-
const mergedProps = mergeProps({
|
|
29
|
-
type: 'default',
|
|
30
|
-
size: 'middle'
|
|
31
|
-
}, props);
|
|
32
|
-
const [innerLoading, setLoading] = createSignal(false);
|
|
33
|
-
const loading = createMemo(() => props.loading ?? innerLoading());
|
|
34
|
-
return (() => {
|
|
35
|
-
const _el$ = _tmpl$2$d(),
|
|
36
|
-
_el$3 = _el$.firstChild;
|
|
37
|
-
_el$.$$click = e => {
|
|
38
|
-
const res = mergedProps.onClick?.(e);
|
|
39
|
-
if (res instanceof Promise) {
|
|
40
|
-
setLoading(true);
|
|
41
|
-
res.finally(() => setLoading(false));
|
|
42
|
-
}
|
|
43
|
-
if (mergedProps.type === 'default' || mergedProps.type === 'primary' || mergedProps.type === 'dashed') {
|
|
44
|
-
const div = document.createElement('div');
|
|
45
|
-
div.className = cs(props.danger ? 'ant-[--color:var(--light-error-color)]' : 'ant-[--color:var(--light-primary-color)]', 'ant-absolute ant-inset-0 ant-rounded-inherit ant-[background:radial-gradient(var(--color),rgba(0,0,0,0))] ant-z--1 ant-keyframes-button-border[inset:0px][inset:-6px] ant-[animation:button-border_ease-out_0.3s]');
|
|
46
|
-
const onAnimationEnd = () => {
|
|
47
|
-
div.remove();
|
|
48
|
-
div.removeEventListener('animationend', onAnimationEnd);
|
|
49
|
-
};
|
|
50
|
-
div.addEventListener('animationend', onAnimationEnd);
|
|
51
|
-
e.currentTarget.insertBefore(div, e.currentTarget.childNodes[0]);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const _ref$ = mergedProps.ref;
|
|
55
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : mergedProps.ref = _el$;
|
|
56
|
-
insert(_el$, createComponent(Show, {
|
|
57
|
-
get when() {
|
|
58
|
-
return loading();
|
|
59
|
-
},
|
|
60
|
-
get children() {
|
|
61
|
-
return _tmpl$$q();
|
|
62
|
-
}
|
|
63
|
-
}), _el$3);
|
|
64
|
-
insert(_el$3, () => mergedProps.children);
|
|
65
|
-
effect(_p$ => {
|
|
66
|
-
const _v$ = cs('ant-relative ant-cursor-pointer', mergedProps.class, sizeClassMap[mergedProps.size], typeClassMap[mergedProps.type](props.danger ?? false), loading() && 'ant-opacity-65', 'ant-[--color:--light-primary-color]'),
|
|
67
|
-
_v$2 = mergedProps.style;
|
|
68
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
69
|
-
_p$._v$2 = style(_el$, _v$2, _p$._v$2);
|
|
70
|
-
return _p$;
|
|
71
|
-
}, {
|
|
72
|
-
_v$: undefined,
|
|
73
|
-
_v$2: undefined
|
|
74
|
-
});
|
|
75
|
-
return _el$;
|
|
76
|
-
})();
|
|
77
|
-
};
|
|
78
|
-
delegateEvents(["click"]);
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* 等同于 createEffect,但是会忽略首次执行,只在依赖更新时执行。
|
|
82
|
-
*/
|
|
83
|
-
function createUpdateEffect(deps, fn) {
|
|
84
|
-
createEffect(on(deps, fn, {
|
|
85
|
-
defer: true
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function createControllableValue(props, options = {}) {
|
|
90
|
-
const {
|
|
91
|
-
defaultValuePropName = 'defaultValue',
|
|
92
|
-
valuePropName = 'value',
|
|
93
|
-
trigger = 'onChange'
|
|
94
|
-
} = options;
|
|
95
|
-
const getValue = () => props[valuePropName];
|
|
96
|
-
// 为什么不使用 Object.hasOwn?
|
|
97
|
-
// solid 的 proxy 对象对于任何 key,都会返回 true
|
|
98
|
-
const isControlled = () => Object.keys(props).includes(valuePropName);
|
|
99
|
-
let defaultValue = options.defaultValue;
|
|
100
|
-
if (isControlled()) {
|
|
101
|
-
defaultValue = getValue();
|
|
102
|
-
} else if (Object.keys(props).includes(defaultValuePropName)) {
|
|
103
|
-
defaultValue = props[defaultValuePropName];
|
|
104
|
-
}
|
|
105
|
-
const [value, _setValue] = createSignal(defaultValue);
|
|
106
|
-
createUpdateEffect(getValue, () => {
|
|
107
|
-
if (!isControlled()) return;
|
|
108
|
-
_setValue(getValue());
|
|
109
|
-
});
|
|
110
|
-
const setValue = v => {
|
|
111
|
-
const newValue = typeof v === 'function' ? v(value()) : v;
|
|
112
|
-
if (!isControlled()) {
|
|
113
|
-
_setValue(newValue);
|
|
114
|
-
}
|
|
115
|
-
if (trigger) {
|
|
116
|
-
const onChange = props[trigger];
|
|
117
|
-
if (typeof onChange === 'function') {
|
|
118
|
-
onChange(newValue);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return newValue;
|
|
122
|
-
};
|
|
123
|
-
return [value, setValue];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const _tmpl$$p = /*#__PURE__*/template(`<div class="ant-compact ant-flex">`);
|
|
127
|
-
function Compact(props) {
|
|
128
|
-
return (() => {
|
|
129
|
-
const _el$ = _tmpl$$p();
|
|
130
|
-
insert(_el$, () => props.children);
|
|
131
|
-
return _el$;
|
|
132
|
-
})();
|
|
133
|
-
}
|
|
134
|
-
Compact.compactItemClass = 'p[.ant-compact]:ant-ml--1px';
|
|
135
|
-
Compact.compactItemRounded0Class = 'p[.ant-compact>*]:ant-rounded-0';
|
|
136
|
-
Compact.compactItemRoundedLeftClass = 'p[.ant-compact>:first-child]:ant-rounded-l-6px';
|
|
137
|
-
Compact.compactItemRoundedRightClass = 'p[.ant-compact>:last-child]:ant-rounded-r-6px';
|
|
138
|
-
Compact.compactItemZIndexClass = 'p[.ant-compact>*]:focus:ant-z-10 p[.ant-compact>*]:focus-within:ant-z-10';
|
|
139
|
-
|
|
140
|
-
const _tmpl$$o = /*#__PURE__*/template(`<div>`),
|
|
141
|
-
_tmpl$2$c = /*#__PURE__*/template(`<div class="ant-mr-4px">`),
|
|
142
|
-
_tmpl$3$9 = /*#__PURE__*/template(`<div class="ant-ml-4px">`),
|
|
143
|
-
_tmpl$4$5 = /*#__PURE__*/template(`<div class="ant-[display:var(--input-after-display)] ant-absolute ant-top-0 ant-bottom-0 ant-right-0 ant-h-[calc(100%-2px)] ant-translate-y-1px -ant-translate-x-1px">`);
|
|
144
|
-
const statusClassDict = {
|
|
145
|
-
default: disabled => cs('ant-[border:1px_solid_var(--ant-color-border)]', !disabled && 'hover:ant-border-[var(--primary-color)] focus-within:ant-border-[var(--primary-color)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(5,145,255,0.1)]'),
|
|
146
|
-
error: disabled => cs('ant-[border:1px_solid_var(--ant-color-error)]', !disabled && 'hover:ant-border-[var(--light-error-color)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(255,38,5,.06)]'),
|
|
147
|
-
warning: disabled => cs('ant-[border:1px_solid_var(--warning-color)]', !disabled && 'hover:ant-border-[var(--color-warning-border-hover)] focus-within:ant-[box-shadow:0_0_0_2px_rgba(255,215,5,.1)]')
|
|
148
|
-
};
|
|
149
|
-
function CommonInput(props) {
|
|
150
|
-
const [{
|
|
151
|
-
style: style$1,
|
|
152
|
-
onChange,
|
|
153
|
-
onPressEnter,
|
|
154
|
-
onKeyDown
|
|
155
|
-
}, inputProps] = splitProps(props, ['defaultValue', 'value', 'class', 'addonBefore', 'addonAfter', 'suffix', 'onChange', 'onPressEnter', 'onKeyDown', 'actions', 'style']);
|
|
156
|
-
const [_, controllableProps] = splitProps(props, ['onChange']);
|
|
157
|
-
const [value, setValue] = createControllableValue(controllableProps);
|
|
158
|
-
const inputWrapClass = createMemo(() => cs('ant-px-11px ant-py-4px ant-rounded-6px', !props.textarea && 'ant-h-32px', props.addonBefore ? 'ant-rounded-l-0' : Compact.compactItemRoundedLeftClass, props.addonAfter ? 'ant-rounded-r-0' : Compact.compactItemRoundedRightClass, statusClassDict[props.status ?? 'default'](!!inputProps.disabled), Compact.compactItemRounded0Class, Compact.compactItemZIndexClass));
|
|
159
|
-
const hasPrefixOrSuffix = createMemo(() => !isNil(props.prefix) || !isNil(props.suffix) || !isNil(props.actions));
|
|
160
|
-
const inputJSX = createComponent(Dynamic, mergeProps$1({
|
|
161
|
-
get component() {
|
|
162
|
-
return props.textarea ? 'textarea' : 'input';
|
|
163
|
-
}
|
|
164
|
-
}, inputProps, {
|
|
165
|
-
get ["class"]() {
|
|
166
|
-
return cs('ant-w-full ant-[outline:none] ant-text-14px', !hasPrefixOrSuffix() && inputWrapClass(), inputProps.disabled && 'ant-bg-[var(--ant-color-bg-container-disabled)] ant-cursor-not-allowed');
|
|
167
|
-
},
|
|
168
|
-
get value() {
|
|
169
|
-
return value() ?? '';
|
|
170
|
-
},
|
|
171
|
-
onInput: e => {
|
|
172
|
-
setValue(e.target.value);
|
|
173
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
174
|
-
onChange?.(e);
|
|
175
|
-
if (Object.keys(props).includes('value')) {
|
|
176
|
-
e.target.value = value();
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
onKeyDown: e => {
|
|
180
|
-
if (e.key === 'Enter') {
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
182
|
-
onPressEnter?.(e);
|
|
183
|
-
}
|
|
184
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
185
|
-
onKeyDown?.(e);
|
|
186
|
-
}
|
|
187
|
-
}));
|
|
188
|
-
return (() => {
|
|
189
|
-
const _el$ = _tmpl$$o();
|
|
190
|
-
insert(_el$, createComponent(Show, {
|
|
191
|
-
get when() {
|
|
192
|
-
return props.addonBefore;
|
|
193
|
-
},
|
|
194
|
-
get children() {
|
|
195
|
-
const _el$2 = _tmpl$$o();
|
|
196
|
-
insert(_el$2, () => props.addonBefore);
|
|
197
|
-
effect(() => className(_el$2, cs('ant-shrink-0 ant-flex ant-justify-center ant-items-center ant-px-11px ant-bg-[rgba(0,0,0,.02)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-r-0 ant-rounded-l-6px ant-text-14px', Compact.compactItemRounded0Class, Compact.compactItemRoundedLeftClass)));
|
|
198
|
-
return _el$2;
|
|
199
|
-
}
|
|
200
|
-
}), null);
|
|
201
|
-
insert(_el$, createComponent(Show, {
|
|
202
|
-
get when() {
|
|
203
|
-
return hasPrefixOrSuffix();
|
|
204
|
-
},
|
|
205
|
-
fallback: inputJSX,
|
|
206
|
-
get children() {
|
|
207
|
-
const _el$3 = _tmpl$$o();
|
|
208
|
-
insert(_el$3, createComponent(Show, {
|
|
209
|
-
get when() {
|
|
210
|
-
return props.prefix;
|
|
211
|
-
},
|
|
212
|
-
get children() {
|
|
213
|
-
const _el$4 = _tmpl$2$c();
|
|
214
|
-
insert(_el$4, () => props.prefix);
|
|
215
|
-
return _el$4;
|
|
216
|
-
}
|
|
217
|
-
}), null);
|
|
218
|
-
insert(_el$3, inputJSX, null);
|
|
219
|
-
insert(_el$3, createComponent(Show, {
|
|
220
|
-
get when() {
|
|
221
|
-
return props.suffix;
|
|
222
|
-
},
|
|
223
|
-
get children() {
|
|
224
|
-
const _el$5 = _tmpl$3$9();
|
|
225
|
-
insert(_el$5, () => props.suffix);
|
|
226
|
-
return _el$5;
|
|
227
|
-
}
|
|
228
|
-
}), null);
|
|
229
|
-
insert(_el$3, createComponent(Show, {
|
|
230
|
-
get when() {
|
|
231
|
-
return props.actions;
|
|
232
|
-
},
|
|
233
|
-
get children() {
|
|
234
|
-
const _el$6 = _tmpl$4$5();
|
|
235
|
-
insert(_el$6, () => props.actions);
|
|
236
|
-
return _el$6;
|
|
237
|
-
}
|
|
238
|
-
}), null);
|
|
239
|
-
effect(() => className(_el$3, cs('ant-flex ant-items-center ant-w-full ant-relative ant-[--input-after-display:none] hover:ant-[--input-after-display:block] p:hover-child[input]:ant-border-[var(--primary-color)]', inputWrapClass())));
|
|
240
|
-
return _el$3;
|
|
241
|
-
}
|
|
242
|
-
}), null);
|
|
243
|
-
insert(_el$, createComponent(Show, {
|
|
244
|
-
get when() {
|
|
245
|
-
return props.addonAfter;
|
|
246
|
-
},
|
|
247
|
-
get children() {
|
|
248
|
-
const _el$7 = _tmpl$$o();
|
|
249
|
-
insert(_el$7, () => props.addonAfter);
|
|
250
|
-
effect(() => className(_el$7, cs('ant-shrink-0 ant-flex ant-justify-center ant-items-center ant-px-11px ant-bg-[rgba(0,0,0,.02)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-l-0 ant-rounded-r-6px ant-text-14px', Compact.compactItemRounded0Class, Compact.compactItemRoundedRightClass)));
|
|
251
|
-
return _el$7;
|
|
252
|
-
}
|
|
253
|
-
}), null);
|
|
254
|
-
effect(_p$ => {
|
|
255
|
-
const _v$ = cs('ant-flex ant-w-full', Compact.compactItemClass),
|
|
256
|
-
_v$2 = style$1;
|
|
257
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
258
|
-
_p$._v$2 = style(_el$, _v$2, _p$._v$2);
|
|
259
|
-
return _p$;
|
|
260
|
-
}, {
|
|
261
|
-
_v$: undefined,
|
|
262
|
-
_v$2: undefined
|
|
263
|
-
});
|
|
264
|
-
return _el$;
|
|
265
|
-
})();
|
|
266
|
-
}
|
|
267
|
-
const Input = props => {
|
|
268
|
-
return createComponent(CommonInput, mergeProps$1(() => omit(props, ['actions'])));
|
|
269
|
-
};
|
|
270
|
-
Input.TextArea = props => {
|
|
271
|
-
return createComponent(CommonInput, mergeProps$1({
|
|
272
|
-
textarea: true
|
|
273
|
-
}, () => omit(props, ['prefix', 'suffix', 'actions'])));
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
const SolidToReact = ({
|
|
277
|
-
children,
|
|
278
|
-
container
|
|
279
|
-
}) => {
|
|
280
|
-
const ref = useRef();
|
|
281
|
-
useEffect(() => render(() => children, ref.current), []);
|
|
282
|
-
// if (import.meta.env.SSR) {
|
|
283
|
-
// return React.createElement('div', {
|
|
284
|
-
// dangerouslySetInnerHTML: { __html: renderToString(() => children) },
|
|
285
|
-
// })
|
|
286
|
-
// }
|
|
287
|
-
return container ? React.cloneElement(container, {
|
|
288
|
-
ref
|
|
289
|
-
}) : React.createElement('div', {
|
|
290
|
-
ref,
|
|
291
|
-
role: 'SolidToReact'
|
|
292
|
-
});
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* 判断 JSXElement 是否是基础类型
|
|
297
|
-
* @param value JSXElement
|
|
298
|
-
* @returns
|
|
299
|
-
*/
|
|
300
|
-
function isBaseType(value) {
|
|
301
|
-
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || value === null || value === undefined;
|
|
302
|
-
}
|
|
303
|
-
function solidToReact(children) {
|
|
304
|
-
return isBaseType(children) ? children : React.createElement(SolidToReact, {
|
|
305
|
-
children
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
function dispatchEventHandlerUnion(handler, e) {
|
|
309
|
-
if (isNil(handler)) {
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
if (typeof handler === 'function') {
|
|
313
|
-
handler(e);
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
handler[0](handler[1], e);
|
|
317
|
-
}
|
|
318
|
-
function unwrapStringOrJSXElement(value) {
|
|
319
|
-
return typeof value === 'function' ? value() : value;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
const _tmpl$$n = /*#__PURE__*/template(`<div class="ant-flex ant-flex-col ant-h-full ant-w-24px ant-[border-left:1px_solid_var(--ant-color-border)]"><div class="ant-text-12px ant-flex ant-justify-center ant-items-center ant-h-1/2 ant-cursor-pointer ant-opacity-70 hover:ant-h-100% hover:ant-text-[var(--primary-color)] ant-transition-color ant-transition-height ant-transition-duration-500"><div class="i-ant-design:up-outlined"></div></div><div class="ant-[border-top:1px_solid_var(--ant-color-border)] ant-text-12px ant-flex ant-justify-center ant-items-center ant-h-1/2 ant-cursor-pointer ant-opacity-70 hover:ant-h-100% hover:ant-text-[var(--primary-color)] ant-transition-color ant-transition-height ant-transition-duration-500"><div class="i-ant-design:down-outlined">`);
|
|
323
|
-
const isEmptyValue = value => isNil(value) || value === '';
|
|
324
|
-
const InputNumber = _props => {
|
|
325
|
-
const props = mergeProps({
|
|
326
|
-
min: -Infinity,
|
|
327
|
-
max: Infinity
|
|
328
|
-
}, _props);
|
|
329
|
-
const [_, inputProps] = splitProps(props, ['defaultValue', 'value', 'onChange', 'onBlur']);
|
|
330
|
-
const clampValue = v => untrack(() => clamp(v, props.min, props.max));
|
|
331
|
-
let prev = null;
|
|
332
|
-
const updatePrev = v => {
|
|
333
|
-
if (prev === v) return;
|
|
334
|
-
prev = v;
|
|
335
|
-
props.onChange?.(prev);
|
|
336
|
-
};
|
|
337
|
-
const [value, setValue] = createSignal(untrack(() => props.value ?? props.defaultValue));
|
|
338
|
-
createEffect(on(() => props.value, () => {
|
|
339
|
-
setValue(props.value);
|
|
340
|
-
}, {
|
|
341
|
-
defer: true
|
|
342
|
-
}));
|
|
343
|
-
const add = addon => {
|
|
344
|
-
let newValue;
|
|
345
|
-
if (isEmptyValue(value())) {
|
|
346
|
-
newValue = clampValue(addon);
|
|
347
|
-
} else {
|
|
348
|
-
const num = Number(value());
|
|
349
|
-
newValue = Number.isNaN(num) ? null : clampValue(num + addon);
|
|
350
|
-
}
|
|
351
|
-
if (!Object.keys(props).includes('value')) {
|
|
352
|
-
setValue(newValue);
|
|
353
|
-
}
|
|
354
|
-
updatePrev(newValue);
|
|
355
|
-
};
|
|
356
|
-
const up = () => {
|
|
357
|
-
add(1);
|
|
358
|
-
};
|
|
359
|
-
const down = () => {
|
|
360
|
-
add(-1);
|
|
361
|
-
};
|
|
362
|
-
return createComponent(CommonInput, mergeProps$1(inputProps, {
|
|
363
|
-
get actions() {
|
|
364
|
-
return (() => {
|
|
365
|
-
const _el$ = _tmpl$$n(),
|
|
366
|
-
_el$2 = _el$.firstChild,
|
|
367
|
-
_el$3 = _el$2.nextSibling;
|
|
368
|
-
_el$2.$$click = up;
|
|
369
|
-
_el$3.$$click = down;
|
|
370
|
-
return _el$;
|
|
371
|
-
})();
|
|
372
|
-
},
|
|
373
|
-
get value() {
|
|
374
|
-
return `${value() ?? ''}`;
|
|
375
|
-
},
|
|
376
|
-
onKeyDown: e => {
|
|
377
|
-
switch (e.key) {
|
|
378
|
-
case 'ArrowUp':
|
|
379
|
-
up();
|
|
380
|
-
e.preventDefault();
|
|
381
|
-
return;
|
|
382
|
-
case 'ArrowDown':
|
|
383
|
-
down();
|
|
384
|
-
e.preventDefault();
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
onChange: e => {
|
|
388
|
-
const newValue = e.target.value;
|
|
389
|
-
setValue(newValue);
|
|
390
|
-
let newValueNum = Number(newValue);
|
|
391
|
-
if (Number.isNaN(newValueNum)) return;
|
|
392
|
-
if (isEmptyValue(newValue)) {
|
|
393
|
-
newValueNum = null;
|
|
394
|
-
} else {
|
|
395
|
-
newValueNum = clampValue(newValueNum);
|
|
396
|
-
}
|
|
397
|
-
updatePrev(newValueNum);
|
|
398
|
-
},
|
|
399
|
-
onBlur: e => {
|
|
400
|
-
setValue(props.value ?? prev);
|
|
401
|
-
dispatchEventHandlerUnion(props.onBlur, e);
|
|
402
|
-
}
|
|
403
|
-
}));
|
|
404
|
-
};
|
|
405
|
-
delegateEvents(["click"]);
|
|
406
|
-
|
|
407
|
-
const _tmpl$$m = /*#__PURE__*/template(`<div class="ant-flex ant-flex-col ant-gap-[16px]">`),
|
|
408
|
-
_tmpl$2$b = /*#__PURE__*/template(`<div class="ant-flex ant-relative"><div class="ant-w-[10px] ant-h-[10px] ant-border-solid ant-border-width-[3px] ant-border-[var(--primary-color)] ant-bg-white ant-rounded-[50%] ant-mt-[8px]"></div><div class="ant-ml-[8px]">`),
|
|
409
|
-
_tmpl$3$8 = /*#__PURE__*/template(`<div class="ant-absolute ant-top-[8px] ant-bottom-[-24px] ant-left-[4px] ant-w-[2px] ant-bg-[rgba(5,5,5,.06)]">`);
|
|
410
|
-
const Timeline = props => {
|
|
411
|
-
return (() => {
|
|
412
|
-
const _el$ = _tmpl$$m();
|
|
413
|
-
insert(_el$, createComponent(For, {
|
|
414
|
-
get each() {
|
|
415
|
-
return props.items;
|
|
416
|
-
},
|
|
417
|
-
children: (item, i) => (() => {
|
|
418
|
-
const _el$2 = _tmpl$2$b(),
|
|
419
|
-
_el$3 = _el$2.firstChild,
|
|
420
|
-
_el$4 = _el$3.nextSibling;
|
|
421
|
-
insert(_el$2, (() => {
|
|
422
|
-
const _c$ = memo(() => i() !== props.items.length - 1);
|
|
423
|
-
return () => _c$() && _tmpl$3$8();
|
|
424
|
-
})(), _el$3);
|
|
425
|
-
insert(_el$4, () => item.children?.());
|
|
426
|
-
return _el$2;
|
|
427
|
-
})()
|
|
428
|
-
}));
|
|
429
|
-
return _el$;
|
|
430
|
-
})();
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
const _tmpl$$l = /*#__PURE__*/template(`<span class="i-ant-design:close-outlined">`),
|
|
434
|
-
_tmpl$2$a = /*#__PURE__*/template(`<div class="ant-flex ant-gap-8px ant-justify-end">`),
|
|
435
|
-
_tmpl$3$7 = /*#__PURE__*/template(`<div class="ant-mt-12px">`),
|
|
436
|
-
_tmpl$4$4 = /*#__PURE__*/template(`<div><div class="ant-text-[rgba(0,0,0,.88)] ant-text-16px ant-font-600 ant-mb-8px"></div><div class="ant-grow">`),
|
|
437
|
-
_tmpl$5$1 = /*#__PURE__*/template(`<div>`),
|
|
438
|
-
_tmpl$6$1 = /*#__PURE__*/template(`<span class="i-ant-design:exclamation-circle ant-text-22px ant-mr-12px ant-text-[var(--warning-color)]">`),
|
|
439
|
-
_tmpl$7 = /*#__PURE__*/template(`<div class="ant-ml-34px">`);
|
|
440
|
-
function Modal(_props) {
|
|
441
|
-
const props = mergeProps({
|
|
442
|
-
footer: true
|
|
443
|
-
}, _props);
|
|
444
|
-
const [open, setOpen] = createSignal(props.defaultOpen ?? false);
|
|
445
|
-
const [hide, setHide] = createSignal(false);
|
|
446
|
-
const instance = {
|
|
447
|
-
open() {
|
|
448
|
-
setOpen(true);
|
|
449
|
-
setHide(false);
|
|
450
|
-
},
|
|
451
|
-
close() {
|
|
452
|
-
untrack(() => {
|
|
453
|
-
if (props.destroyOnClose) {
|
|
454
|
-
setOpen(false);
|
|
455
|
-
} else {
|
|
456
|
-
setHide(true);
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
};
|
|
461
|
-
untrack(() => {
|
|
462
|
-
if (typeof props.ref === 'function') {
|
|
463
|
-
props.ref?.(instance);
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
const close = () => {
|
|
467
|
-
instance.close();
|
|
468
|
-
props.afterClose?.();
|
|
469
|
-
};
|
|
470
|
-
const [confirmLoading, setConfirmLoading] = createSignal(false);
|
|
471
|
-
return createComponent(Show, {
|
|
472
|
-
get when() {
|
|
473
|
-
return open();
|
|
474
|
-
},
|
|
475
|
-
get children() {
|
|
476
|
-
return createComponent(Portal, {
|
|
477
|
-
get children() {
|
|
478
|
-
const _el$ = _tmpl$5$1();
|
|
479
|
-
_el$.$$click = () => {
|
|
480
|
-
if (props.maskClosable ?? true) {
|
|
481
|
-
close();
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
insert(_el$, createComponent(Show, {
|
|
485
|
-
get when() {
|
|
486
|
-
return typeof props.modalRender !== 'function';
|
|
487
|
-
},
|
|
488
|
-
get fallback() {
|
|
489
|
-
return props.modalRender();
|
|
490
|
-
},
|
|
491
|
-
get children() {
|
|
492
|
-
const _el$2 = _tmpl$4$4(),
|
|
493
|
-
_el$4 = _el$2.firstChild,
|
|
494
|
-
_el$5 = _el$4.nextSibling;
|
|
495
|
-
_el$2.$$click = e => {
|
|
496
|
-
e.stopPropagation();
|
|
497
|
-
};
|
|
498
|
-
insert(_el$2, createComponent(Show, {
|
|
499
|
-
get when() {
|
|
500
|
-
return props.closeIcon !== false;
|
|
501
|
-
},
|
|
502
|
-
get children() {
|
|
503
|
-
return createComponent(Button, {
|
|
504
|
-
type: "text",
|
|
505
|
-
get ["class"]() {
|
|
506
|
-
return cs('ant-rm-size-btn !ant-w-22px !ant-h-22px !ant-flex !ant-justify-center !ant-items-center ant-text-center ant-text-18px !ant-absolute !ant-top-16px !ant-right-16px ant-z-1000 ant-text-[rgba(0,0,0,.45)] hover:!ant-text-[rgba(0,0,0,.88)]');
|
|
507
|
-
},
|
|
508
|
-
onClick: close,
|
|
509
|
-
get children() {
|
|
510
|
-
return _tmpl$$l();
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
}), _el$4);
|
|
515
|
-
insert(_el$4, () => props.title);
|
|
516
|
-
insert(_el$5, () => props.children);
|
|
517
|
-
insert(_el$2, createComponent(Show, {
|
|
518
|
-
get when() {
|
|
519
|
-
return props.footer !== false;
|
|
520
|
-
},
|
|
521
|
-
get children() {
|
|
522
|
-
const _el$6 = _tmpl$3$7();
|
|
523
|
-
insert(_el$6, createComponent(Show, {
|
|
524
|
-
get when() {
|
|
525
|
-
return typeof props.footer !== 'function';
|
|
526
|
-
},
|
|
527
|
-
get fallback() {
|
|
528
|
-
return memo(() => typeof props.footer === 'function')() && props.footer(instance);
|
|
529
|
-
},
|
|
530
|
-
get children() {
|
|
531
|
-
const _el$7 = _tmpl$2$a();
|
|
532
|
-
insert(_el$7, createComponent(Button, {
|
|
533
|
-
onClick: close,
|
|
534
|
-
children: "\u53D6\u6D88"
|
|
535
|
-
}), null);
|
|
536
|
-
insert(_el$7, createComponent(Button, {
|
|
537
|
-
type: "primary",
|
|
538
|
-
get loading() {
|
|
539
|
-
return confirmLoading();
|
|
540
|
-
},
|
|
541
|
-
onClick: async () => {
|
|
542
|
-
if (!props.onOk) return;
|
|
543
|
-
let res = props.onOk?.();
|
|
544
|
-
if (res instanceof Promise) {
|
|
545
|
-
setConfirmLoading(true);
|
|
546
|
-
res = await res.finally(() => setConfirmLoading(false));
|
|
547
|
-
}
|
|
548
|
-
if (res) {
|
|
549
|
-
instance.close();
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
children: "\u786E\u5B9A"
|
|
553
|
-
}), null);
|
|
554
|
-
return _el$7;
|
|
555
|
-
}
|
|
556
|
-
}));
|
|
557
|
-
return _el$6;
|
|
558
|
-
}
|
|
559
|
-
}), null);
|
|
560
|
-
effect(_p$ => {
|
|
561
|
-
const _v$ = cs('ant-absolute ant-px-24px ant-py-20px ant-rounded-8px ant-overflow-hidden ant-bg-white ant-flex ant-flex-col',
|
|
562
|
-
// '!ant-[animation-duration:.5s]',
|
|
563
|
-
!props.centered && 'ant-top-100px'),
|
|
564
|
-
_v$2 = props.width ?? '520px',
|
|
565
|
-
_v$3 = props.height;
|
|
566
|
-
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
567
|
-
_v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$2.style.setProperty("width", _v$2) : _el$2.style.removeProperty("width"));
|
|
568
|
-
_v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$2.style.setProperty("height", _v$3) : _el$2.style.removeProperty("height"));
|
|
569
|
-
return _p$;
|
|
570
|
-
}, {
|
|
571
|
-
_v$: undefined,
|
|
572
|
-
_v$2: undefined,
|
|
573
|
-
_v$3: undefined
|
|
574
|
-
});
|
|
575
|
-
return _el$2;
|
|
576
|
-
}
|
|
577
|
-
}));
|
|
578
|
-
effect(_p$ => {
|
|
579
|
-
const _v$4 = cs('ant-fixed ant-justify-center ant-inset-0 ant-bg-[rgba(0,0,0,.45)] ant-flex ant-z-1000', props.centered && 'ant-items-center'),
|
|
580
|
-
_v$5 = hide() ? 'none' : undefined;
|
|
581
|
-
_v$4 !== _p$._v$4 && className(_el$, _p$._v$4 = _v$4);
|
|
582
|
-
_v$5 !== _p$._v$5 && ((_p$._v$5 = _v$5) != null ? _el$.style.setProperty("display", _v$5) : _el$.style.removeProperty("display"));
|
|
583
|
-
return _p$;
|
|
584
|
-
}, {
|
|
585
|
-
_v$4: undefined,
|
|
586
|
-
_v$5: undefined
|
|
587
|
-
});
|
|
588
|
-
return _el$;
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
Modal.warning = props => {
|
|
595
|
-
const div = document.createElement('div');
|
|
596
|
-
document.body.appendChild(div);
|
|
597
|
-
const dispose = render(() => createComponent(Modal, mergeProps$1({
|
|
598
|
-
width: "416px",
|
|
599
|
-
maskClosable: false,
|
|
600
|
-
closeIcon: false
|
|
601
|
-
}, props, {
|
|
602
|
-
get title() {
|
|
603
|
-
return [_tmpl$6$1(), memo(() => props.title)];
|
|
604
|
-
},
|
|
605
|
-
get children() {
|
|
606
|
-
return (() => {
|
|
607
|
-
const _el$9 = _tmpl$7();
|
|
608
|
-
insert(_el$9, () => props.children);
|
|
609
|
-
return _el$9;
|
|
610
|
-
})();
|
|
611
|
-
},
|
|
612
|
-
defaultOpen: true,
|
|
613
|
-
afterClose: () => {
|
|
614
|
-
document.body.removeChild(div);
|
|
615
|
-
dispose();
|
|
616
|
-
props.afterClose?.();
|
|
617
|
-
}
|
|
618
|
-
})), div);
|
|
619
|
-
};
|
|
620
|
-
delegateEvents(["click"]);
|
|
621
|
-
|
|
622
|
-
const _tmpl$$k = /*#__PURE__*/template(`<div role="ReactToSolid">`);
|
|
623
|
-
function ReactToSolid(props) {
|
|
624
|
-
let root;
|
|
625
|
-
const rootEle = createMemo(() => props.container ?? _tmpl$$k());
|
|
626
|
-
onMount(() => {
|
|
627
|
-
root = createRoot(rootEle());
|
|
628
|
-
onCleanup(() => {
|
|
629
|
-
root.unmount();
|
|
630
|
-
});
|
|
631
|
-
});
|
|
632
|
-
createEffect(() => {
|
|
633
|
-
root.render(React.createElement(props.component, {
|
|
634
|
-
...props.props
|
|
635
|
-
}));
|
|
636
|
-
});
|
|
637
|
-
// if (import.meta.env.SSR) {
|
|
638
|
-
// // eslint-disable-next-line solid/reactivity
|
|
639
|
-
// const node = React.createElement(props.component, { ...props.props })
|
|
640
|
-
// // eslint-disable-next-line solid/components-return-once, solid/no-innerhtml
|
|
641
|
-
// return <div innerHTML={renderToString(node)} />
|
|
642
|
-
// }
|
|
643
|
-
return rootEle;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
var zhCN = {
|
|
647
|
-
locale: 'zh-cn',
|
|
648
|
-
Pagination: {
|
|
649
|
-
items_per_page: '条/页',
|
|
650
|
-
jump_to: '跳至',
|
|
651
|
-
jump_to_confirm: '确定',
|
|
652
|
-
page: '页',
|
|
653
|
-
prev_page: '上一页',
|
|
654
|
-
next_page: '下一页',
|
|
655
|
-
prev_5: '向前 5 页',
|
|
656
|
-
next_5: '向后 5 页',
|
|
657
|
-
prev_3: '向前 3 页',
|
|
658
|
-
next_3: '向后 3 页',
|
|
659
|
-
page_size: '页码'
|
|
660
|
-
},
|
|
661
|
-
DatePicker: {
|
|
662
|
-
lang: {
|
|
663
|
-
placeholder: '请选择日期',
|
|
664
|
-
yearPlaceholder: '请选择年份',
|
|
665
|
-
quarterPlaceholder: '请选择季度',
|
|
666
|
-
monthPlaceholder: '请选择月份',
|
|
667
|
-
weekPlaceholder: '请选择周',
|
|
668
|
-
rangePlaceholder: ['开始日期', '结束日期'],
|
|
669
|
-
rangeYearPlaceholder: ['开始年份', '结束年份'],
|
|
670
|
-
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
671
|
-
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
|
|
672
|
-
rangeWeekPlaceholder: ['开始周', '结束周'],
|
|
673
|
-
locale: 'zh_CN',
|
|
674
|
-
today: '今天',
|
|
675
|
-
now: '此刻',
|
|
676
|
-
backToToday: '返回今天',
|
|
677
|
-
ok: '确定',
|
|
678
|
-
timeSelect: '选择时间',
|
|
679
|
-
dateSelect: '选择日期',
|
|
680
|
-
weekSelect: '选择周',
|
|
681
|
-
clear: '清除',
|
|
682
|
-
month: '月',
|
|
683
|
-
year: '年',
|
|
684
|
-
previousMonth: '上个月 (翻页上键)',
|
|
685
|
-
nextMonth: '下个月 (翻页下键)',
|
|
686
|
-
monthSelect: '选择月份',
|
|
687
|
-
yearSelect: '选择年份',
|
|
688
|
-
decadeSelect: '选择年代',
|
|
689
|
-
yearFormat: 'YYYY年',
|
|
690
|
-
dayFormat: 'D日',
|
|
691
|
-
dateFormat: 'YYYY年M月D日',
|
|
692
|
-
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
693
|
-
previousYear: '上一年 (Control键加左方向键)',
|
|
694
|
-
nextYear: '下一年 (Control键加右方向键)',
|
|
695
|
-
previousDecade: '上一年代',
|
|
696
|
-
nextDecade: '下一年代',
|
|
697
|
-
previousCentury: '上一世纪',
|
|
698
|
-
nextCentury: '下一世纪'
|
|
699
|
-
},
|
|
700
|
-
timePickerLocale: {
|
|
701
|
-
placeholder: '请选择时间',
|
|
702
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
TimePicker: {
|
|
706
|
-
placeholder: '请选择时间',
|
|
707
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
708
|
-
},
|
|
709
|
-
Calendar: {
|
|
710
|
-
lang: {
|
|
711
|
-
placeholder: '请选择日期',
|
|
712
|
-
yearPlaceholder: '请选择年份',
|
|
713
|
-
quarterPlaceholder: '请选择季度',
|
|
714
|
-
monthPlaceholder: '请选择月份',
|
|
715
|
-
weekPlaceholder: '请选择周',
|
|
716
|
-
rangePlaceholder: ['开始日期', '结束日期'],
|
|
717
|
-
rangeYearPlaceholder: ['开始年份', '结束年份'],
|
|
718
|
-
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
719
|
-
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
|
|
720
|
-
rangeWeekPlaceholder: ['开始周', '结束周'],
|
|
721
|
-
locale: 'zh_CN',
|
|
722
|
-
today: '今天',
|
|
723
|
-
now: '此刻',
|
|
724
|
-
backToToday: '返回今天',
|
|
725
|
-
ok: '确定',
|
|
726
|
-
timeSelect: '选择时间',
|
|
727
|
-
dateSelect: '选择日期',
|
|
728
|
-
weekSelect: '选择周',
|
|
729
|
-
clear: '清除',
|
|
730
|
-
month: '月',
|
|
731
|
-
year: '年',
|
|
732
|
-
previousMonth: '上个月 (翻页上键)',
|
|
733
|
-
nextMonth: '下个月 (翻页下键)',
|
|
734
|
-
monthSelect: '选择月份',
|
|
735
|
-
yearSelect: '选择年份',
|
|
736
|
-
decadeSelect: '选择年代',
|
|
737
|
-
yearFormat: 'YYYY年',
|
|
738
|
-
dayFormat: 'D日',
|
|
739
|
-
dateFormat: 'YYYY年M月D日',
|
|
740
|
-
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
741
|
-
previousYear: '上一年 (Control键加左方向键)',
|
|
742
|
-
nextYear: '下一年 (Control键加右方向键)',
|
|
743
|
-
previousDecade: '上一年代',
|
|
744
|
-
nextDecade: '下一年代',
|
|
745
|
-
previousCentury: '上一世纪',
|
|
746
|
-
nextCentury: '下一世纪'
|
|
747
|
-
},
|
|
748
|
-
timePickerLocale: {
|
|
749
|
-
placeholder: '请选择时间',
|
|
750
|
-
rangePlaceholder: ['开始时间', '结束时间']
|
|
751
|
-
}
|
|
752
|
-
},
|
|
753
|
-
global: {
|
|
754
|
-
placeholder: '请选择'
|
|
755
|
-
},
|
|
756
|
-
Table: {
|
|
757
|
-
filterTitle: '筛选',
|
|
758
|
-
filterConfirm: '确定',
|
|
759
|
-
filterReset: '重置',
|
|
760
|
-
filterEmptyText: '无筛选项',
|
|
761
|
-
filterCheckall: '全选',
|
|
762
|
-
filterSearchPlaceholder: '在筛选项中搜索',
|
|
763
|
-
selectAll: '全选当页',
|
|
764
|
-
selectInvert: '反选当页',
|
|
765
|
-
selectNone: '清空所有',
|
|
766
|
-
selectionAll: '全选所有',
|
|
767
|
-
sortTitle: '排序',
|
|
768
|
-
expand: '展开行',
|
|
769
|
-
collapse: '关闭行',
|
|
770
|
-
triggerDesc: '点击降序',
|
|
771
|
-
triggerAsc: '点击升序',
|
|
772
|
-
cancelSort: '取消排序'
|
|
773
|
-
},
|
|
774
|
-
Modal: {
|
|
775
|
-
okText: '确定',
|
|
776
|
-
cancelText: '取消',
|
|
777
|
-
justOkText: '知道了'
|
|
778
|
-
},
|
|
779
|
-
Tour: {
|
|
780
|
-
Next: '下一步',
|
|
781
|
-
Previous: '上一步',
|
|
782
|
-
Finish: '结束导览'
|
|
783
|
-
},
|
|
784
|
-
Popconfirm: {
|
|
785
|
-
cancelText: '取消',
|
|
786
|
-
okText: '确定'
|
|
787
|
-
},
|
|
788
|
-
Transfer: {
|
|
789
|
-
titles: ['', ''],
|
|
790
|
-
searchPlaceholder: '请输入搜索内容',
|
|
791
|
-
itemUnit: '项',
|
|
792
|
-
itemsUnit: '项',
|
|
793
|
-
remove: '删除',
|
|
794
|
-
selectCurrent: '全选当页',
|
|
795
|
-
removeCurrent: '删除当页',
|
|
796
|
-
selectAll: '全选所有',
|
|
797
|
-
removeAll: '删除全部',
|
|
798
|
-
selectInvert: '反选当页'
|
|
799
|
-
},
|
|
800
|
-
Upload: {
|
|
801
|
-
uploading: '文件上传中',
|
|
802
|
-
removeFile: '删除文件',
|
|
803
|
-
uploadError: '上传错误',
|
|
804
|
-
previewFile: '预览文件',
|
|
805
|
-
downloadFile: '下载文件'
|
|
806
|
-
},
|
|
807
|
-
Empty: {
|
|
808
|
-
description: '暂无数据'
|
|
809
|
-
},
|
|
810
|
-
Icon: {
|
|
811
|
-
icon: '图标'
|
|
812
|
-
},
|
|
813
|
-
Text: {
|
|
814
|
-
edit: '编辑',
|
|
815
|
-
copy: '复制',
|
|
816
|
-
copied: '复制成功',
|
|
817
|
-
expand: '展开'
|
|
818
|
-
},
|
|
819
|
-
PageHeader: {
|
|
820
|
-
back: '返回'
|
|
821
|
-
},
|
|
822
|
-
Form: {
|
|
823
|
-
optional: '(可选)',
|
|
824
|
-
defaultValidateMessages: {
|
|
825
|
-
default: '字段验证错误${label}',
|
|
826
|
-
required: '请输入${label}',
|
|
827
|
-
enum: '${label}必须是其中一个[${enum}]',
|
|
828
|
-
whitespace: '${label}不能为空字符',
|
|
829
|
-
date: {
|
|
830
|
-
format: '${label}日期格式无效',
|
|
831
|
-
parse: '${label}不能转换为日期',
|
|
832
|
-
invalid: '${label}是一个无效日期'
|
|
833
|
-
},
|
|
834
|
-
types: {
|
|
835
|
-
string: '${label}不是一个有效的${type}',
|
|
836
|
-
method: '${label}不是一个有效的${type}',
|
|
837
|
-
array: '${label}不是一个有效的${type}',
|
|
838
|
-
object: '${label}不是一个有效的${type}',
|
|
839
|
-
number: '${label}不是一个有效的${type}',
|
|
840
|
-
date: '${label}不是一个有效的${type}',
|
|
841
|
-
boolean: '${label}不是一个有效的${type}',
|
|
842
|
-
integer: '${label}不是一个有效的${type}',
|
|
843
|
-
float: '${label}不是一个有效的${type}',
|
|
844
|
-
regexp: '${label}不是一个有效的${type}',
|
|
845
|
-
email: '${label}不是一个有效的${type}',
|
|
846
|
-
url: '${label}不是一个有效的${type}',
|
|
847
|
-
hex: '${label}不是一个有效的${type}'
|
|
848
|
-
},
|
|
849
|
-
string: {
|
|
850
|
-
len: '${label}须为${len}个字符',
|
|
851
|
-
min: '${label}最少${min}个字符',
|
|
852
|
-
max: '${label}最多${max}个字符',
|
|
853
|
-
range: '${label}须在${min}-${max}字符之间'
|
|
854
|
-
},
|
|
855
|
-
number: {
|
|
856
|
-
len: '${label}必须等于${len}',
|
|
857
|
-
min: '${label}最小值为${min}',
|
|
858
|
-
max: '${label}最大值为${max}',
|
|
859
|
-
range: '${label}须在${min}-${max}之间'
|
|
860
|
-
},
|
|
861
|
-
array: {
|
|
862
|
-
len: '须为${len}个${label}',
|
|
863
|
-
min: '最少${min}个${label}',
|
|
864
|
-
max: '最多${max}个${label}',
|
|
865
|
-
range: '${label}数量须在${min}-${max}之间'
|
|
866
|
-
},
|
|
867
|
-
pattern: {
|
|
868
|
-
mismatch: '${label}与模式不匹配${pattern}'
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
},
|
|
872
|
-
Image: {
|
|
873
|
-
preview: '预览'
|
|
874
|
-
},
|
|
875
|
-
QRCode: {
|
|
876
|
-
expired: '二维码过期',
|
|
877
|
-
refresh: '点击刷新'
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* 将组件 props 中的 className 替换为 class
|
|
883
|
-
* @param C
|
|
884
|
-
* @returns
|
|
885
|
-
*/
|
|
886
|
-
function replaceClassName(C) {
|
|
887
|
-
return function (_props) {
|
|
888
|
-
const props = createMemo(() => {
|
|
889
|
-
return {
|
|
890
|
-
...omit(_props, 'class'),
|
|
891
|
-
className: _props.class
|
|
892
|
-
};
|
|
893
|
-
});
|
|
894
|
-
return createComponent(C, mergeProps$1(props));
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* 将组件 props 中的 children 替换为 JSXElement
|
|
899
|
-
* @param C
|
|
900
|
-
* @returns
|
|
901
|
-
*/
|
|
902
|
-
function replaceChildren(C) {
|
|
903
|
-
return function (_props) {
|
|
904
|
-
const props = createMemo(() => {
|
|
905
|
-
return {
|
|
906
|
-
..._props,
|
|
907
|
-
children: solidToReact(_props.children)
|
|
908
|
-
};
|
|
909
|
-
});
|
|
910
|
-
return createComponent(C, mergeProps$1(props));
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
function reactToSolidComponent(component, container) {
|
|
914
|
-
return function (props) {
|
|
915
|
-
return createComponent(ReactToSolid, {
|
|
916
|
-
component: component,
|
|
917
|
-
props: props,
|
|
918
|
-
get container() {
|
|
919
|
-
return typeof container === 'function' ? container() : container;
|
|
920
|
-
}
|
|
921
|
-
});
|
|
922
|
-
};
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* 返回被 ConfigProvider 包裹后的 component
|
|
926
|
-
* @param component
|
|
927
|
-
* @param configProviderProps
|
|
928
|
-
* @returns
|
|
929
|
-
*/
|
|
930
|
-
function configProvider(component, configProviderProps) {
|
|
931
|
-
return function (props) {
|
|
932
|
-
return React.createElement(ConfigProvider, {
|
|
933
|
-
locale: zhCN,
|
|
934
|
-
...configProviderProps
|
|
935
|
-
}, React.createElement(component, props));
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
const RangePicker = replaceClassName(reactToSolidComponent(DatePicker$1.RangePicker));
|
|
940
|
-
const _DatePicker = replaceClassName(reactToSolidComponent(DatePicker$1));
|
|
941
|
-
const DatePicker = _DatePicker;
|
|
942
|
-
DatePicker.RangePicker = RangePicker;
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* 如果传入一个非数组字段,则将其转化为数组
|
|
946
|
-
* @param value
|
|
947
|
-
* @returns
|
|
948
|
-
*/
|
|
949
|
-
function toArray(value) {
|
|
950
|
-
return Array.isArray(value) ? value : [value];
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
function useClickAway(onClickAway, target) {
|
|
954
|
-
const onClick = event => {
|
|
955
|
-
const targets = target ? toArray(target()) : [];
|
|
956
|
-
if (targets.every(item => !item.contains(event.target))) {
|
|
957
|
-
onClickAway(event);
|
|
958
|
-
}
|
|
959
|
-
};
|
|
960
|
-
document.body.addEventListener('click', onClick);
|
|
961
|
-
onCleanup(() => {
|
|
962
|
-
document.body.removeEventListener('click', onClick);
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
const _tmpl$$j = /*#__PURE__*/template(`<div>`);
|
|
967
|
-
const Content = props => {
|
|
968
|
-
return createComponent(Show, {
|
|
969
|
-
get when() {
|
|
970
|
-
return typeof props.content === 'function';
|
|
971
|
-
},
|
|
972
|
-
get fallback() {
|
|
973
|
-
return props.content;
|
|
974
|
-
},
|
|
975
|
-
get children() {
|
|
976
|
-
return memo(() => typeof props.content === 'function')() && props.content(props.close);
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
};
|
|
980
|
-
const Tooltip = _props => {
|
|
981
|
-
const props = mergeProps({
|
|
982
|
-
trigger: 'hover',
|
|
983
|
-
placement: 'top',
|
|
984
|
-
mode: 'dark',
|
|
985
|
-
arrow: true
|
|
986
|
-
}, _props);
|
|
987
|
-
const resolvedChildren = children(() => _props.children);
|
|
988
|
-
let content;
|
|
989
|
-
const [open, setOpen] = createControllableValue(_props, {
|
|
990
|
-
defaultValue: false,
|
|
991
|
-
valuePropName: 'open',
|
|
992
|
-
trigger: 'onOpenChange'
|
|
993
|
-
});
|
|
994
|
-
const reverseOpen = () => setOpen(v => !v);
|
|
995
|
-
createEffect(() => {
|
|
996
|
-
const _children = resolvedChildren();
|
|
997
|
-
toArray(props.trigger).forEach(trigger => {
|
|
998
|
-
switch (trigger) {
|
|
999
|
-
case 'hover':
|
|
1000
|
-
_children.addEventListener('mouseenter', reverseOpen);
|
|
1001
|
-
_children.addEventListener('mouseleave', reverseOpen);
|
|
1002
|
-
onCleanup(() => {
|
|
1003
|
-
_children.removeEventListener('mouseenter', reverseOpen);
|
|
1004
|
-
_children.removeEventListener('mouseleave', reverseOpen);
|
|
1005
|
-
});
|
|
1006
|
-
break;
|
|
1007
|
-
case 'click':
|
|
1008
|
-
_children.addEventListener('click', reverseOpen);
|
|
1009
|
-
onCleanup(() => {
|
|
1010
|
-
_children.removeEventListener('click', reverseOpen);
|
|
1011
|
-
});
|
|
1012
|
-
useClickAway(() => setOpen(false), () => compact([content, _children]));
|
|
1013
|
-
break;
|
|
1014
|
-
case 'focus':
|
|
1015
|
-
_children.addEventListener('focus', reverseOpen);
|
|
1016
|
-
_children.addEventListener('blur', reverseOpen);
|
|
1017
|
-
onCleanup(() => {
|
|
1018
|
-
_children.removeEventListener('focus', reverseOpen);
|
|
1019
|
-
_children.removeEventListener('blur', reverseOpen);
|
|
1020
|
-
});
|
|
1021
|
-
break;
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1024
|
-
});
|
|
1025
|
-
const [childrenRect, setChildrenRect] = createSignal(new DOMRect());
|
|
1026
|
-
createEffect(() => {
|
|
1027
|
-
if (open()) {
|
|
1028
|
-
const _children = resolvedChildren();
|
|
1029
|
-
setChildrenRect(_children.getBoundingClientRect());
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
createMemo(() => {
|
|
1033
|
-
if (props.placement.startsWith('bottom')) return 'bottom';
|
|
1034
|
-
if (props.placement.startsWith('left')) return 'left';
|
|
1035
|
-
if (props.placement.startsWith('right')) return 'right';
|
|
1036
|
-
return 'top';
|
|
1037
|
-
});
|
|
1038
|
-
createMemo(() => {
|
|
1039
|
-
if (props.placement.endsWith('Left')) return 'left';
|
|
1040
|
-
if (props.placement.endsWith('Right')) return 'right';
|
|
1041
|
-
if (props.placement.endsWith('Top')) return 'top';
|
|
1042
|
-
if (props.placement.endsWith('Bottom')) return 'bottom';
|
|
1043
|
-
return 'center';
|
|
1044
|
-
});
|
|
1045
|
-
const arrowOffset = createMemo(() => props.arrow ? 8 : 0);
|
|
1046
|
-
const contentPositionStyle = createMemo(() => {
|
|
1047
|
-
switch (props.placement) {
|
|
1048
|
-
case 'top':
|
|
1049
|
-
return {
|
|
1050
|
-
top: `${childrenRect().top - arrowOffset()}px`,
|
|
1051
|
-
left: `${childrenRect().left + childrenRect().width / 2}px`,
|
|
1052
|
-
transform: 'translate(-50%, -100%)'
|
|
1053
|
-
};
|
|
1054
|
-
case 'topLeft':
|
|
1055
|
-
return {
|
|
1056
|
-
top: `${childrenRect().top - arrowOffset()}px`,
|
|
1057
|
-
left: `${childrenRect().left}px`,
|
|
1058
|
-
transform: 'translate(0, -100%)'
|
|
1059
|
-
};
|
|
1060
|
-
case 'topRight':
|
|
1061
|
-
return {
|
|
1062
|
-
top: `${childrenRect().top - arrowOffset()}px`,
|
|
1063
|
-
left: `${childrenRect().right}px`,
|
|
1064
|
-
transform: 'translate(-100%, -100%)'
|
|
1065
|
-
};
|
|
1066
|
-
case 'bottom':
|
|
1067
|
-
return {
|
|
1068
|
-
top: `${childrenRect().bottom + arrowOffset()}px`,
|
|
1069
|
-
left: `${childrenRect().left + childrenRect().width / 2}px`,
|
|
1070
|
-
transform: 'translate(-50%, 0)'
|
|
1071
|
-
};
|
|
1072
|
-
case 'bottomLeft':
|
|
1073
|
-
return {
|
|
1074
|
-
top: `${childrenRect().bottom + arrowOffset()}px`,
|
|
1075
|
-
left: `${childrenRect().left}px`
|
|
1076
|
-
};
|
|
1077
|
-
case 'bottomRight':
|
|
1078
|
-
return {
|
|
1079
|
-
top: `${childrenRect().bottom + arrowOffset()}px`,
|
|
1080
|
-
left: `${childrenRect().right}px`,
|
|
1081
|
-
transform: 'translate(-100%, 0)'
|
|
1082
|
-
};
|
|
1083
|
-
case 'left':
|
|
1084
|
-
return {
|
|
1085
|
-
top: `${childrenRect().top + childrenRect().height / 2}px`,
|
|
1086
|
-
left: `${childrenRect().left - arrowOffset()}px`,
|
|
1087
|
-
transform: 'translate(-100%, -50%)'
|
|
1088
|
-
};
|
|
1089
|
-
case 'leftTop':
|
|
1090
|
-
return {
|
|
1091
|
-
top: `${childrenRect().top}px`,
|
|
1092
|
-
left: `${childrenRect().left - arrowOffset()}px`,
|
|
1093
|
-
transform: 'translate(-100%)'
|
|
1094
|
-
};
|
|
1095
|
-
case 'leftBottom':
|
|
1096
|
-
return {
|
|
1097
|
-
top: `${childrenRect().bottom}px`,
|
|
1098
|
-
left: `${childrenRect().left - arrowOffset()}px`,
|
|
1099
|
-
transform: 'translate(-100%, -100%)'
|
|
1100
|
-
};
|
|
1101
|
-
case 'right':
|
|
1102
|
-
return {
|
|
1103
|
-
top: `${childrenRect().top + childrenRect().height / 2}px`,
|
|
1104
|
-
left: `${childrenRect().right + arrowOffset()}px`,
|
|
1105
|
-
transform: 'translate(0, -50%)'
|
|
1106
|
-
};
|
|
1107
|
-
case 'rightTop':
|
|
1108
|
-
return {
|
|
1109
|
-
top: `${childrenRect().top}px`,
|
|
1110
|
-
left: `${childrenRect().right + arrowOffset()}px`
|
|
1111
|
-
};
|
|
1112
|
-
case 'rightBottom':
|
|
1113
|
-
return {
|
|
1114
|
-
top: `${childrenRect().bottom}px`,
|
|
1115
|
-
left: `${childrenRect().right + arrowOffset()}px`,
|
|
1116
|
-
transform: 'translate(0, -100%)'
|
|
1117
|
-
};
|
|
1118
|
-
}
|
|
1119
|
-
});
|
|
1120
|
-
const arrowStyle = createMemo(() => {
|
|
1121
|
-
switch (props.placement) {
|
|
1122
|
-
case 'top':
|
|
1123
|
-
return {
|
|
1124
|
-
'border-top-color': 'var(--color)',
|
|
1125
|
-
top: '100%',
|
|
1126
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1127
|
-
left: '50%',
|
|
1128
|
-
transform: 'translateX(-50%)'
|
|
1129
|
-
};
|
|
1130
|
-
case 'topLeft':
|
|
1131
|
-
return {
|
|
1132
|
-
'border-top-color': 'var(--color)',
|
|
1133
|
-
top: '100%',
|
|
1134
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1135
|
-
left: '8px'
|
|
1136
|
-
};
|
|
1137
|
-
case 'topRight':
|
|
1138
|
-
return {
|
|
1139
|
-
'border-top-color': 'var(--color)',
|
|
1140
|
-
top: '100%',
|
|
1141
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1142
|
-
right: '8px'
|
|
1143
|
-
};
|
|
1144
|
-
case 'bottom':
|
|
1145
|
-
return {
|
|
1146
|
-
'border-bottom-color': 'var(--color)',
|
|
1147
|
-
bottom: '100%',
|
|
1148
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1149
|
-
left: '50%',
|
|
1150
|
-
transform: 'translateX(-50%)'
|
|
1151
|
-
};
|
|
1152
|
-
case 'bottomLeft':
|
|
1153
|
-
return {
|
|
1154
|
-
'border-bottom-color': 'var(--color)',
|
|
1155
|
-
bottom: '100%',
|
|
1156
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1157
|
-
left: '8px'
|
|
1158
|
-
};
|
|
1159
|
-
case 'bottomRight':
|
|
1160
|
-
return {
|
|
1161
|
-
'border-bottom-color': 'var(--color)',
|
|
1162
|
-
bottom: '100%',
|
|
1163
|
-
filter: 'drop-shadow(3px 2px 2px rgba(0, 0, 0, 0.08))',
|
|
1164
|
-
right: '8px'
|
|
1165
|
-
};
|
|
1166
|
-
case 'left':
|
|
1167
|
-
return {
|
|
1168
|
-
'border-left-color': 'var(--color)',
|
|
1169
|
-
top: '50%',
|
|
1170
|
-
right: 0,
|
|
1171
|
-
transform: 'translate(100%, -50%)'
|
|
1172
|
-
};
|
|
1173
|
-
case 'leftTop':
|
|
1174
|
-
return {
|
|
1175
|
-
'border-left-color': 'var(--color)',
|
|
1176
|
-
top: '8px',
|
|
1177
|
-
right: 0,
|
|
1178
|
-
transform: 'translate(100%, 0)'
|
|
1179
|
-
};
|
|
1180
|
-
case 'leftBottom':
|
|
1181
|
-
return {
|
|
1182
|
-
'border-left-color': 'var(--color)',
|
|
1183
|
-
bottom: '8px',
|
|
1184
|
-
right: 0,
|
|
1185
|
-
transform: 'translate(100%, 0)'
|
|
1186
|
-
};
|
|
1187
|
-
case 'right':
|
|
1188
|
-
return {
|
|
1189
|
-
'border-right-color': 'var(--color)',
|
|
1190
|
-
top: '50%',
|
|
1191
|
-
left: 0,
|
|
1192
|
-
transform: 'translate(-100%, -50%)'
|
|
1193
|
-
};
|
|
1194
|
-
case 'rightTop':
|
|
1195
|
-
return {
|
|
1196
|
-
'border-right-color': 'var(--color)',
|
|
1197
|
-
top: '8px',
|
|
1198
|
-
left: 0,
|
|
1199
|
-
transform: 'translate(-100%, 0)'
|
|
1200
|
-
};
|
|
1201
|
-
case 'rightBottom':
|
|
1202
|
-
return {
|
|
1203
|
-
'border-right-color': 'var(--color)',
|
|
1204
|
-
bottom: '8px',
|
|
1205
|
-
left: 0,
|
|
1206
|
-
transform: 'translate(-100%, 0)'
|
|
1207
|
-
};
|
|
1208
|
-
}
|
|
1209
|
-
});
|
|
1210
|
-
return [memo(resolvedChildren), createComponent(Show, {
|
|
1211
|
-
get when() {
|
|
1212
|
-
return open();
|
|
1213
|
-
},
|
|
1214
|
-
get children() {
|
|
1215
|
-
return createComponent(Portal, {
|
|
1216
|
-
get children() {
|
|
1217
|
-
const _el$ = _tmpl$$j();
|
|
1218
|
-
_el$.$$click = e => {
|
|
1219
|
-
e.stopPropagation();
|
|
1220
|
-
};
|
|
1221
|
-
const _ref$ = content;
|
|
1222
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : content = _el$;
|
|
1223
|
-
insert(_el$, createComponent(Content, {
|
|
1224
|
-
get content() {
|
|
1225
|
-
return props.content;
|
|
1226
|
-
},
|
|
1227
|
-
close: () => setOpen(false)
|
|
1228
|
-
}), null);
|
|
1229
|
-
insert(_el$, createComponent(Show, {
|
|
1230
|
-
get when() {
|
|
1231
|
-
return props.arrow;
|
|
1232
|
-
},
|
|
1233
|
-
get children() {
|
|
1234
|
-
const _el$2 = _tmpl$$j();
|
|
1235
|
-
effect(_p$ => {
|
|
1236
|
-
const _v$ = cs('ant-w-8px ant-h-8px ant-absolute ant-border-solid ant-border-4px ant-border-transparent'),
|
|
1237
|
-
_v$2 = {
|
|
1238
|
-
'--color': props.mode === 'dark' ? 'rgba(0,0,0,0.85)' : 'white',
|
|
1239
|
-
...arrowStyle()
|
|
1240
|
-
};
|
|
1241
|
-
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
1242
|
-
_p$._v$2 = style(_el$2, _v$2, _p$._v$2);
|
|
1243
|
-
return _p$;
|
|
1244
|
-
}, {
|
|
1245
|
-
_v$: undefined,
|
|
1246
|
-
_v$2: undefined
|
|
1247
|
-
});
|
|
1248
|
-
return _el$2;
|
|
1249
|
-
}
|
|
1250
|
-
}), null);
|
|
1251
|
-
effect(_p$ => {
|
|
1252
|
-
const _v$3 = cs('ant-z-1000 ant-fixed ant-absolute ant-px-8px ant-py-6px ant-rounded-8px ant-box-content ant-[box-shadow:0_6px_16px_0_rgba(0,0,0,0.08),0_3px_6px_-4px_rgba(0,0,0,0.12),0_9px_28px_8px_rgba(0,0,0,0.05)]', props.mode === 'dark' ? 'ant-bg-[rgba(0,0,0,0.85)] ant-text-white' : 'ant-bg-white'),
|
|
1253
|
-
_v$4 = {
|
|
1254
|
-
...contentPositionStyle(),
|
|
1255
|
-
...props.contentStyle
|
|
1256
|
-
};
|
|
1257
|
-
_v$3 !== _p$._v$3 && className(_el$, _p$._v$3 = _v$3);
|
|
1258
|
-
_p$._v$4 = style(_el$, _v$4, _p$._v$4);
|
|
1259
|
-
return _p$;
|
|
1260
|
-
}, {
|
|
1261
|
-
_v$3: undefined,
|
|
1262
|
-
_v$4: undefined
|
|
1263
|
-
});
|
|
1264
|
-
return _el$;
|
|
1265
|
-
}
|
|
1266
|
-
});
|
|
1267
|
-
}
|
|
1268
|
-
})];
|
|
1269
|
-
};
|
|
1270
|
-
delegateEvents(["click"]);
|
|
1271
|
-
|
|
1272
|
-
const _tmpl$$i = /*#__PURE__*/template(`<div>`),
|
|
1273
|
-
_tmpl$2$9 = /*#__PURE__*/template(`<span class="i-ant-design:close-circle-filled ant-cursor-pointer ant-text-[var(--ant-clear-color)] hover:ant-text-[var(--ant-clear-color-hover)]">`),
|
|
1274
|
-
_tmpl$3$6 = /*#__PURE__*/template(`<div tabindex="0"><div class="ant-relative ant-h-full"><div class="ant-absolute ant-top-0 ant-bottom-0 ant-right-0">`),
|
|
1275
|
-
_tmpl$4$3 = /*#__PURE__*/template(`<div class="ant-bg-white ant-w-200px">`),
|
|
1276
|
-
_tmpl$5 = /*#__PURE__*/template(`<input class="ant-h-full ant-w-full ant-float-left ant-[outline:none]" readonly>`),
|
|
1277
|
-
_tmpl$6 = /*#__PURE__*/template(`<span class="i-ant-design:down-outlined ant-text-[var(--ant-allow-color)]">`);
|
|
1278
|
-
const Select = props => {
|
|
1279
|
-
let select;
|
|
1280
|
-
const [value, setValue] = createControllableValue(props);
|
|
1281
|
-
const selectedValue = createSelector(value);
|
|
1282
|
-
const selectedOption = createMemo(() => !isNil(value()) ? props.options.find(option => option.value === value()) : undefined);
|
|
1283
|
-
const [open, setOpen] = createSignal(false);
|
|
1284
|
-
useClickAway(() => setOpen(false), () => select);
|
|
1285
|
-
const [width, setWidth] = createSignal(0);
|
|
1286
|
-
const [hover, setHover] = createSignal(false);
|
|
1287
|
-
const showClearBtn = createMemo(() => props.allowClear && hover() && !isNil(value()));
|
|
1288
|
-
return createComponent(Tooltip, {
|
|
1289
|
-
mode: "light",
|
|
1290
|
-
get open() {
|
|
1291
|
-
return open();
|
|
1292
|
-
},
|
|
1293
|
-
onOpenChange: setOpen,
|
|
1294
|
-
trigger: [],
|
|
1295
|
-
placement: "bottomLeft",
|
|
1296
|
-
arrow: false,
|
|
1297
|
-
contentStyle: {
|
|
1298
|
-
padding: 0
|
|
1299
|
-
},
|
|
1300
|
-
content: close => (() => {
|
|
1301
|
-
const _el$6 = _tmpl$4$3();
|
|
1302
|
-
insert(_el$6, createComponent(For, {
|
|
1303
|
-
get each() {
|
|
1304
|
-
return props.options;
|
|
1305
|
-
},
|
|
1306
|
-
children: item => (() => {
|
|
1307
|
-
const _el$7 = _tmpl$$i();
|
|
1308
|
-
_el$7.$$click = () => {
|
|
1309
|
-
setValue(item.value);
|
|
1310
|
-
close();
|
|
1311
|
-
};
|
|
1312
|
-
insert(_el$7, () => item.label);
|
|
1313
|
-
effect(() => className(_el$7, cs('ant-box-content ant-px-12px ant-py-5px ant-h-22px ant-leading-22px hover:ant-bg-[var(--hover-bg-color)]', selectedValue(item.value) ? '!ant-bg-[var(--active-bg-color)]' : '')));
|
|
1314
|
-
return _el$7;
|
|
1315
|
-
})()
|
|
1316
|
-
}));
|
|
1317
|
-
effect(() => `${width()}px` != null ? _el$6.style.setProperty("width", `${width()}px`) : _el$6.style.removeProperty("width"));
|
|
1318
|
-
return _el$6;
|
|
1319
|
-
})(),
|
|
1320
|
-
get children() {
|
|
1321
|
-
const _el$ = _tmpl$3$6(),
|
|
1322
|
-
_el$2 = _el$.firstChild,
|
|
1323
|
-
_el$4 = _el$2.firstChild;
|
|
1324
|
-
_el$.addEventListener("mouseleave", () => setHover(false));
|
|
1325
|
-
_el$.addEventListener("mouseenter", () => setHover(true));
|
|
1326
|
-
_el$.$$click = e => {
|
|
1327
|
-
setOpen(true);
|
|
1328
|
-
setWidth(e.currentTarget.offsetWidth);
|
|
1329
|
-
e.currentTarget.focus();
|
|
1330
|
-
};
|
|
1331
|
-
const _ref$ = select;
|
|
1332
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : select = _el$;
|
|
1333
|
-
_el$.style.setProperty("--ant-arrow-color", "rgba(146, 146, 146, 1)");
|
|
1334
|
-
_el$.style.setProperty("--ant-clear-color", "rgba(146, 146, 146, 1)");
|
|
1335
|
-
_el$.style.setProperty("--ant-clear-color-hover", "rgba(194, 194, 194, 1)");
|
|
1336
|
-
insert(_el$2, createComponent(Show, {
|
|
1337
|
-
get when() {
|
|
1338
|
-
return !isNil(value());
|
|
1339
|
-
},
|
|
1340
|
-
get fallback() {
|
|
1341
|
-
return (() => {
|
|
1342
|
-
const _el$8 = _tmpl$5();
|
|
1343
|
-
effect(() => setAttribute(_el$8, "placeholder", props.placeholder));
|
|
1344
|
-
return _el$8;
|
|
1345
|
-
})();
|
|
1346
|
-
},
|
|
1347
|
-
get children() {
|
|
1348
|
-
const _el$3 = _tmpl$$i();
|
|
1349
|
-
insert(_el$3, () => selectedOption().label ?? value());
|
|
1350
|
-
return _el$3;
|
|
1351
|
-
}
|
|
1352
|
-
}), _el$4);
|
|
1353
|
-
insert(_el$4, createComponent(Show, {
|
|
1354
|
-
get when() {
|
|
1355
|
-
return showClearBtn();
|
|
1356
|
-
},
|
|
1357
|
-
get fallback() {
|
|
1358
|
-
return _tmpl$6();
|
|
1359
|
-
},
|
|
1360
|
-
get children() {
|
|
1361
|
-
const _el$5 = _tmpl$2$9();
|
|
1362
|
-
_el$5.$$click = e => {
|
|
1363
|
-
e.stopPropagation();
|
|
1364
|
-
setValue(undefined);
|
|
1365
|
-
};
|
|
1366
|
-
return _el$5;
|
|
1367
|
-
}
|
|
1368
|
-
}));
|
|
1369
|
-
effect(() => className(_el$, cs('ant-h-32px ant-leading-32px ant-rounded-6px ant-[border:1px_solid_var(--ant-color-border)] ant-px-11px focus:ant-[border-color:var(--primary-color)]', props.class)));
|
|
1370
|
-
return _el$;
|
|
1371
|
-
}
|
|
1372
|
-
});
|
|
1373
|
-
};
|
|
1374
|
-
delegateEvents(["click"]);
|
|
1375
|
-
|
|
1376
|
-
const _tmpl$$h = /*#__PURE__*/template(`<span class="i-ant-design:minus-square-outlined">`),
|
|
1377
|
-
_tmpl$2$8 = /*#__PURE__*/template(`<div><div class="flex-shrink-0" role="indent"></div><div class="ant-flex-shrink-0 ant-w-24px ant-h-24px ant-flex ant-items-center ant-justify-center"><span class="i-ant-design:holder-outlined"></span></div><div></div><div>`),
|
|
1378
|
-
_tmpl$3$5 = /*#__PURE__*/template(`<span class="ant-inline-block ant-w-24px">`),
|
|
1379
|
-
_tmpl$4$2 = /*#__PURE__*/template(`<span class="i-ant-design:plus-square-outlined">`);
|
|
1380
|
-
const TreeContext = createContext({});
|
|
1381
|
-
/**
|
|
1382
|
-
* 单层级 tree
|
|
1383
|
-
*/
|
|
1384
|
-
function SingleLevelTree(props) {
|
|
1385
|
-
const [expanded, setExpanded] = createSignal(props.defaultExpandAll);
|
|
1386
|
-
const {
|
|
1387
|
-
selectedNodes,
|
|
1388
|
-
setSelectedNodes,
|
|
1389
|
-
draggableNode,
|
|
1390
|
-
setDraggableNode,
|
|
1391
|
-
draggableIndexes,
|
|
1392
|
-
setDraggableIndexes,
|
|
1393
|
-
isDraggable,
|
|
1394
|
-
targetNode,
|
|
1395
|
-
setTargetNode,
|
|
1396
|
-
targetIndexes,
|
|
1397
|
-
setTargetIndexes,
|
|
1398
|
-
isTarget,
|
|
1399
|
-
draggable,
|
|
1400
|
-
onDrop
|
|
1401
|
-
} = useContext(TreeContext);
|
|
1402
|
-
return createComponent(Index, {
|
|
1403
|
-
get each() {
|
|
1404
|
-
return props.treeData;
|
|
1405
|
-
},
|
|
1406
|
-
children: (item, i) => {
|
|
1407
|
-
const indexes = [...(props.parentIndexes ?? []), i];
|
|
1408
|
-
return [(() => {
|
|
1409
|
-
const _el$ = _tmpl$2$8(),
|
|
1410
|
-
_el$2 = _el$.firstChild,
|
|
1411
|
-
_el$3 = _el$2.nextSibling,
|
|
1412
|
-
_el$4 = _el$3.nextSibling,
|
|
1413
|
-
_el$6 = _el$4.nextSibling;
|
|
1414
|
-
_el$.addEventListener("dragend", () => {
|
|
1415
|
-
onDrop?.({
|
|
1416
|
-
dragNode: draggableNode(),
|
|
1417
|
-
dragIndexes: draggableIndexes(),
|
|
1418
|
-
targetNode: targetNode(),
|
|
1419
|
-
targetIndexes: targetIndexes()
|
|
1420
|
-
});
|
|
1421
|
-
setDraggableNode(null);
|
|
1422
|
-
setDraggableIndexes(null);
|
|
1423
|
-
setTargetNode(null);
|
|
1424
|
-
setTargetIndexes(null);
|
|
1425
|
-
});
|
|
1426
|
-
_el$.addEventListener("dragleave", e => {
|
|
1427
|
-
if (item() === targetNode() && e.relatedTarget) {
|
|
1428
|
-
setTargetNode(null);
|
|
1429
|
-
setTargetIndexes(null);
|
|
1430
|
-
}
|
|
1431
|
-
});
|
|
1432
|
-
_el$.addEventListener("dragenter", () => {
|
|
1433
|
-
if (item() !== draggableNode()) {
|
|
1434
|
-
setTargetNode(item());
|
|
1435
|
-
setTargetIndexes(indexes);
|
|
1436
|
-
}
|
|
1437
|
-
});
|
|
1438
|
-
_el$.addEventListener("dragstart", () => {
|
|
1439
|
-
setDraggableNode(item());
|
|
1440
|
-
setDraggableIndexes(indexes);
|
|
1441
|
-
});
|
|
1442
|
-
setAttribute(_el$, "draggable", draggable);
|
|
1443
|
-
insert(_el$2, () => Array(props.indent).fill(0).map(() => _tmpl$3$5()));
|
|
1444
|
-
insert(_el$4, createComponent(Show, {
|
|
1445
|
-
get when() {
|
|
1446
|
-
return expanded();
|
|
1447
|
-
},
|
|
1448
|
-
get fallback() {
|
|
1449
|
-
return (() => {
|
|
1450
|
-
const _el$8 = _tmpl$4$2();
|
|
1451
|
-
_el$8.$$click = setExpanded;
|
|
1452
|
-
_el$8.$$clickData = true;
|
|
1453
|
-
return _el$8;
|
|
1454
|
-
})();
|
|
1455
|
-
},
|
|
1456
|
-
get children() {
|
|
1457
|
-
const _el$5 = _tmpl$$h();
|
|
1458
|
-
_el$5.$$click = setExpanded;
|
|
1459
|
-
_el$5.$$clickData = false;
|
|
1460
|
-
return _el$5;
|
|
1461
|
-
}
|
|
1462
|
-
}));
|
|
1463
|
-
_el$6.$$click = () => {
|
|
1464
|
-
setSelectedNodes([item()]);
|
|
1465
|
-
props.onSelect?.(item());
|
|
1466
|
-
};
|
|
1467
|
-
insert(_el$6, () => props.titleRender(item(), {
|
|
1468
|
-
indexes
|
|
1469
|
-
}));
|
|
1470
|
-
effect(_p$ => {
|
|
1471
|
-
const _v$ = cs('ant-flex ant-items-center ant-h-28px ant-pb-4px', isDraggable(item()) && 'ant-[border:1px_solid_var(--primary-color)] ant-bg-white', draggableNode() && 'child[]:ant-pointer-events-none'),
|
|
1472
|
-
_v$2 = cs('ant-flex-shrink-0 ant-w-24px ant-h-24px ant-flex ant-items-center ant-justify-center ant-cursor-pointer', isEmpty(props.children(item())) && 'opacity-0'),
|
|
1473
|
-
_v$3 = cs('ant-h-full ant-leading-24px hover:ant-bg-[var(--hover-bg-color)] ant-rounded-1 ant-px-1 ant-cursor-pointer ant-relative', props.blockNode && 'w-full', selectedNodes()?.includes(item()) && '!ant-bg-[var(--active-bg-color)]', isTarget(item()) && "before:ant-content-[''] before:ant-inline-block before:ant-w-8px before:ant-h-8px before:ant-absolute before:ant-bottom-0 before:ant-left-0 before:-ant-translate-x-full before:ant-translate-y-1/2 before:ant-rounded-1/2 before:ant-[border:2px_solid_var(--primary-color)] after:ant-content-[''] after:ant-inline-block after:ant-h-2px after:ant-absolute after:ant-left-0 after:ant-right-0 after:ant-bottom--1px after:ant-bg-[var(--primary-color)]");
|
|
1474
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
1475
|
-
_v$2 !== _p$._v$2 && className(_el$4, _p$._v$2 = _v$2);
|
|
1476
|
-
_v$3 !== _p$._v$3 && className(_el$6, _p$._v$3 = _v$3);
|
|
1477
|
-
return _p$;
|
|
1478
|
-
}, {
|
|
1479
|
-
_v$: undefined,
|
|
1480
|
-
_v$2: undefined,
|
|
1481
|
-
_v$3: undefined
|
|
1482
|
-
});
|
|
1483
|
-
return _el$;
|
|
1484
|
-
})(), createComponent(Show, {
|
|
1485
|
-
get when() {
|
|
1486
|
-
return memo(() => !!expanded())() && !isEmpty(props.children(item()));
|
|
1487
|
-
},
|
|
1488
|
-
get children() {
|
|
1489
|
-
return createComponent(SingleLevelTree, {
|
|
1490
|
-
get treeData() {
|
|
1491
|
-
return props.children(item());
|
|
1492
|
-
},
|
|
1493
|
-
get indent() {
|
|
1494
|
-
return props.indent + 1;
|
|
1495
|
-
},
|
|
1496
|
-
parentIndexes: indexes,
|
|
1497
|
-
get blockNode() {
|
|
1498
|
-
return props.blockNode;
|
|
1499
|
-
},
|
|
1500
|
-
get defaultExpandAll() {
|
|
1501
|
-
return props.defaultExpandAll;
|
|
1502
|
-
},
|
|
1503
|
-
get titleRender() {
|
|
1504
|
-
return props.titleRender;
|
|
1505
|
-
},
|
|
1506
|
-
get children() {
|
|
1507
|
-
return props.children;
|
|
1508
|
-
},
|
|
1509
|
-
onSelect: node => untrack(() => props.onSelect?.(node))
|
|
1510
|
-
});
|
|
1511
|
-
}
|
|
1512
|
-
})];
|
|
1513
|
-
}
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
function Tree(props) {
|
|
1517
|
-
const [selectedNodes, setSelectedNodes] = createSignal(props.defaultSelectedNodes ?? []);
|
|
1518
|
-
const [draggableNode, setDraggableNode] = createSignal(null);
|
|
1519
|
-
const isDraggable = createSelector(draggableNode);
|
|
1520
|
-
const [draggableIndexes, setDraggableIndexes] = createSignal(null);
|
|
1521
|
-
const [targetNode, setTargetNode] = createSignal(null);
|
|
1522
|
-
const isTarget = createSelector(targetNode);
|
|
1523
|
-
const [targetIndexes, setTargetIndexes] = createSignal(null);
|
|
1524
|
-
return createComponent(TreeContext.Provider, {
|
|
1525
|
-
get value() {
|
|
1526
|
-
return {
|
|
1527
|
-
selectedNodes,
|
|
1528
|
-
setSelectedNodes: setSelectedNodes,
|
|
1529
|
-
draggableNode,
|
|
1530
|
-
setDraggableNode: setDraggableNode,
|
|
1531
|
-
draggableIndexes,
|
|
1532
|
-
setDraggableIndexes,
|
|
1533
|
-
isDraggable,
|
|
1534
|
-
targetNode,
|
|
1535
|
-
setTargetNode: setTargetNode,
|
|
1536
|
-
targetIndexes,
|
|
1537
|
-
setTargetIndexes,
|
|
1538
|
-
isTarget,
|
|
1539
|
-
draggable: props.draggable,
|
|
1540
|
-
onDrop: props.onDrop
|
|
1541
|
-
};
|
|
1542
|
-
},
|
|
1543
|
-
get children() {
|
|
1544
|
-
return createComponent(SingleLevelTree, {
|
|
1545
|
-
get treeData() {
|
|
1546
|
-
return props.treeData;
|
|
1547
|
-
},
|
|
1548
|
-
indent: 0,
|
|
1549
|
-
get blockNode() {
|
|
1550
|
-
return props.blockNode;
|
|
1551
|
-
},
|
|
1552
|
-
get defaultExpandAll() {
|
|
1553
|
-
return props.defaultExpandAll;
|
|
1554
|
-
},
|
|
1555
|
-
get titleRender() {
|
|
1556
|
-
return props.titleRender;
|
|
1557
|
-
},
|
|
1558
|
-
get children() {
|
|
1559
|
-
return props.children;
|
|
1560
|
-
},
|
|
1561
|
-
onSelect: node => untrack(() => props.onSelect?.(node))
|
|
1562
|
-
});
|
|
1563
|
-
}
|
|
1564
|
-
});
|
|
1565
|
-
}
|
|
1566
|
-
delegateEvents(["click"]);
|
|
1567
|
-
|
|
1568
|
-
const _tmpl$$g = /*#__PURE__*/template(`<div class="ant-mb-8px ant-flex ant-items-center"><span class="ant-text-[rgba(0,0,0,0.88)] ant-font-600">`),
|
|
1569
|
-
_tmpl$2$7 = /*#__PURE__*/template(`<div><div class="ant-text-[rgba(0,0,0,0.88)]">`);
|
|
1570
|
-
const Popover = props => {
|
|
1571
|
-
return createComponent(Tooltip, mergeProps$1({
|
|
1572
|
-
mode: "light"
|
|
1573
|
-
}, props, {
|
|
1574
|
-
content: close => (() => {
|
|
1575
|
-
const _el$ = _tmpl$2$7(),
|
|
1576
|
-
_el$4 = _el$.firstChild;
|
|
1577
|
-
insert(_el$, createComponent(Show, {
|
|
1578
|
-
get when() {
|
|
1579
|
-
return props.title;
|
|
1580
|
-
},
|
|
1581
|
-
get children() {
|
|
1582
|
-
const _el$2 = _tmpl$$g(),
|
|
1583
|
-
_el$3 = _el$2.firstChild;
|
|
1584
|
-
insert(_el$3, () => props.title);
|
|
1585
|
-
return _el$2;
|
|
1586
|
-
}
|
|
1587
|
-
}), _el$4);
|
|
1588
|
-
insert(_el$4, createComponent(Content, {
|
|
1589
|
-
get content() {
|
|
1590
|
-
return props.content;
|
|
1591
|
-
},
|
|
1592
|
-
close: close
|
|
1593
|
-
}));
|
|
1594
|
-
return _el$;
|
|
1595
|
-
})()
|
|
1596
|
-
}));
|
|
1597
|
-
};
|
|
1598
|
-
|
|
1599
|
-
var ColorPicker = reactToSolidComponent(ColorPicker$1);
|
|
1600
|
-
|
|
1601
|
-
const _tmpl$$f = /*#__PURE__*/template(`<div class="ant-text-center ant-px-32px ant-py-48px"><div class="ant-mb-24px"><span></span></div><div class="ant-my-8px ant-text-[rgba(0,0,0,.88)] ant-text-24px"></div><div class="ant-text-[rgba(0,0,0,.45)] ant-text-14px"></div><div class="ant-mt-24px"></div><div class="ant-mt-24px">`);
|
|
1602
|
-
const statusIconMap = {
|
|
1603
|
-
success: 'ant-text-#52c41a i-ant-design:check-circle-filled',
|
|
1604
|
-
info: 'ant-text-[var(--primary-color)] i-ant-design:exclamation-circle-filled',
|
|
1605
|
-
warning: 'ant-text-#faad14 i-ant-design:warning-filled',
|
|
1606
|
-
error: 'ant-text-#ff4d4f i-ant-design:close-circle-filled'
|
|
1607
|
-
};
|
|
1608
|
-
const Result = props => {
|
|
1609
|
-
return (() => {
|
|
1610
|
-
const _el$ = _tmpl$$f(),
|
|
1611
|
-
_el$2 = _el$.firstChild,
|
|
1612
|
-
_el$3 = _el$2.firstChild,
|
|
1613
|
-
_el$4 = _el$2.nextSibling,
|
|
1614
|
-
_el$5 = _el$4.nextSibling,
|
|
1615
|
-
_el$6 = _el$5.nextSibling,
|
|
1616
|
-
_el$7 = _el$6.nextSibling;
|
|
1617
|
-
insert(_el$4, () => props.title);
|
|
1618
|
-
insert(_el$5, () => props.subTitle);
|
|
1619
|
-
insert(_el$6, () => props.extra);
|
|
1620
|
-
insert(_el$7, () => props.children);
|
|
1621
|
-
effect(() => className(_el$3, cs(statusIconMap[props.status], 'ant-text-72px')));
|
|
1622
|
-
return _el$;
|
|
1623
|
-
})();
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
|
-
var Progress = replaceChildren(replaceClassName(reactToSolidComponent(Progress$1)));
|
|
1627
|
-
|
|
1628
|
-
const _tmpl$$e = /*#__PURE__*/template(`<div>`),
|
|
1629
|
-
_tmpl$2$6 = /*#__PURE__*/template(`<div><div>`);
|
|
1630
|
-
const unWarpValue = value => typeof value === 'object' ? value.value : value;
|
|
1631
|
-
const Segmented = props => {
|
|
1632
|
-
const [value, setValue] = createControllableValue(props, {
|
|
1633
|
-
defaultValue: unWarpValue(props.options[0])
|
|
1634
|
-
});
|
|
1635
|
-
const isSelected = createSelector(value);
|
|
1636
|
-
const isDisabledValue = v => {
|
|
1637
|
-
if (props.disabled) return true;
|
|
1638
|
-
return typeof v === 'object' ? v.disabled : false;
|
|
1639
|
-
};
|
|
1640
|
-
return (() => {
|
|
1641
|
-
const _el$ = _tmpl$$e();
|
|
1642
|
-
insert(_el$, createComponent(For, {
|
|
1643
|
-
get each() {
|
|
1644
|
-
return props.options;
|
|
1645
|
-
},
|
|
1646
|
-
children: item => (() => {
|
|
1647
|
-
const _el$2 = _tmpl$2$6(),
|
|
1648
|
-
_el$3 = _el$2.firstChild;
|
|
1649
|
-
_el$3.$$click = e => {
|
|
1650
|
-
setValue(unWarpValue(item));
|
|
1651
|
-
typeof item === 'object' && item.onClick?.(e);
|
|
1652
|
-
};
|
|
1653
|
-
insert(_el$3, createComponent(Show, {
|
|
1654
|
-
when: typeof item !== 'object',
|
|
1655
|
-
get fallback() {
|
|
1656
|
-
return typeof item === 'object' && unwrapStringOrJSXElement(item.label);
|
|
1657
|
-
},
|
|
1658
|
-
children: item
|
|
1659
|
-
}));
|
|
1660
|
-
effect(_p$ => {
|
|
1661
|
-
const _v$3 = cs(props.block && 'ant-basis-0 ant-grow-1', isDisabledValue(item) && 'ant-cursor-not-allowed'),
|
|
1662
|
-
_v$4 = cs('ant-rounded-[var(--ant-border-radius-sm)] ant-px-[var(--ant-padding-sm)] where:ant-cursor-pointer ant-leading-28px where:hover:ant-bg-[var(--ant-segmented-item-hover-bg)] where:active:ant-bg-[var(--ant-segmented-item-active-bg)]', isSelected(unWarpValue(item)) && 'ant-bg-white ant-shadow-[var(--ant-box-shadow-tertiary)]', props.block && 'ant-flex ant-justify-center', isDisabledValue(item) && 'ant-[pointer-events:none] ant-text-[var(--ant-color-text-disabled)]');
|
|
1663
|
-
_v$3 !== _p$._v$3 && className(_el$2, _p$._v$3 = _v$3);
|
|
1664
|
-
_v$4 !== _p$._v$4 && className(_el$3, _p$._v$4 = _v$4);
|
|
1665
|
-
return _p$;
|
|
1666
|
-
}, {
|
|
1667
|
-
_v$3: undefined,
|
|
1668
|
-
_v$4: undefined
|
|
1669
|
-
});
|
|
1670
|
-
return _el$2;
|
|
1671
|
-
})()
|
|
1672
|
-
}));
|
|
1673
|
-
effect(_p$ => {
|
|
1674
|
-
const _v$ = cs('ant-bg-[var(--ant-color-bg-layout)] ant-rounded-[var(--ant-border-radius)] ant-p-2px', props.block ? 'ant-flex' : 'ant-inline-flex', props.class),
|
|
1675
|
-
_v$2 = {
|
|
1676
|
-
'--ant-segmented-item-color': 'rgba(0, 0, 0, 0.65)',
|
|
1677
|
-
'--ant-segmented-item-hover-bg': 'rgba(0, 0, 0, 0.06)',
|
|
1678
|
-
'--ant-segmented-item-active-bg': 'rgba(0, 0, 0, 0.15)',
|
|
1679
|
-
...props.style
|
|
1680
|
-
};
|
|
1681
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
1682
|
-
_p$._v$2 = style(_el$, _v$2, _p$._v$2);
|
|
1683
|
-
return _p$;
|
|
1684
|
-
}, {
|
|
1685
|
-
_v$: undefined,
|
|
1686
|
-
_v$2: undefined
|
|
1687
|
-
});
|
|
1688
|
-
return _el$;
|
|
1689
|
-
})();
|
|
1690
|
-
};
|
|
1691
|
-
delegateEvents(["click"]);
|
|
1692
|
-
|
|
1693
|
-
const _tmpl$$d = /*#__PURE__*/template(`<div><div role="selected-bar" class="ant-absolute ant-bottom-0 ant-bg-[var(--primary-color)] ant-h-2px ant-transition-left">`),
|
|
1694
|
-
_tmpl$2$5 = /*#__PURE__*/template(`<div><div>`),
|
|
1695
|
-
_tmpl$3$4 = /*#__PURE__*/template(`<div>`);
|
|
1696
|
-
const Tabs = _props => {
|
|
1697
|
-
const props = mergeProps({
|
|
1698
|
-
type: 'line'
|
|
1699
|
-
}, _props);
|
|
1700
|
-
const [selectedItem, setSelectedItem] = createSignal(untrack(() => props.items[0]));
|
|
1701
|
-
const isSelectedItem = createSelector(() => selectedItem()?.key);
|
|
1702
|
-
const [selectedBarStyle, setSelectedBarStyle] = createSignal({
|
|
1703
|
-
left: '0px',
|
|
1704
|
-
width: '0px'
|
|
1705
|
-
});
|
|
1706
|
-
let nav;
|
|
1707
|
-
const updateSelectedBarStyle = () => {
|
|
1708
|
-
if (!nav) return;
|
|
1709
|
-
const el = nav.querySelector(':scope > .selected');
|
|
1710
|
-
if (!el) return;
|
|
1711
|
-
setSelectedBarStyle({
|
|
1712
|
-
left: `${el.offsetLeft}px`,
|
|
1713
|
-
width: `${el.clientWidth}px`
|
|
1714
|
-
});
|
|
1715
|
-
};
|
|
1716
|
-
onMount(() => {
|
|
1717
|
-
if (!nav) return;
|
|
1718
|
-
updateSelectedBarStyle();
|
|
1719
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
1720
|
-
updateSelectedBarStyle();
|
|
1721
|
-
});
|
|
1722
|
-
resizeObserver.observe(nav);
|
|
1723
|
-
onCleanup(() => {
|
|
1724
|
-
resizeObserver.disconnect();
|
|
1725
|
-
});
|
|
1726
|
-
});
|
|
1727
|
-
return (() => {
|
|
1728
|
-
const _el$ = _tmpl$2$5(),
|
|
1729
|
-
_el$4 = _el$.firstChild;
|
|
1730
|
-
insert(_el$, createComponent(Switch$1, {
|
|
1731
|
-
get children() {
|
|
1732
|
-
return [createComponent(Match, {
|
|
1733
|
-
get when() {
|
|
1734
|
-
return props.type === 'line';
|
|
1735
|
-
},
|
|
1736
|
-
get children() {
|
|
1737
|
-
const _el$2 = _tmpl$$d(),
|
|
1738
|
-
_el$3 = _el$2.firstChild;
|
|
1739
|
-
const _ref$ = nav;
|
|
1740
|
-
typeof _ref$ === "function" ? use(_ref$, _el$2) : nav = _el$2;
|
|
1741
|
-
insert(_el$2, createComponent(For, {
|
|
1742
|
-
get each() {
|
|
1743
|
-
return props.items;
|
|
1744
|
-
},
|
|
1745
|
-
children: item => (() => {
|
|
1746
|
-
const _el$5 = _tmpl$3$4();
|
|
1747
|
-
_el$5.$$click = () => {
|
|
1748
|
-
setSelectedItem(item);
|
|
1749
|
-
updateSelectedBarStyle();
|
|
1750
|
-
};
|
|
1751
|
-
insert(_el$5, () => unwrapStringOrJSXElement(item.label));
|
|
1752
|
-
effect(() => className(_el$5, cs('ant-py-12px ant-cursor-pointer', props.navItemClass, isSelectedItem(item.key) && 'ant-text-[var(--primary-color)] selected')));
|
|
1753
|
-
return _el$5;
|
|
1754
|
-
})()
|
|
1755
|
-
}), _el$3);
|
|
1756
|
-
effect(_p$ => {
|
|
1757
|
-
const _v$ = cs('ant-mb-16px ant-flex ant-gap-32px ant-[border-bottom:solid_1px_rgba(5,5,5,0.1)] ant-relative', props.navClass),
|
|
1758
|
-
_v$2 = selectedBarStyle();
|
|
1759
|
-
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
1760
|
-
_p$._v$2 = style(_el$3, _v$2, _p$._v$2);
|
|
1761
|
-
return _p$;
|
|
1762
|
-
}, {
|
|
1763
|
-
_v$: undefined,
|
|
1764
|
-
_v$2: undefined
|
|
1765
|
-
});
|
|
1766
|
-
return _el$2;
|
|
1767
|
-
}
|
|
1768
|
-
}), createComponent(Match, {
|
|
1769
|
-
get when() {
|
|
1770
|
-
return props.type === 'segment';
|
|
1771
|
-
},
|
|
1772
|
-
get children() {
|
|
1773
|
-
return createComponent(Segmented, {
|
|
1774
|
-
block: true,
|
|
1775
|
-
get options() {
|
|
1776
|
-
return props.items.map(item => ({
|
|
1777
|
-
label: item.label,
|
|
1778
|
-
value: item.key,
|
|
1779
|
-
onClick: () => setSelectedItem(item)
|
|
1780
|
-
}));
|
|
1781
|
-
}
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
})];
|
|
1785
|
-
}
|
|
1786
|
-
}), _el$4);
|
|
1787
|
-
insert(_el$4, () => unwrapStringOrJSXElement(selectedItem()?.children));
|
|
1788
|
-
effect(_p$ => {
|
|
1789
|
-
const _v$3 = props.class,
|
|
1790
|
-
_v$4 = props.contentClass;
|
|
1791
|
-
_v$3 !== _p$._v$3 && className(_el$, _p$._v$3 = _v$3);
|
|
1792
|
-
_v$4 !== _p$._v$4 && className(_el$4, _p$._v$4 = _v$4);
|
|
1793
|
-
return _p$;
|
|
1794
|
-
}, {
|
|
1795
|
-
_v$3: undefined,
|
|
1796
|
-
_v$4: undefined
|
|
1797
|
-
});
|
|
1798
|
-
return _el$;
|
|
1799
|
-
})();
|
|
1800
|
-
};
|
|
1801
|
-
delegateEvents(["click"]);
|
|
1802
|
-
|
|
1803
|
-
const _tmpl$$c = /*#__PURE__*/template(`<div><div class="ant-mb-8px ant-flex ant-items-center"><span class="i-ant-design:exclamation-circle-fill ant-text-#faad14"></span><span class="ant-ml-8px ant-text-[rgba(0,0,0,0.88)] ant-font-600"></span></div><div class="ant-ml-22px ant-mb-8px ant-text-[rgba(0,0,0,0.88)]"></div><div class="ant-text-right">`);
|
|
1804
|
-
const Popconfirm = props => {
|
|
1805
|
-
const mergedProps = mergeProps({
|
|
1806
|
-
okText: '确定',
|
|
1807
|
-
cancelText: '取消'
|
|
1808
|
-
}, props);
|
|
1809
|
-
const [tooltipProps] = splitProps(props, ['placement', 'arrow']);
|
|
1810
|
-
const [open, setOpen] = createSignal(false);
|
|
1811
|
-
return createComponent(Tooltip, mergeProps$1({
|
|
1812
|
-
mode: "light",
|
|
1813
|
-
trigger: "click",
|
|
1814
|
-
get open() {
|
|
1815
|
-
return open();
|
|
1816
|
-
},
|
|
1817
|
-
onOpenChange: setOpen,
|
|
1818
|
-
get content() {
|
|
1819
|
-
return (() => {
|
|
1820
|
-
const _el$ = _tmpl$$c(),
|
|
1821
|
-
_el$2 = _el$.firstChild,
|
|
1822
|
-
_el$3 = _el$2.firstChild,
|
|
1823
|
-
_el$4 = _el$3.nextSibling,
|
|
1824
|
-
_el$5 = _el$2.nextSibling,
|
|
1825
|
-
_el$6 = _el$5.nextSibling;
|
|
1826
|
-
insert(_el$4, () => mergedProps.title);
|
|
1827
|
-
insert(_el$5, () => mergedProps.content);
|
|
1828
|
-
insert(_el$6, createComponent(Button, {
|
|
1829
|
-
"class": "ant-ml-8px",
|
|
1830
|
-
size: "small",
|
|
1831
|
-
onClick: () => {
|
|
1832
|
-
setOpen(false);
|
|
1833
|
-
untrack(() => mergedProps.onCancel?.());
|
|
1834
|
-
},
|
|
1835
|
-
get children() {
|
|
1836
|
-
return mergedProps.cancelText;
|
|
1837
|
-
}
|
|
1838
|
-
}), null);
|
|
1839
|
-
insert(_el$6, createComponent(Button, {
|
|
1840
|
-
"class": "ant-ml-8px",
|
|
1841
|
-
type: "primary",
|
|
1842
|
-
size: "small",
|
|
1843
|
-
onClick: () => {
|
|
1844
|
-
setOpen(false);
|
|
1845
|
-
untrack(() => mergedProps.onConfirm?.());
|
|
1846
|
-
},
|
|
1847
|
-
get children() {
|
|
1848
|
-
return mergedProps.okText;
|
|
1849
|
-
}
|
|
1850
|
-
}), null);
|
|
1851
|
-
return _el$;
|
|
1852
|
-
})();
|
|
1853
|
-
}
|
|
1854
|
-
}, tooltipProps, {
|
|
1855
|
-
get children() {
|
|
1856
|
-
return mergedProps.children;
|
|
1857
|
-
}
|
|
1858
|
-
}));
|
|
1859
|
-
};
|
|
1860
|
-
|
|
1861
|
-
const Upload = replaceChildren(replaceClassName(reactToSolidComponent(Upload$1)));
|
|
1862
|
-
|
|
1863
|
-
const _tmpl$$b = /*#__PURE__*/template(`<label class="ant-inline-flex ant-gap-4px"><input type="radio">`),
|
|
1864
|
-
_tmpl$2$4 = /*#__PURE__*/template(`<label><input class="ant-w-0 ant-h-0" type="radio">`),
|
|
1865
|
-
_tmpl$3$3 = /*#__PURE__*/template(`<div>`);
|
|
1866
|
-
const Radio = props => {
|
|
1867
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
1868
|
-
defaultValue: false,
|
|
1869
|
-
defaultValuePropName: 'defaultChecked',
|
|
1870
|
-
valuePropName: 'checked',
|
|
1871
|
-
trigger: undefined
|
|
1872
|
-
});
|
|
1873
|
-
return (() => {
|
|
1874
|
-
const _el$ = _tmpl$$b(),
|
|
1875
|
-
_el$2 = _el$.firstChild;
|
|
1876
|
-
_el$2.$$input = e => {
|
|
1877
|
-
setChecked(e.target.checked);
|
|
1878
|
-
untrack(() => props.onChange?.(e));
|
|
1879
|
-
};
|
|
1880
|
-
insert(_el$, () => props.children, null);
|
|
1881
|
-
effect(() => _el$2.checked = checked());
|
|
1882
|
-
effect(() => _el$2.value = props.value ?? '');
|
|
1883
|
-
return _el$;
|
|
1884
|
-
})();
|
|
1885
|
-
};
|
|
1886
|
-
Radio.Button = props => {
|
|
1887
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
1888
|
-
defaultValue: false,
|
|
1889
|
-
defaultValuePropName: 'defaultChecked',
|
|
1890
|
-
valuePropName: 'checked',
|
|
1891
|
-
trigger: undefined
|
|
1892
|
-
});
|
|
1893
|
-
return (() => {
|
|
1894
|
-
const _el$3 = _tmpl$2$4(),
|
|
1895
|
-
_el$4 = _el$3.firstChild;
|
|
1896
|
-
_el$4.$$input = e => {
|
|
1897
|
-
setChecked(e.target.checked);
|
|
1898
|
-
untrack(() => props.onChange?.(e));
|
|
1899
|
-
};
|
|
1900
|
-
insert(_el$3, () => props.children, null);
|
|
1901
|
-
effect(() => className(_el$3, cs('ant-px-15px ant-[border:1px_solid_rgb(217,217,217)] first:ant-rounded-l-6px last:ant-rounded-r-6px ant-h-32px ant-inline-flex ant-items-center hover:ant-text-[var(--primary-color)] not[:last-child]:ant-border-r-transparent ant-cursor-pointer ant-flex-grow ant-justify-center', checked() && 'ant-text-[var(--primary-color)] ant-[border:1px_solid_var(--primary-color)] !ant-border-r-[var(--primary-color)]')));
|
|
1902
|
-
effect(() => _el$4.checked = checked());
|
|
1903
|
-
effect(() => _el$4.value = props.value ?? '');
|
|
1904
|
-
return _el$3;
|
|
1905
|
-
})();
|
|
1906
|
-
};
|
|
1907
|
-
Radio.Group = _props => {
|
|
1908
|
-
const props = mergeProps({
|
|
1909
|
-
optionType: 'default'
|
|
1910
|
-
}, _props);
|
|
1911
|
-
const [value, setValue] = createControllableValue(props, {
|
|
1912
|
-
trigger: undefined
|
|
1913
|
-
});
|
|
1914
|
-
const isChecked = createSelector(value);
|
|
1915
|
-
return (() => {
|
|
1916
|
-
const _el$5 = _tmpl$3$3();
|
|
1917
|
-
insert(_el$5, createComponent(For, {
|
|
1918
|
-
get each() {
|
|
1919
|
-
return props.options;
|
|
1920
|
-
},
|
|
1921
|
-
children: option => createComponent(Dynamic, {
|
|
1922
|
-
get component() {
|
|
1923
|
-
return props.optionType === 'default' ? Radio : Radio.Button;
|
|
1924
|
-
},
|
|
1925
|
-
get checked() {
|
|
1926
|
-
return isChecked(option.value);
|
|
1927
|
-
},
|
|
1928
|
-
get value() {
|
|
1929
|
-
return option.value;
|
|
1930
|
-
},
|
|
1931
|
-
onChange: e => {
|
|
1932
|
-
setValue(option.value);
|
|
1933
|
-
untrack(() => props.onChange?.(e));
|
|
1934
|
-
},
|
|
1935
|
-
get children() {
|
|
1936
|
-
return option.label;
|
|
1937
|
-
}
|
|
1938
|
-
})
|
|
1939
|
-
}));
|
|
1940
|
-
effect(() => className(_el$5, cs(props.block ? 'ant-flex' : 'ant-inline-flex', props.optionType === 'default' ? 'ant-gap-8px' : '')));
|
|
1941
|
-
return _el$5;
|
|
1942
|
-
})();
|
|
1943
|
-
};
|
|
1944
|
-
delegateEvents(["input"]);
|
|
1945
|
-
|
|
1946
|
-
const Context = createContext({});
|
|
1947
|
-
|
|
1948
|
-
const _tmpl$$a = /*#__PURE__*/template(`<form>`);
|
|
1949
|
-
function Form$1(_props) {
|
|
1950
|
-
const props = mergeProps({
|
|
1951
|
-
layout: 'horizontal'
|
|
1952
|
-
}, _props);
|
|
1953
|
-
const rulesDict = {};
|
|
1954
|
-
const setErrMsgDict = {};
|
|
1955
|
-
const values = props.initialValues ? {
|
|
1956
|
-
...props.initialValues
|
|
1957
|
-
} : {};
|
|
1958
|
-
const formInstance = {
|
|
1959
|
-
async validateFields() {
|
|
1960
|
-
const promises = Object.entries(rulesDict).flatMap(([name, rules]) => {
|
|
1961
|
-
return rules.map(async rule => await rule.validate(get(values, name)).catch(err => {
|
|
1962
|
-
setErrMsgDict[name](err.message);
|
|
1963
|
-
throw err;
|
|
1964
|
-
}));
|
|
1965
|
-
});
|
|
1966
|
-
const results = await Promise.allSettled(promises);
|
|
1967
|
-
if (results.some(result => result.status === 'rejected')) {
|
|
1968
|
-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
1969
|
-
throw {
|
|
1970
|
-
errorFields: results.filter(res => res.status === 'rejected'),
|
|
1971
|
-
values
|
|
1972
|
-
};
|
|
1973
|
-
}
|
|
1974
|
-
return values;
|
|
1975
|
-
},
|
|
1976
|
-
setFieldValue(name, value) {
|
|
1977
|
-
set(values, name, value);
|
|
1978
|
-
}
|
|
1979
|
-
};
|
|
1980
|
-
onMount(() => {
|
|
1981
|
-
if (typeof _props.ref === 'function') {
|
|
1982
|
-
_props.ref?.(formInstance);
|
|
1983
|
-
}
|
|
1984
|
-
});
|
|
1985
|
-
// 存储 form item 的 dom 节点宽度
|
|
1986
|
-
const [itemWidthDict, setItemWidthDict] = createSignal({});
|
|
1987
|
-
const maxItemWidth = createMemo(() => max(Object.values(itemWidthDict())));
|
|
1988
|
-
return (() => {
|
|
1989
|
-
const _el$ = _tmpl$$a();
|
|
1990
|
-
_el$.addEventListener("submit", e => {
|
|
1991
|
-
e.preventDefault();
|
|
1992
|
-
});
|
|
1993
|
-
insert(_el$, createComponent(Context.Provider, {
|
|
1994
|
-
get value() {
|
|
1995
|
-
return {
|
|
1996
|
-
formInstance,
|
|
1997
|
-
rulesDict,
|
|
1998
|
-
setErrMsgDict,
|
|
1999
|
-
initialValues: props.initialValues,
|
|
2000
|
-
setItemWidthDict,
|
|
2001
|
-
maxItemWidth
|
|
2002
|
-
};
|
|
2003
|
-
},
|
|
2004
|
-
get children() {
|
|
2005
|
-
return props.children;
|
|
2006
|
-
}
|
|
2007
|
-
}));
|
|
2008
|
-
return _el$;
|
|
2009
|
-
})();
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
const _tmpl$$9 = /*#__PURE__*/template(`<span class="ant-mr-4px ant-text-[var(--ant-color-error)]">*`),
|
|
2013
|
-
_tmpl$2$3 = /*#__PURE__*/template(`<label>`),
|
|
2014
|
-
_tmpl$3$2 = /*#__PURE__*/template(`<div class="ant-text-[var(--ant-color-error)]">`),
|
|
2015
|
-
_tmpl$4$1 = /*#__PURE__*/template(`<div><div class="ant-w-full">`);
|
|
2016
|
-
const FormItem = props => {
|
|
2017
|
-
const {
|
|
2018
|
-
formInstance,
|
|
2019
|
-
rulesDict,
|
|
2020
|
-
setErrMsgDict,
|
|
2021
|
-
initialValues,
|
|
2022
|
-
setItemWidthDict,
|
|
2023
|
-
maxItemWidth
|
|
2024
|
-
} = useContext(Context);
|
|
2025
|
-
const [errMsg, setErrMsg] = createSignal('');
|
|
2026
|
-
const id = nanoid();
|
|
2027
|
-
onMount(() => {
|
|
2028
|
-
if (isNil(props.name)) return;
|
|
2029
|
-
if (!isNil(props.initialValue)) {
|
|
2030
|
-
formInstance.setFieldValue(props.name, props.initialValue);
|
|
2031
|
-
}
|
|
2032
|
-
if (!isNil(props.rules)) {
|
|
2033
|
-
rulesDict[props.name] = props.rules;
|
|
2034
|
-
}
|
|
2035
|
-
setErrMsgDict[props.name] = setErrMsg;
|
|
2036
|
-
});
|
|
2037
|
-
let label;
|
|
2038
|
-
onMount(() => {
|
|
2039
|
-
const resizeObserver = new ResizeObserver(entries => {
|
|
2040
|
-
const [entry] = entries;
|
|
2041
|
-
// Firefox implements `borderBoxSize` as a single content rect, rather than an array
|
|
2042
|
-
const borderBoxSize = Array.isArray(entry.borderBoxSize) ? entry.borderBoxSize[0] : entry.borderBoxSize;
|
|
2043
|
-
setItemWidthDict(dict => ({
|
|
2044
|
-
...dict,
|
|
2045
|
-
[id]: borderBoxSize.inlineSize
|
|
2046
|
-
}));
|
|
2047
|
-
});
|
|
2048
|
-
resizeObserver.observe(label);
|
|
2049
|
-
onCleanup(() => {
|
|
2050
|
-
setItemWidthDict(dict => {
|
|
2051
|
-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
2052
|
-
delete dict[id];
|
|
2053
|
-
return {
|
|
2054
|
-
...dict
|
|
2055
|
-
};
|
|
2056
|
-
});
|
|
2057
|
-
resizeObserver.disconnect();
|
|
2058
|
-
});
|
|
2059
|
-
});
|
|
2060
|
-
const getLabel = hidden => (() => {
|
|
2061
|
-
const _el$ = _tmpl$2$3();
|
|
2062
|
-
spread(_el$, mergeProps$1({
|
|
2063
|
-
get ["class"]() {
|
|
2064
|
-
return cs('ant-shrink-0 ant-h-32px ant-leading-32px not[:empty]:ant-pr-8px ant-text-right ant-[white-space:nowrap]', hidden && 'ant-absolute ant-opacity-0');
|
|
2065
|
-
}
|
|
2066
|
-
}, () => hidden ? {
|
|
2067
|
-
ref: el => {
|
|
2068
|
-
label = el;
|
|
2069
|
-
}
|
|
2070
|
-
} : {
|
|
2071
|
-
style: {
|
|
2072
|
-
width: `${maxItemWidth() ?? 0}px`
|
|
2073
|
-
}
|
|
2074
|
-
}), false, true);
|
|
2075
|
-
insert(_el$, createComponent(Show, {
|
|
2076
|
-
get when() {
|
|
2077
|
-
return !isNil(props.required);
|
|
2078
|
-
},
|
|
2079
|
-
get children() {
|
|
2080
|
-
return _tmpl$$9();
|
|
2081
|
-
}
|
|
2082
|
-
}), null);
|
|
2083
|
-
insert(_el$, createComponent(Show, {
|
|
2084
|
-
get when() {
|
|
2085
|
-
return !isNil(props.label);
|
|
2086
|
-
},
|
|
2087
|
-
get children() {
|
|
2088
|
-
const _el$3 = _tmpl$2$3();
|
|
2089
|
-
insert(_el$3, () => props.label);
|
|
2090
|
-
return _el$3;
|
|
2091
|
-
}
|
|
2092
|
-
}), null);
|
|
2093
|
-
return _el$;
|
|
2094
|
-
})();
|
|
2095
|
-
return (() => {
|
|
2096
|
-
const _el$4 = _tmpl$4$1(),
|
|
2097
|
-
_el$5 = _el$4.firstChild;
|
|
2098
|
-
insert(_el$4, () => getLabel(true), _el$5);
|
|
2099
|
-
insert(_el$4, getLabel, _el$5);
|
|
2100
|
-
insert(_el$5, createComponent(Dynamic, {
|
|
2101
|
-
get component() {
|
|
2102
|
-
return props.component;
|
|
2103
|
-
},
|
|
2104
|
-
get defaultValue() {
|
|
2105
|
-
return props.initialValue ?? get(initialValues, props.name);
|
|
2106
|
-
},
|
|
2107
|
-
get status() {
|
|
2108
|
-
return errMsg() ? 'error' : undefined;
|
|
2109
|
-
},
|
|
2110
|
-
onChange: value => {
|
|
2111
|
-
if (!isNil(props.name)) formInstance.setFieldValue(props.name, value);
|
|
2112
|
-
props.rules?.forEach(rule => {
|
|
2113
|
-
rule.validate(value).then(() => {
|
|
2114
|
-
setErrMsg('');
|
|
2115
|
-
}).catch(err => {
|
|
2116
|
-
setErrMsg(err.message);
|
|
2117
|
-
});
|
|
2118
|
-
});
|
|
2119
|
-
}
|
|
2120
|
-
}), null);
|
|
2121
|
-
insert(_el$5, createComponent(Show, {
|
|
2122
|
-
get when() {
|
|
2123
|
-
return errMsg();
|
|
2124
|
-
},
|
|
2125
|
-
get children() {
|
|
2126
|
-
const _el$6 = _tmpl$3$2();
|
|
2127
|
-
insert(_el$6, errMsg);
|
|
2128
|
-
return _el$6;
|
|
2129
|
-
}
|
|
2130
|
-
}), null);
|
|
2131
|
-
effect(_p$ => {
|
|
2132
|
-
const _v$ = cs(props.class, 'ant-flex ant-items-center ant-mb-16px'),
|
|
2133
|
-
_v$2 = props.style;
|
|
2134
|
-
_v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
|
|
2135
|
-
_p$._v$2 = style(_el$4, _v$2, _p$._v$2);
|
|
2136
|
-
return _p$;
|
|
2137
|
-
}, {
|
|
2138
|
-
_v$: undefined,
|
|
2139
|
-
_v$2: undefined
|
|
2140
|
-
});
|
|
2141
|
-
return _el$4;
|
|
2142
|
-
})();
|
|
2143
|
-
};
|
|
2144
|
-
|
|
2145
|
-
const Form = Form$1;
|
|
2146
|
-
Form.Item = FormItem;
|
|
2147
|
-
|
|
2148
|
-
const _tmpl$$8 = /*#__PURE__*/template(`<button><div>`);
|
|
2149
|
-
const Switch = props => {
|
|
2150
|
-
const [checked, setChecked] = createControllableValue(props, {
|
|
2151
|
-
defaultValuePropName: 'defaultChecked',
|
|
2152
|
-
valuePropName: 'checked'
|
|
2153
|
-
});
|
|
2154
|
-
return (() => {
|
|
2155
|
-
const _el$ = _tmpl$$8(),
|
|
2156
|
-
_el$2 = _el$.firstChild;
|
|
2157
|
-
_el$.$$click = () => setChecked(c => !c);
|
|
2158
|
-
effect(_p$ => {
|
|
2159
|
-
const _v$ = cs('ant-w-44px ant-h-22px ant-rounded-100px ant-relative', checked() ? 'ant-bg-[var(--primary-color)]' : 'ant-bg-[rgba(0,0,0,0.45)]'),
|
|
2160
|
-
_v$2 = cs('ant-w-18px ant-h-18px ant-rounded-50% ant-bg-white ant-absolute ant-top-1/2 -ant-translate-y-1/2 ant-transition-left', checked() ? 'ant-left-[calc(100%-20px)]' : 'ant-left-2px');
|
|
2161
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
2162
|
-
_v$2 !== _p$._v$2 && className(_el$2, _p$._v$2 = _v$2);
|
|
2163
|
-
return _p$;
|
|
2164
|
-
}, {
|
|
2165
|
-
_v$: undefined,
|
|
2166
|
-
_v$2: undefined
|
|
2167
|
-
});
|
|
2168
|
-
return _el$;
|
|
2169
|
-
})();
|
|
2170
|
-
};
|
|
2171
|
-
delegateEvents(["click"]);
|
|
2172
|
-
|
|
2173
|
-
const _Skeleton = replaceClassName(reactToSolidComponent(Skeleton$1));
|
|
2174
|
-
const Image$1 = replaceClassName(reactToSolidComponent(Skeleton$1.Image));
|
|
2175
|
-
const Skeleton = _Skeleton;
|
|
2176
|
-
Skeleton.Image = Image$1;
|
|
2177
|
-
|
|
2178
|
-
const _tmpl$$7 = /*#__PURE__*/template(`<div class="ant-absolute ant-inset-0 ant-flex ant-items-center ant-justify-center ant-bg-[rgba(255,255,255,.5)]"><span class="i-ant-design:loading keyframes-spin ant-[animation:spin_1s_linear_infinite] ant-text-32px ant-text-[var(--primary-color)]">`),
|
|
2179
|
-
_tmpl$2$2 = /*#__PURE__*/template(`<div class="ant-relative ant-min-h-32px">`);
|
|
2180
|
-
const Spin = props => {
|
|
2181
|
-
return (() => {
|
|
2182
|
-
const _el$ = _tmpl$2$2();
|
|
2183
|
-
insert(_el$, () => props.children, null);
|
|
2184
|
-
insert(_el$, createComponent(Show, {
|
|
2185
|
-
get when() {
|
|
2186
|
-
return props.spinning;
|
|
2187
|
-
},
|
|
2188
|
-
get children() {
|
|
2189
|
-
return _tmpl$$7();
|
|
2190
|
-
}
|
|
2191
|
-
}), null);
|
|
2192
|
-
return _el$;
|
|
2193
|
-
})();
|
|
2194
|
-
};
|
|
2195
|
-
|
|
2196
|
-
const _tmpl$$6 = /*#__PURE__*/template(`<div class="ant-inline-flex">`);
|
|
2197
|
-
const _Image = replaceClassName(reactToSolidComponent(configProvider(Image$2), () => _tmpl$$6()));
|
|
2198
|
-
function Image(_props) {
|
|
2199
|
-
const props = createMemo(() => mapValues(_props, (value, key) => {
|
|
2200
|
-
switch (key) {
|
|
2201
|
-
case 'placeholder':
|
|
2202
|
-
return solidToReact(value);
|
|
2203
|
-
default:
|
|
2204
|
-
return value;
|
|
2205
|
-
}
|
|
2206
|
-
}));
|
|
2207
|
-
return createComponent(_Image, mergeProps$1(props));
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
const _tmpl$$5 = /*#__PURE__*/template(`<svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa">`);
|
|
2211
|
-
const EmptySvg$1 = () => _tmpl$$5();
|
|
2212
|
-
|
|
2213
|
-
const _tmpl$$4 = /*#__PURE__*/template(`<div class="ant-my-[var(--ant-margin-xl)] ant-mx-[var(--ant-margin-xs)]"><div class="ant-mb-[var(--ant-margin-xs)] ant-flex ant-justify-center"></div><div class="ant-text-[var(--ant-color-text-disabled)] ant-text-center">暂无数据`);
|
|
2214
|
-
const PRESENTED_IMAGE_SIMPLE = () => {
|
|
2215
|
-
return (() => {
|
|
2216
|
-
const _el$ = _tmpl$$4(),
|
|
2217
|
-
_el$2 = _el$.firstChild;
|
|
2218
|
-
insert(_el$2, createComponent(EmptySvg$1, {}));
|
|
2219
|
-
return _el$;
|
|
2220
|
-
})();
|
|
2221
|
-
};
|
|
2222
|
-
|
|
2223
|
-
const _tmpl$$3 = /*#__PURE__*/template(`<svg width="184" height="100" viewBox="0 0 184 152" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g transform="translate(24 31.67)"><ellipse fill-opacity=".8" fill="#F5F5F7" cx="67.797" cy="106.89" rx="67.797" ry="12.668"></ellipse><path d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z" fill="#AEB8C2"></path><path d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z" fill="url(#linearGradient-1)" transform="translate(13.56)"></path><path d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z" fill="#F5F5F7"></path><path d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z" fill="#DCE0E6"></path></g><path d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z" fill="#DCE0E6"></path><g transform="translate(149.65 15.383)" fill="#FFF"><ellipse cx="20.654" cy="3.167" rx="2.849" ry="2.815"></ellipse><path d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z">`);
|
|
2224
|
-
const EmptySvg = () => _tmpl$$3();
|
|
2225
|
-
|
|
2226
|
-
const _tmpl$$2 = /*#__PURE__*/template(`<div><div class="ant-mb-[var(--ant-margin-xs)] ant-flex ant-justify-center"></div><div class="ant-text-[var(--ant-color-text)] ant-text-center">暂无数据`);
|
|
2227
|
-
const Empty = () => {
|
|
2228
|
-
return (() => {
|
|
2229
|
-
const _el$ = _tmpl$$2(),
|
|
2230
|
-
_el$2 = _el$.firstChild;
|
|
2231
|
-
insert(_el$2, createComponent(EmptySvg, {}));
|
|
2232
|
-
return _el$;
|
|
2233
|
-
})();
|
|
2234
|
-
};
|
|
2235
|
-
Empty.PRESENTED_IMAGE_SIMPLE = PRESENTED_IMAGE_SIMPLE;
|
|
2236
|
-
|
|
2237
|
-
const _tmpl$$1 = /*#__PURE__*/template(`<div><table class="ant-w-full"><thead><tr></tr></thead><tbody>`),
|
|
2238
|
-
_tmpl$2$1 = /*#__PURE__*/template(`<th class="ant-p-16px ant-bg-[var(--light-bg-color)] ant-font-bold ant-[border-bottom:1px_solid_var(--secondary-border-color)] ant-text-left">`),
|
|
2239
|
-
_tmpl$3$1 = /*#__PURE__*/template(`<tr class="hover:ant-bg-[var(--light-bg-color)]">`),
|
|
2240
|
-
_tmpl$4 = /*#__PURE__*/template(`<td class="ant-p-16px ant-[border-bottom:1px_solid_var(--secondary-border-color)]">`);
|
|
2241
|
-
const Table = props => {
|
|
2242
|
-
return (() => {
|
|
2243
|
-
const _el$ = _tmpl$$1(),
|
|
2244
|
-
_el$2 = _el$.firstChild,
|
|
2245
|
-
_el$3 = _el$2.firstChild,
|
|
2246
|
-
_el$4 = _el$3.firstChild,
|
|
2247
|
-
_el$5 = _el$3.nextSibling;
|
|
2248
|
-
insert(_el$4, createComponent(For, {
|
|
2249
|
-
get each() {
|
|
2250
|
-
return props.columns;
|
|
2251
|
-
},
|
|
2252
|
-
children: item => (() => {
|
|
2253
|
-
const _el$6 = _tmpl$2$1();
|
|
2254
|
-
insert(_el$6, () => item.title);
|
|
2255
|
-
return _el$6;
|
|
2256
|
-
})()
|
|
2257
|
-
}));
|
|
2258
|
-
insert(_el$5, createComponent(For, {
|
|
2259
|
-
get each() {
|
|
2260
|
-
return props.dataSource;
|
|
2261
|
-
},
|
|
2262
|
-
children: row => (() => {
|
|
2263
|
-
const _el$7 = _tmpl$3$1();
|
|
2264
|
-
insert(_el$7, createComponent(For, {
|
|
2265
|
-
get each() {
|
|
2266
|
-
return props.columns;
|
|
2267
|
-
},
|
|
2268
|
-
children: item => (() => {
|
|
2269
|
-
const _el$8 = _tmpl$4();
|
|
2270
|
-
insert(_el$8, () => item.render(row));
|
|
2271
|
-
return _el$8;
|
|
2272
|
-
})()
|
|
2273
|
-
}));
|
|
2274
|
-
return _el$7;
|
|
2275
|
-
})()
|
|
2276
|
-
}));
|
|
2277
|
-
insert(_el$, createComponent(Show, {
|
|
2278
|
-
get when() {
|
|
2279
|
-
return !props.dataSource.length;
|
|
2280
|
-
},
|
|
2281
|
-
get children() {
|
|
2282
|
-
return createComponent(Empty.PRESENTED_IMAGE_SIMPLE, {});
|
|
2283
|
-
}
|
|
2284
|
-
}), null);
|
|
2285
|
-
return _el$;
|
|
2286
|
-
})();
|
|
2287
|
-
};
|
|
2288
|
-
|
|
2289
|
-
const _tmpl$ = /*#__PURE__*/template(`<div>`),
|
|
2290
|
-
_tmpl$2 = /*#__PURE__*/template(`<div class="ant-overflow-hidden"><div class="ant-p-[var(--ant-padding-sm)] ant-[border-top:1px_solid_var(--ant-color-border)]">`),
|
|
2291
|
-
_tmpl$3 = /*#__PURE__*/template(`<div class="ant-[border-bottom:1px_solid_var(--ant-color-border)] first:ant-rounded-t-[var(--ant-border-radius-lg)] last:ant-rounded-b-[var(--ant-border-radius-lg)] ant-cursor-pointer"><div class="ant-bg-[var(--ant-collapse-header-bg)] ant-text-[var(--ant-color-text-heading)] ant-p-[var(--ant-collapse-header-padding)]"><span>`);
|
|
2292
|
-
const Collapse = props => {
|
|
2293
|
-
const [activeKey, setActiveKey] = createControllableValue(props, {
|
|
2294
|
-
defaultValuePropName: 'defaultActiveKey',
|
|
2295
|
-
valuePropName: 'activeKey',
|
|
2296
|
-
defaultValue: []
|
|
2297
|
-
});
|
|
2298
|
-
return (() => {
|
|
2299
|
-
const _el$ = _tmpl$();
|
|
2300
|
-
insert(_el$, createComponent(For, {
|
|
2301
|
-
get each() {
|
|
2302
|
-
return props.items;
|
|
2303
|
-
},
|
|
2304
|
-
children: item => (() => {
|
|
2305
|
-
const _el$2 = _tmpl$3(),
|
|
2306
|
-
_el$3 = _el$2.firstChild,
|
|
2307
|
-
_el$4 = _el$3.firstChild;
|
|
2308
|
-
_el$3.$$click = () => {
|
|
2309
|
-
setActiveKey(keys => {
|
|
2310
|
-
if (keys.includes(item.key)) {
|
|
2311
|
-
return keys.filter(key => key !== item.key);
|
|
2312
|
-
}
|
|
2313
|
-
return [...keys, item.key];
|
|
2314
|
-
});
|
|
2315
|
-
};
|
|
2316
|
-
insert(_el$3, () => item.label, null);
|
|
2317
|
-
insert(_el$2, createComponent(Transition, {
|
|
2318
|
-
onEnter: (el, done) => {
|
|
2319
|
-
el.animate([{
|
|
2320
|
-
height: '0px'
|
|
2321
|
-
}, {
|
|
2322
|
-
height: `${el.scrollHeight}px`
|
|
2323
|
-
}], {
|
|
2324
|
-
duration: 300
|
|
2325
|
-
}).finished.finally(done);
|
|
2326
|
-
},
|
|
2327
|
-
onExit: (el, done) => {
|
|
2328
|
-
el.animate([{
|
|
2329
|
-
height: `${el.scrollHeight}px`
|
|
2330
|
-
}, {
|
|
2331
|
-
height: '0px'
|
|
2332
|
-
}], {
|
|
2333
|
-
duration: 300
|
|
2334
|
-
}).finished.finally(done);
|
|
2335
|
-
},
|
|
2336
|
-
get children() {
|
|
2337
|
-
return createComponent(Show, {
|
|
2338
|
-
get when() {
|
|
2339
|
-
return activeKey().includes(item.key);
|
|
2340
|
-
},
|
|
2341
|
-
get children() {
|
|
2342
|
-
const _el$5 = _tmpl$2(),
|
|
2343
|
-
_el$6 = _el$5.firstChild;
|
|
2344
|
-
insert(_el$6, () => item.children);
|
|
2345
|
-
return _el$5;
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
}), null);
|
|
2350
|
-
effect(() => className(_el$4, cs('i-ant-design:right-outlined', 'ant-mr-[var(--ant-margin-sm)] ant-duration-.3s', activeKey().includes(item.key) && 'ant-rotate-[90deg]')));
|
|
2351
|
-
return _el$2;
|
|
2352
|
-
})()
|
|
2353
|
-
}));
|
|
2354
|
-
effect(_p$ => {
|
|
2355
|
-
const _v$ = cs('ant-rounded-[var(--ant-border-radius-lg)] ant-[border:1px_solid_var(--ant-color-border)] ant-border-b-0', props.class),
|
|
2356
|
-
_v$2 = props.style;
|
|
2357
|
-
_v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
|
|
2358
|
-
_p$._v$2 = style(_el$, _v$2, _p$._v$2);
|
|
2359
|
-
return _p$;
|
|
2360
|
-
}, {
|
|
2361
|
-
_v$: undefined,
|
|
2362
|
-
_v$2: undefined
|
|
2363
|
-
});
|
|
2364
|
-
return _el$;
|
|
2365
|
-
})();
|
|
2366
|
-
};
|
|
2367
|
-
delegateEvents(["click"]);
|
|
2368
|
-
|
|
2369
|
-
export { Button, Collapse, ColorPicker, Compact, DatePicker, Empty, Form, Image, Input, InputNumber, Modal, Popconfirm, Popover, Progress, Radio, Result, Segmented, Select, Skeleton, Spin, Switch, Table, Tabs, Timeline, Tooltip, Tree, Upload, createControllableValue };
|