@cloudbase/weda-ui 3.17.3 → 3.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/components/wd-textarea.js +24 -0
- package/dist/style/weda-ui.min.css +2 -2
- package/dist/web/components/form/select/allTimePicker/index.css +9 -9
- package/dist/web/components/form/select/allTimePicker/index.d.ts +1 -1
- package/dist/web/components/form/select/allTimePicker/index.js +27 -37
- package/dist/web/components/form/select/dropdown-select/h5.js +5 -5
- package/dist/web/components/form/select/dropdown-select/index.css +15 -20
- package/dist/web/components/form/select/index.css +8 -20
- package/dist/web/components/form/selectMultiple/dropdown-select/h5.js +7 -13
- package/dist/web/components/form/selectMultiple/dropdown-select/index.css +22 -28
- package/dist/web/components/form/uploader/upload/index.d.ts +1 -1
- package/dist/web/components/form/uploader/upload/index.js +4 -3
- package/dist/web/components/form/uploader/uploader.h5.js +2 -3
- package/dist/web/components/form/uploader/uploader.pc.js +1 -1
- package/dist/web/components/wd-select/select/selectUI.js +8 -8
- package/dist/web/components/wd-select/wd-select.css +6 -6
- package/dist/web/components/wd-select-multiple/wd-select-multiple.css +11 -26
- package/dist/web/components/wd-table/components/FieldRender/index.js +1 -1
- package/dist/web/components/wd-upload-image/wd-upload-image.js +1 -1
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
color: var(--wd-color-brand, #0052d9);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.weda-ui-custom-
|
|
83
|
+
.weda-ui-custom-picker__columns {
|
|
84
84
|
display: flex;
|
|
85
85
|
align-items: flex-start;
|
|
86
86
|
position: relative;
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
overflow: hidden;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.weda-ui-custom-
|
|
92
|
+
.weda-ui-custom-picker__columns.size-s {
|
|
93
93
|
height: 200px;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.weda-ui-custom-
|
|
97
|
-
.weda-ui-custom-
|
|
96
|
+
.weda-ui-custom-picker__columns::before,
|
|
97
|
+
.weda-ui-custom-picker__columns::after {
|
|
98
98
|
content: '';
|
|
99
99
|
position: absolute;
|
|
100
100
|
/* width: 100%; */
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
top: 80px;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.weda-ui-custom-
|
|
108
|
+
.weda-ui-custom-picker__columns::after {
|
|
109
109
|
top: 120px;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.weda-ui-custom-
|
|
112
|
+
.weda-ui-custom-picker__column {
|
|
113
113
|
flex: 1 1 0;
|
|
114
114
|
overflow-y: auto;
|
|
115
115
|
overflow-x: hidden;
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
height: 199px;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.weda-ui-custom-
|
|
120
|
+
.weda-ui-custom-picker__column::-webkit-scrollbar {
|
|
121
121
|
display: none;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.weda-ui-custom-
|
|
124
|
+
.weda-ui-custom-picker__column-item {
|
|
125
125
|
line-height: 40px;
|
|
126
126
|
display: flex;
|
|
127
127
|
align-items: center;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
white-space: pre-wrap;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.weda-ui-custom-
|
|
133
|
+
.weda-ui-custom-picker__column-item.is-current {
|
|
134
134
|
color: rgba(0, 0, 0, 0.9);
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -4,7 +4,7 @@ import './style';
|
|
|
4
4
|
/**
|
|
5
5
|
* 年月日时分秒日期选择器
|
|
6
6
|
*/
|
|
7
|
-
export default function AllTimePicker({ startDate, endDate, defaultDate, title, onAllTimeCallback
|
|
7
|
+
export default function AllTimePicker({ startDate, endDate, defaultDate, title, onAllTimeCallback }: PropsType): JSX.Element;
|
|
8
8
|
export interface PropsType extends CommonFormPropsType {
|
|
9
9
|
title?: string;
|
|
10
10
|
startDate?: string;
|
|
@@ -7,7 +7,7 @@ import './style';
|
|
|
7
7
|
/**
|
|
8
8
|
* 年月日时分秒日期选择器
|
|
9
9
|
*/
|
|
10
|
-
export default function AllTimePicker({ startDate, endDate, defaultDate, title, onAllTimeCallback
|
|
10
|
+
export default function AllTimePicker({ startDate, endDate, defaultDate, title, onAllTimeCallback }) {
|
|
11
11
|
// 滑动监听参数
|
|
12
12
|
const dateRef = useRef();
|
|
13
13
|
const dateTimeRef = useRef();
|
|
@@ -51,14 +51,14 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
51
51
|
if (startTime.length === 0) {
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
|
-
return
|
|
54
|
+
return startTime[0] === parseInt((_a = date[0].value[yearIndex]) === null || _a === void 0 ? void 0 : _a.replace('年', ''));
|
|
55
55
|
};
|
|
56
56
|
const currentIsStartMonth = () => {
|
|
57
57
|
var _a;
|
|
58
58
|
if (startTime.length === 0) {
|
|
59
59
|
return false;
|
|
60
60
|
}
|
|
61
|
-
return
|
|
61
|
+
return startTime[1] === parseInt((_a = date[1].value[monthIndex]) === null || _a === void 0 ? void 0 : _a.replace('月', ''));
|
|
62
62
|
};
|
|
63
63
|
const currentIsStartDay = () => {
|
|
64
64
|
if (startTime.length === 0) {
|
|
@@ -71,15 +71,14 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
71
71
|
if (startTime.length === 0) {
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
74
|
-
return
|
|
75
|
-
parseInt((_a = dateTime[0].value[hoursIndex]) === null || _a === void 0 ? void 0 : _a.replace('时', '')));
|
|
74
|
+
return startTime[3] === parseInt((_a = dateTime[0].value[hoursIndex]) === null || _a === void 0 ? void 0 : _a.replace('时', ''));
|
|
76
75
|
};
|
|
77
76
|
const currentIsStartMinutes = (index = minutesIndex) => {
|
|
78
77
|
var _a;
|
|
79
78
|
if (startTime.length === 0) {
|
|
80
79
|
return false;
|
|
81
80
|
}
|
|
82
|
-
return
|
|
81
|
+
return startTime[4] === parseInt((_a = dateTime[1].value[index]) === null || _a === void 0 ? void 0 : _a.replace('分', ''));
|
|
83
82
|
};
|
|
84
83
|
/**
|
|
85
84
|
* 当前选中时间的否和开始、结束时候一致
|
|
@@ -96,7 +95,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
96
95
|
if (endTime.length === 0) {
|
|
97
96
|
return false;
|
|
98
97
|
}
|
|
99
|
-
return
|
|
98
|
+
return endTime[1] === parseInt((_a = date[1].value[monthIndex]) === null || _a === void 0 ? void 0 : _a.replace('月', ''));
|
|
100
99
|
};
|
|
101
100
|
const currentIsEndDay = () => {
|
|
102
101
|
if (endTime.length === 0) {
|
|
@@ -109,15 +108,14 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
109
108
|
if (endTime.length === 0) {
|
|
110
109
|
return false;
|
|
111
110
|
}
|
|
112
|
-
return
|
|
111
|
+
return endTime[3] === parseInt((_a = dateTime[0].value[hoursIndex]) === null || _a === void 0 ? void 0 : _a.replace('时', ''));
|
|
113
112
|
};
|
|
114
113
|
const currentIsEndMinutes = () => {
|
|
115
114
|
var _a;
|
|
116
115
|
if (endTime.length === 0) {
|
|
117
116
|
return false;
|
|
118
117
|
}
|
|
119
|
-
return
|
|
120
|
-
parseInt((_a = dateTime[1].value[minutesIndex]) === null || _a === void 0 ? void 0 : _a.replace('分', '')));
|
|
118
|
+
return endTime[4] === parseInt((_a = dateTime[1].value[minutesIndex]) === null || _a === void 0 ? void 0 : _a.replace('分', ''));
|
|
121
119
|
};
|
|
122
120
|
const showAreaToast = () => {
|
|
123
121
|
var _a;
|
|
@@ -774,9 +772,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
774
772
|
* 日历向后翻页
|
|
775
773
|
*/
|
|
776
774
|
const nextCalendarPage = () => {
|
|
777
|
-
const isBorder = endTime.length > 0
|
|
778
|
-
? date[1].value[monthIndex] === getFormatData(endTime[1]) + '月'
|
|
779
|
-
: monthIndex === 13;
|
|
775
|
+
const isBorder = endTime.length > 0 ? date[1].value[monthIndex] === getFormatData(endTime[1]) + '月' : monthIndex === 13;
|
|
780
776
|
if (yearIndex === date[0].value.length - 3 && isBorder) {
|
|
781
777
|
// 到顶了
|
|
782
778
|
return;
|
|
@@ -797,8 +793,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
797
793
|
const preCalendarPageUpdateDate = () => {
|
|
798
794
|
const id = date[1].id;
|
|
799
795
|
let value;
|
|
800
|
-
if ((yearIndex === 2 && startTime.length > 0) ||
|
|
801
|
-
(yearIndex === 3 && monthIndex === 2)) {
|
|
796
|
+
if ((yearIndex === 2 && startTime.length > 0) || (yearIndex === 3 && monthIndex === 2)) {
|
|
802
797
|
// 开始年份===结束年份
|
|
803
798
|
const sn = endTime.length > 0 && startTime[0] === endTime[0];
|
|
804
799
|
value = defaultData()[1].value.filter((item) => {
|
|
@@ -806,9 +801,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
806
801
|
return true;
|
|
807
802
|
}
|
|
808
803
|
const current = parseInt(item.replace('月', ''));
|
|
809
|
-
return sn
|
|
810
|
-
? current >= startTime[1] && current <= endTime[1]
|
|
811
|
-
: current >= startTime[1];
|
|
804
|
+
return sn ? current >= startTime[1] && current <= endTime[1] : current >= startTime[1];
|
|
812
805
|
});
|
|
813
806
|
}
|
|
814
807
|
else {
|
|
@@ -821,8 +814,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
821
814
|
const id = date[1].id;
|
|
822
815
|
let value;
|
|
823
816
|
if (endTime.length > 0 &&
|
|
824
|
-
((yearIndex === date[0].value.length - 4 && monthIndex === 13) ||
|
|
825
|
-
yearIndex === date[0].value.length - 3)) {
|
|
817
|
+
((yearIndex === date[0].value.length - 4 && monthIndex === 13) || yearIndex === date[0].value.length - 3)) {
|
|
826
818
|
// 开始年份===结束年份
|
|
827
819
|
const sn = startTime.length > 0 && startTime[0] === endTime[0];
|
|
828
820
|
// 12月及其以后
|
|
@@ -831,9 +823,7 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
831
823
|
return true;
|
|
832
824
|
}
|
|
833
825
|
const current = parseInt(item.replace('月', ''));
|
|
834
|
-
return sn
|
|
835
|
-
? current >= startTime[1] && current <= endTime[1]
|
|
836
|
-
: current <= endTime[1];
|
|
826
|
+
return sn ? current >= startTime[1] && current <= endTime[1] : current <= endTime[1];
|
|
837
827
|
});
|
|
838
828
|
}
|
|
839
829
|
else if (yearIndex === 2 && monthIndex !== date[1].value.length - 3) {
|
|
@@ -896,32 +886,32 @@ export default function AllTimePicker({ startDate, endDate, defaultDate, title,
|
|
|
896
886
|
} }), _jsx("span", { "data-testid": "next-calendar-page", className: "weda-ui-icon-turn-next", onClick: () => {
|
|
897
887
|
timeMode.current = false;
|
|
898
888
|
nextCalendarPage();
|
|
899
|
-
} })] })] }), _jsxs("div", { style: { height: '310px' }, children: [!selectMonth && !selectTime && (_jsx(Calendar, { startTime: startTime, endTime: endTime, selectYear: getDateValue(0, yearIndex, '年', ''), selectMonth: getDateValue(1, monthIndex, '月', ''), defaultSelectDay: selectDay, setCurrentDay: setCurrentDay })), selectMonth && (_jsx("div", { "data-testid": "allTime-scroll-data", className: "weda-ui-custom-
|
|
889
|
+
} })] })] }), _jsxs("div", { style: { height: '310px' }, children: [!selectMonth && !selectTime && (_jsx(Calendar, { startTime: startTime, endTime: endTime, selectYear: getDateValue(0, yearIndex, '年', ''), selectMonth: getDateValue(1, monthIndex, '月', ''), defaultSelectDay: selectDay, setCurrentDay: setCurrentDay })), selectMonth && (_jsx("div", { "data-testid": "allTime-scroll-data", className: "weda-ui-custom-picker__columns size-s",
|
|
900
890
|
// style={{ display: 'none' }}
|
|
901
891
|
onScroll: (e) => {
|
|
902
892
|
dateScroll(e, 'date');
|
|
903
|
-
}, ref: dateRef, children: date.map((
|
|
904
|
-
return (_jsx("ul", { className: "weda-ui-custom-
|
|
905
|
-
const selectIndex =
|
|
906
|
-
return (_jsx("li", { className: `weda-ui-custom-
|
|
907
|
-
}) },
|
|
908
|
-
}) })), selectTime && (_jsx("div", { "data-testid": "allTime-scroll-time", className: "weda-ui-custom-
|
|
893
|
+
}, ref: dateRef, children: date.map((column) => {
|
|
894
|
+
return (_jsx("ul", { className: "weda-ui-custom-picker__column", children: column.value.map((item, index) => {
|
|
895
|
+
const selectIndex = column.id === 'column1' ? yearIndex : monthIndex;
|
|
896
|
+
return (_jsx("li", { className: `weda-ui-custom-picker__column-item ${index === selectIndex ? 'is-current' : ''}`, children: _jsx("p", { children: item }) }, index));
|
|
897
|
+
}) }, column.id));
|
|
898
|
+
}) })), selectTime && (_jsx("div", { "data-testid": "allTime-scroll-time", className: "weda-ui-custom-picker__columns size-s",
|
|
909
899
|
// style={{ display: 'none' }}
|
|
910
900
|
onScroll: (e) => {
|
|
911
901
|
dateScroll(e, 'dateTime');
|
|
912
|
-
}, ref: dateTimeRef, children: dateTime.map((
|
|
913
|
-
return (_jsx("ul", { className: "weda-ui-custom-
|
|
902
|
+
}, ref: dateTimeRef, children: dateTime.map((column) => {
|
|
903
|
+
return (_jsx("ul", { className: "weda-ui-custom-picker__column", children: column.value.map((item, index) => {
|
|
914
904
|
let selectIndex = 8;
|
|
915
|
-
if (
|
|
905
|
+
if (column.id === 'column1') {
|
|
916
906
|
selectIndex = hoursIndex;
|
|
917
907
|
}
|
|
918
|
-
else if (
|
|
908
|
+
else if (column.id === 'column2') {
|
|
919
909
|
selectIndex = minutesIndex;
|
|
920
910
|
}
|
|
921
|
-
else if (
|
|
911
|
+
else if (column.id === 'column3') {
|
|
922
912
|
selectIndex = secondsIndex;
|
|
923
913
|
}
|
|
924
|
-
return (_jsx("li", { className: `weda-ui-custom-
|
|
925
|
-
}) },
|
|
914
|
+
return (_jsx("li", { className: `weda-ui-custom-picker__column-item ${index == selectIndex ? 'is-current' : ''}`, children: _jsx("p", { children: item }) }, index));
|
|
915
|
+
}) }, column.id));
|
|
926
916
|
}) }))] })] })] })] }) }));
|
|
927
917
|
}
|
|
@@ -7,7 +7,7 @@ import Loading from '../status/loading';
|
|
|
7
7
|
import Retry from '../status/retry';
|
|
8
8
|
import Empty from '../status/empty';
|
|
9
9
|
import AllEmpty from '../status/allEmpty';
|
|
10
|
-
import { PAGE_SIZE, requestFatherRelatedOption, RequestOptionType
|
|
10
|
+
import { PAGE_SIZE, requestFatherRelatedOption, RequestOptionType } from '../request';
|
|
11
11
|
import classNames from '../../../../utils/classnames';
|
|
12
12
|
import './style';
|
|
13
13
|
export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPages, loadMore, onSearchValue, reTry, status, isShow, params, onSearchValueInput, addRelationButton, portalContainer, }) {
|
|
@@ -106,14 +106,14 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
106
106
|
} }))] }), _jsx("button", { className: "weda-ui-custom-search__btn-cancle", onClick: () => {
|
|
107
107
|
setInputFocus(false);
|
|
108
108
|
setSearchValue('');
|
|
109
|
-
}, children: "\u53D6\u6D88" })] }), status === Status.ALl_EMPTY ? (_jsx(AllEmpty, { height: inputFocus ? 'calc(100vh - 160px)' : '280px' })) : (_jsxs("div", { className: "weda-ui-custom-
|
|
109
|
+
}, children: "\u53D6\u6D88" })] }), status === Status.ALl_EMPTY ? (_jsx(AllEmpty, { height: inputFocus ? 'calc(100vh - 160px)' : '280px' })) : (_jsxs("div", { className: "weda-ui-custom-picker__columns weda-ui-custom-picker__columns--select ", "data-testid": "weda-ui-custom-picker__columns", style: {
|
|
110
110
|
height: inputFocus ? 'calc(100vh - 160px)' : '280px',
|
|
111
|
-
}, onScroll: contentScroll, ref: contentRef, children: [_jsxs("ul", { className: "weda-ui-custom-
|
|
111
|
+
}, onScroll: contentScroll, ref: contentRef, children: [_jsxs("ul", { className: "weda-ui-custom-picker__column", style: {
|
|
112
112
|
height: inputFocus ? 'calc(100vh - 190px)' : '250px',
|
|
113
113
|
}, children: [options === null || options === void 0 ? void 0 : options.map((item, index) => {
|
|
114
114
|
// is-selected 选中态
|
|
115
115
|
// is-disabled 禁用态,该状态备用,暂时不让生效index === -1
|
|
116
|
-
const itemCls = classNames('weda-ui-custom-
|
|
116
|
+
const itemCls = classNames('weda-ui-custom-picker__column-item', {
|
|
117
117
|
'is-selected': index === clickIndex && !inputFocus,
|
|
118
118
|
'is-disabled': index === -1 || item.disabled,
|
|
119
119
|
});
|
|
@@ -123,6 +123,6 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
123
123
|
setInputFocus(false);
|
|
124
124
|
setSearchValue('');
|
|
125
125
|
updateValue(item, true, true, true);
|
|
126
|
-
}, children: _jsx("p", { className: 'weda-ui-custom-
|
|
126
|
+
}, children: _jsx("p", { className: 'weda-ui-custom-picker__column-item-text', children: item.label }) }, index));
|
|
127
127
|
}), status === Status.LOADING && (_jsx("li", { children: _jsx(Loading, {}) }, 'loading')), status === Status.ERROR && (_jsx("li", { children: _jsx(Retry, { reTry: reTry }) }, 'retry')), status === Status.EMPTY && (_jsx("li", { children: _jsx(Empty, {}) }, 'empty'))] }), addRelationButton] }))] })] })] }) })) : null;
|
|
128
128
|
}
|
|
@@ -77,25 +77,22 @@
|
|
|
77
77
|
transform: translateX(0);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.weda-ui-custom-search.is-focused
|
|
81
|
-
.weda-ui-custom-search-box__search-placeholder {
|
|
80
|
+
.weda-ui-custom-search.is-focused .weda-ui-custom-search-box__search-placeholder {
|
|
82
81
|
display: none;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
.weda-ui-custom-
|
|
84
|
+
.weda-ui-custom-picker__column-item.is-current {
|
|
86
85
|
color: rgba(0, 0, 0, 0.9);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
.weda-ui-custom-
|
|
90
|
-
.weda-ui-custom-picker__cloumn-item {
|
|
88
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select .weda-ui-custom-picker__column-item {
|
|
91
89
|
height: 48px;
|
|
92
90
|
justify-content: flex-start;
|
|
93
91
|
color: rgba(0, 0, 0, 0.9);
|
|
94
92
|
position: relative;
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
.weda-ui-custom-
|
|
98
|
-
.weda-ui-custom-picker__cloumn-item::before {
|
|
95
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select .weda-ui-custom-picker__column-item::before {
|
|
99
96
|
content: '';
|
|
100
97
|
position: absolute;
|
|
101
98
|
bottom: 0;
|
|
@@ -105,13 +102,12 @@
|
|
|
105
102
|
transform: scaleY(0.5);
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
.weda-ui-custom-
|
|
109
|
-
.weda-ui-custom-picker__cloumn-item.is-selected {
|
|
105
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select .weda-ui-custom-picker__column-item.is-selected {
|
|
110
106
|
color: var(--wd-color-brand, #0052d9);
|
|
111
107
|
}
|
|
112
108
|
|
|
113
|
-
.weda-ui-custom-
|
|
114
|
-
.weda-ui-custom-
|
|
109
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select
|
|
110
|
+
.weda-ui-custom-picker__column-item.is-selected::after {
|
|
115
111
|
content: '';
|
|
116
112
|
display: block;
|
|
117
113
|
width: 8px;
|
|
@@ -124,23 +120,22 @@
|
|
|
124
120
|
right: 10px;
|
|
125
121
|
}
|
|
126
122
|
|
|
127
|
-
.weda-ui-custom-
|
|
128
|
-
.weda-ui-custom-picker__cloumn-item.is-disabled {
|
|
123
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select .weda-ui-custom-picker__column-item.is-disabled {
|
|
129
124
|
color: rgba(0, 0, 0, 0.26);
|
|
130
125
|
}
|
|
131
126
|
|
|
132
127
|
/* 下拉选择类型 */
|
|
133
|
-
.weda-ui-custom-
|
|
128
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select {
|
|
134
129
|
padding: 0 16px;
|
|
135
130
|
height: 280px;
|
|
136
131
|
}
|
|
137
132
|
|
|
138
|
-
.weda-ui-custom-
|
|
139
|
-
.weda-ui-custom-
|
|
133
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select::before,
|
|
134
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select::after {
|
|
140
135
|
display: none;
|
|
141
136
|
}
|
|
142
137
|
|
|
143
|
-
.weda-ui-custom-
|
|
138
|
+
.weda-ui-custom-picker__columns--select .weda-ui-custom-picker__column {
|
|
144
139
|
height: 250px;
|
|
145
140
|
}
|
|
146
141
|
|
|
@@ -166,17 +161,17 @@
|
|
|
166
161
|
caret-color: #000000;
|
|
167
162
|
}
|
|
168
163
|
|
|
169
|
-
.weda-ui-custom-
|
|
164
|
+
.weda-ui-custom-picker__column-item-text {
|
|
170
165
|
overflow: hidden;
|
|
171
166
|
text-overflow: ellipsis;
|
|
172
167
|
white-space: nowrap;
|
|
173
168
|
margin-right: 40px;
|
|
174
169
|
}
|
|
175
170
|
|
|
176
|
-
.weda-ui-custom-
|
|
171
|
+
.weda-ui-custom-picker__columns {
|
|
177
172
|
display: flex;
|
|
178
173
|
flex-direction: column;
|
|
179
174
|
}
|
|
180
|
-
.weda-ui-custom-
|
|
175
|
+
.weda-ui-custom-picker__column {
|
|
181
176
|
width: 100%;
|
|
182
177
|
}
|
|
@@ -54,33 +54,21 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* 下拉单选 theme */
|
|
57
|
-
:root
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
:root
|
|
62
|
-
.wedatea2td-dropdown-box
|
|
63
|
-
.wedatea2td-search--simple
|
|
64
|
-
.wedatea2td-input--search:focus,
|
|
65
|
-
:host
|
|
66
|
-
.wedatea2td-dropdown-box
|
|
67
|
-
.wedatea2td-search--icon-front
|
|
68
|
-
.wedatea2td-input--search:focus,
|
|
69
|
-
:host
|
|
70
|
-
.wedatea2td-dropdown-box
|
|
71
|
-
.wedatea2td-search--simple
|
|
72
|
-
.wedatea2td-input--search:focus {
|
|
57
|
+
:root .wedatea2td-dropdown-box .wedatea2td-search--icon-front .wedatea2td-input--search:focus,
|
|
58
|
+
:root .wedatea2td-dropdown-box .wedatea2td-search--simple .wedatea2td-input--search:focus,
|
|
59
|
+
:host .wedatea2td-dropdown-box .wedatea2td-search--icon-front .wedatea2td-input--search:focus,
|
|
60
|
+
:host .wedatea2td-dropdown-box .wedatea2td-search--simple .wedatea2td-input--search:focus {
|
|
73
61
|
border-color: var(--wd-color-brand, #0052d9);
|
|
74
62
|
}
|
|
75
63
|
:root
|
|
76
|
-
.weda-ui-custom-
|
|
77
|
-
.weda-ui-custom-
|
|
64
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select
|
|
65
|
+
.weda-ui-custom-picker__column-item.is-selected,
|
|
78
66
|
:root .weda-ui-custom-search__btn-cancle,
|
|
79
67
|
:root .weda-ui-custom-picker__loading-icon,
|
|
80
68
|
:root .weda-ui-custom-picker__status--loading,
|
|
81
69
|
:host
|
|
82
|
-
.weda-ui-custom-
|
|
83
|
-
.weda-ui-custom-
|
|
70
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select
|
|
71
|
+
.weda-ui-custom-picker__column-item.is-selected,
|
|
84
72
|
:host .weda-ui-custom-search__btn-cancle,
|
|
85
73
|
:host .weda-ui-custom-picker__loading-icon,
|
|
86
74
|
:host .weda-ui-custom-picker__status--loading {
|
|
@@ -34,10 +34,7 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
34
34
|
const dealSelectedValue = (value) => {
|
|
35
35
|
const index = selectedValueCache.findIndex((v) => v === value);
|
|
36
36
|
if (index > -1) {
|
|
37
|
-
return [
|
|
38
|
-
...selectedValueCache.slice(0, index),
|
|
39
|
-
...selectedValueCache.slice(index + 1),
|
|
40
|
-
];
|
|
37
|
+
return [...selectedValueCache.slice(0, index), ...selectedValueCache.slice(index + 1)];
|
|
41
38
|
}
|
|
42
39
|
return [...selectedValueCache, value];
|
|
43
40
|
};
|
|
@@ -59,9 +56,7 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
59
56
|
setSelectedValueCache(Array.isArray(selectedValue) ? selectedValue : [selectedValue]);
|
|
60
57
|
};
|
|
61
58
|
const confirm = () => {
|
|
62
|
-
updateValue(selectedValueCache
|
|
63
|
-
.map((v) => options.find((item) => item.value === v))
|
|
64
|
-
.filter((v) => !!v));
|
|
59
|
+
updateValue(selectedValueCache.map((v) => options.find((item) => item.value === v)).filter((v) => !!v));
|
|
65
60
|
getIsShow();
|
|
66
61
|
};
|
|
67
62
|
const contentScroll = () => {
|
|
@@ -109,22 +104,21 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
109
104
|
} }))] }), _jsx("button", { className: "weda-ui-custom-search__btn-cancle", onClick: () => {
|
|
110
105
|
setInputFocus(false);
|
|
111
106
|
setSearchValue('');
|
|
112
|
-
}, children: "\u53D6\u6D88" })] }), status === Status.ALl_EMPTY ? (_jsx(AllEmpty, { height: inputFocus ? 'calc(100vh - 160px)' : '280px' })) : (_jsxs("div", { className: "weda-ui-custom-
|
|
107
|
+
}, children: "\u53D6\u6D88" })] }), status === Status.ALl_EMPTY ? (_jsx(AllEmpty, { height: inputFocus ? 'calc(100vh - 160px)' : '280px' })) : (_jsxs("div", { className: "weda-ui-custom-picker__columns weda-ui-custom-picker__columns--select-multiple ", style: {
|
|
113
108
|
height: inputFocus ? 'calc(100vh - 160px)' : '280px',
|
|
114
|
-
}, onScroll: contentScroll, ref: contentRef, children: [_jsxs("ul", { className: "weda-ui-custom-
|
|
109
|
+
}, onScroll: contentScroll, ref: contentRef, children: [_jsxs("ul", { className: "weda-ui-custom-picker__column", style: {
|
|
115
110
|
height: inputFocus ? 'calc(100vh - 190px)' : '250px',
|
|
116
111
|
}, children: [options === null || options === void 0 ? void 0 : options.map((item, index) => {
|
|
117
112
|
// is-selected 选中态
|
|
118
113
|
// is-disabled 禁用态
|
|
119
|
-
const itemCls = classNames('weda-ui-custom-
|
|
114
|
+
const itemCls = classNames('weda-ui-custom-picker__column-item', {
|
|
120
115
|
'is-selected': checkIndex(item),
|
|
121
116
|
'is-disabled': index === -1 || item.disabled,
|
|
122
117
|
});
|
|
123
118
|
return (_jsx("li", { className: itemCls, onClick: () => {
|
|
124
119
|
if (item.disabled)
|
|
125
120
|
return;
|
|
126
|
-
if (selectedValueCache &&
|
|
127
|
-
selectedValueCache.length > 49) {
|
|
121
|
+
if (selectedValueCache && selectedValueCache.length > 49) {
|
|
128
122
|
if (selectedValueCache.indexOf(item.value) !== -1) {
|
|
129
123
|
// updateValue(item);
|
|
130
124
|
setSelectedValueCache(dealSelectedValue(item.value));
|
|
@@ -141,6 +135,6 @@ export function SelectPickerH5({ updateValue, selectedValue, options, isTurnPage
|
|
|
141
135
|
setSelectedValueCache(dealSelectedValue(item.value));
|
|
142
136
|
setInd(Math.random());
|
|
143
137
|
}
|
|
144
|
-
}, children: _jsx("p", { className: 'weda-ui-custom-
|
|
138
|
+
}, children: _jsx("p", { className: 'weda-ui-custom-picker__column-item-text-multiple', children: item.label }) }, index));
|
|
145
139
|
}), status === Status.LOADING && (_jsx("li", { children: _jsx(Loading, {}) }, 'loading')), status === Status.ERROR && (_jsx("li", { children: _jsx(Retry, { reTry: reTry }) }, 'retry')), status === Status.EMPTY && (_jsx("li", { children: _jsx(Empty, {}) }, 'empty'))] }), addRelationButton] }))] })] })] }) })) : null;
|
|
146
140
|
}
|
|
@@ -77,25 +77,23 @@
|
|
|
77
77
|
transform: translateX(0);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.weda-ui-custom-search.is-focused
|
|
81
|
-
.weda-ui-custom-search-box__search-placeholder {
|
|
80
|
+
.weda-ui-custom-search.is-focused .weda-ui-custom-search-box__search-placeholder {
|
|
82
81
|
display: none;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
.weda-ui-custom-
|
|
84
|
+
.weda-ui-custom-picker__column-item.is-current {
|
|
86
85
|
color: rgba(0, 0, 0, 0.9);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
.weda-ui-custom-
|
|
90
|
-
.weda-ui-custom-picker__cloumn-item {
|
|
88
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple .weda-ui-custom-picker__column-item {
|
|
91
89
|
height: 56px;
|
|
92
90
|
justify-content: flex-start;
|
|
93
91
|
color: rgba(0, 0, 0, 0.9);
|
|
94
92
|
position: relative;
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
.weda-ui-custom-
|
|
98
|
-
.weda-ui-custom-
|
|
95
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple
|
|
96
|
+
.weda-ui-custom-picker__column-item::before {
|
|
99
97
|
content: '';
|
|
100
98
|
position: absolute;
|
|
101
99
|
bottom: 0;
|
|
@@ -105,12 +103,12 @@
|
|
|
105
103
|
transform: scaleY(0.5);
|
|
106
104
|
}
|
|
107
105
|
|
|
108
|
-
.weda-ui-custom-
|
|
109
|
-
.weda-ui-custom-
|
|
106
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple
|
|
107
|
+
.weda-ui-custom-picker__column-item.is-selected {
|
|
110
108
|
color: rgba(0, 0, 0, 0.9);
|
|
111
109
|
}
|
|
112
|
-
.weda-ui-custom-
|
|
113
|
-
.weda-ui-custom-
|
|
110
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple
|
|
111
|
+
.weda-ui-custom-picker__column-item::after {
|
|
114
112
|
content: '';
|
|
115
113
|
width: 20px;
|
|
116
114
|
height: 20px;
|
|
@@ -121,8 +119,8 @@
|
|
|
121
119
|
left: 5px;
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
.weda-ui-custom-
|
|
125
|
-
.weda-ui-custom-
|
|
122
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple
|
|
123
|
+
.weda-ui-custom-picker__column-item.is-selected::after {
|
|
126
124
|
content: '';
|
|
127
125
|
width: 21px;
|
|
128
126
|
height: 21px;
|
|
@@ -137,24 +135,23 @@
|
|
|
137
135
|
background-color: var(--wd-color-brand, #0052d9);
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
.weda-ui-custom-
|
|
141
|
-
.weda-ui-custom-
|
|
138
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple
|
|
139
|
+
.weda-ui-custom-picker__column-item.is-disabled {
|
|
142
140
|
color: rgba(0, 0, 0, 0.26);
|
|
143
141
|
}
|
|
144
142
|
|
|
145
143
|
/* 下拉选择类型 */
|
|
146
|
-
.weda-ui-custom-
|
|
144
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple {
|
|
147
145
|
padding: 0 16px;
|
|
148
146
|
height: 280px;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
.weda-ui-custom-
|
|
152
|
-
.weda-ui-custom-
|
|
149
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple::before,
|
|
150
|
+
.weda-ui-custom-picker__columns.weda-ui-custom-picker__columns--select-multiple::after {
|
|
153
151
|
display: none;
|
|
154
152
|
}
|
|
155
153
|
|
|
156
|
-
.weda-ui-custom-
|
|
157
|
-
.weda-ui-custom-picker__cloumn {
|
|
154
|
+
.weda-ui-custom-picker__columns--select-multiple .weda-ui-custom-picker__column {
|
|
158
155
|
height: 250px;
|
|
159
156
|
}
|
|
160
157
|
|
|
@@ -174,7 +171,7 @@
|
|
|
174
171
|
caret-color: #000000;
|
|
175
172
|
}
|
|
176
173
|
|
|
177
|
-
.weda-ui-custom-
|
|
174
|
+
.weda-ui-custom-picker__column-item-text-multiple {
|
|
178
175
|
overflow: hidden;
|
|
179
176
|
text-overflow: ellipsis;
|
|
180
177
|
white-space: nowrap;
|
|
@@ -240,10 +237,7 @@
|
|
|
240
237
|
no-repeat center;
|
|
241
238
|
}
|
|
242
239
|
|
|
243
|
-
.is-disabled
|
|
244
|
-
.wedatea2td-dropdown-link
|
|
245
|
-
.wedatea2td-dropdown__value
|
|
246
|
-
.wedatea2td-icon-arrowdown,
|
|
240
|
+
.is-disabled .wedatea2td-dropdown-link .wedatea2td-dropdown__value .wedatea2td-icon-arrowdown,
|
|
247
241
|
.is-disabled .wedatea2td-dropdown__header .wedatea2td-icon-arrowdown {
|
|
248
242
|
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+Y2hldnJvbi1kb3duPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJJY29ucyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyNC4wMDAwMDAsIC05NTEuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSJjaGV2cm9uLWRvd24iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIyNC4wMDAwMDAsIDk1MS4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNiwwIEwxNiwxNiBMMCwxNiBMMCwwIEwxNiwwIFoiIGlkPSLnn6nlvaIiIG9wYWNpdHk9IjAuNjAwMDAwMDI0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNC40NTk2MTM1Niw1LjU0MDQwNTI3IEw3Ljk5OTk5NDI4LDkuMDgwNzg1NzUgTDExLjU0MDM3NDgsNS41NDA0MDUyNyBMMTIuNDU5NjEzOCw2LjQ1OTY0NDA4IEw3Ljk5OTk5NDI4LDEwLjkxOTI2MzQgTDMuNTQwMzc0NzYsNi40NTk2NDQwOCBMNC40NTk2MTM1Niw1LjU0MDQwNTI3IFoiIGlkPSLot6/lvoQtNC0oU3Ryb2tlKSIgZmlsbD0iIzAwMDAwMCI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=);
|
|
249
243
|
}
|
|
@@ -281,13 +275,13 @@
|
|
|
281
275
|
margin-right: 5px;
|
|
282
276
|
}
|
|
283
277
|
|
|
284
|
-
.weda-ui-custom-
|
|
278
|
+
.weda-ui-custom-picker__columns {
|
|
285
279
|
display: flex;
|
|
286
280
|
flex-direction: column;
|
|
287
281
|
}
|
|
288
|
-
.weda-ui-custom-
|
|
282
|
+
.weda-ui-custom-picker__column {
|
|
289
283
|
width: 100%;
|
|
290
284
|
}
|
|
291
|
-
.weda-ui-custom-
|
|
285
|
+
.weda-ui-custom-picker__columns .wd-add-relation-button-wrap {
|
|
292
286
|
margin: 10px 0;
|
|
293
287
|
}
|
|
@@ -5,11 +5,11 @@ interface UploadProps extends EventsType {
|
|
|
5
5
|
name?: DataType['name'];
|
|
6
6
|
value?: DataType['value'] | string;
|
|
7
7
|
acceptTypes?: any;
|
|
8
|
-
capture?: any;
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
readOnly?: boolean;
|
|
11
10
|
uploadPath?: string;
|
|
12
11
|
multiple?: boolean;
|
|
12
|
+
sourceType?: DataType['sourceType'];
|
|
13
13
|
isCompressBeforeUpload?: DataType['isCompressBeforeUpload'];
|
|
14
14
|
compressQuality?: DataType['compressQuality'];
|
|
15
15
|
compressedHeight?: DataType['compressedHeight'];
|