fan-standard-comp 3.1.13 → 3.1.14
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/fan-standard-comp.umd.js +1 -1
- package/es/CalendarCoordPicker/CalendarMonthPicker.d.ts +4 -0
- package/es/CalendarCoordPicker/CalendarMonthPicker.js +26 -0
- package/es/CalendarCoordPicker/index.d.ts +7 -0
- package/es/CalendarCoordPicker/index.js +296 -0
- package/es/CalendarCoordPicker/index.less +31 -0
- package/es/utils/filterPermission.js +1 -1
- package/lib/CalendarCoordPicker/CalendarMonthPicker.d.ts +4 -0
- package/lib/CalendarCoordPicker/CalendarMonthPicker.js +37 -0
- package/lib/CalendarCoordPicker/index.d.ts +7 -0
- package/lib/CalendarCoordPicker/index.js +306 -0
- package/lib/CalendarCoordPicker/index.less +31 -0
- package/lib/utils/filterPermission.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("antd/es/button/style");
|
|
9
|
+
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
require("./index.less");
|
|
12
|
+
var _icons = require("@ant-design/icons");
|
|
13
|
+
var _CalendarMonthPicker = _interopRequireDefault(require("./CalendarMonthPicker"));
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import type { CalendarProps } from 'antd';
|
|
23
|
+
// import type { Dayjs } from 'dayjs';
|
|
24
|
+
var CalendarCoordPicker = function CalendarCoordPicker(props) {
|
|
25
|
+
var _props$type = props.type,
|
|
26
|
+
type = _props$type === void 0 ? 'directPick' : _props$type,
|
|
27
|
+
year = props.year;
|
|
28
|
+
var _useState = (0, _react.useState)(2023),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
yearNum = _useState2[0],
|
|
31
|
+
setYearNum = _useState2[1];
|
|
32
|
+
(0, _react.useEffect)(function () {
|
|
33
|
+
setYearNum(year);
|
|
34
|
+
}, [year]);
|
|
35
|
+
// const cellDays = useMemo(() => {
|
|
36
|
+
// return
|
|
37
|
+
// }, [])
|
|
38
|
+
// const onPanelChange = (value: Dayjs, mode: CalendarProps<Dayjs>['mode']) => {
|
|
39
|
+
// console.log(value.format('YYYY-MM-DD'), mode);
|
|
40
|
+
// };
|
|
41
|
+
(0, _react.useEffect)(function () {
|
|
42
|
+
// 获取日历格子元素
|
|
43
|
+
// var calendarCells = document.querySelectorAll('.calendar-cell');
|
|
44
|
+
var calendarCells = document.querySelectorAll('.ant-picker-cell');
|
|
45
|
+
// console.log('calendarCells', calendarCells)
|
|
46
|
+
// console.log('calendarCells', document.getElementsByClassName('ant-picker-cell-in-view'))
|
|
47
|
+
// 记录鼠标按下的位置
|
|
48
|
+
var startX, startY;
|
|
49
|
+
// 记录鼠标框选的起始位置和结束位置
|
|
50
|
+
// let startCell: any;
|
|
51
|
+
var endCell;
|
|
52
|
+
var startCellIndex, endCellIndex;
|
|
53
|
+
var startCellRect, endCellRect;
|
|
54
|
+
var cellSelectProcessing = false;
|
|
55
|
+
// 监听鼠标按下事件
|
|
56
|
+
document.addEventListener('mousedown', function (event) {
|
|
57
|
+
// 记录鼠标按下的位置
|
|
58
|
+
startX = event.clientX;
|
|
59
|
+
startY = event.clientY;
|
|
60
|
+
var startCellConfig = getCellFromCoordinates(startX, startY);
|
|
61
|
+
// 获取鼠标按下的日历格子
|
|
62
|
+
// startCell = startCellConfig.cell;
|
|
63
|
+
startCellIndex = startCellConfig.cellIndex;
|
|
64
|
+
startCellRect = startCellConfig.cellRect;
|
|
65
|
+
cellSelectProcessing = true;
|
|
66
|
+
});
|
|
67
|
+
// 监听鼠标移动事件
|
|
68
|
+
document.addEventListener('mousemove', function (event) {
|
|
69
|
+
// 获取鼠标移动的位置
|
|
70
|
+
var currentX = event.clientX;
|
|
71
|
+
var currentY = event.clientY;
|
|
72
|
+
// 获取鼠标移动的日历格子
|
|
73
|
+
var currentCellConfig = getCellFromCoordinates(currentX, currentY);
|
|
74
|
+
var currentCell = currentCellConfig.cell;
|
|
75
|
+
var currentCellIndex = currentCellConfig.cellIndex;
|
|
76
|
+
var currentCellRect = currentCellConfig.cellRect;
|
|
77
|
+
// 如果鼠标移动的日历格子不为空,则进行框选
|
|
78
|
+
if (cellSelectProcessing && currentCell) {
|
|
79
|
+
// 清除之前的框选样式
|
|
80
|
+
clearSelection();
|
|
81
|
+
// 设置当前日历格子的框选样式
|
|
82
|
+
// currentCell.classList.add('spec-calendar-coordinate-picker__order-selected');
|
|
83
|
+
// 记录结束位置
|
|
84
|
+
endCell = currentCell;
|
|
85
|
+
endCellIndex = currentCellIndex;
|
|
86
|
+
endCellRect = currentCellRect;
|
|
87
|
+
type === 'orderPick' ? getCellSelected() : getCellCoordinate();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
// 监听鼠标松开事件
|
|
91
|
+
document.addEventListener('mouseup', function (event) {
|
|
92
|
+
// 清除框选样式
|
|
93
|
+
clearSelection();
|
|
94
|
+
// 获取鼠标松开的位置
|
|
95
|
+
var endX = event.clientX;
|
|
96
|
+
var endY = event.clientY;
|
|
97
|
+
// 获取鼠标松开的日历格子
|
|
98
|
+
var endCellConfig = getCellFromCoordinates(endX, endY);
|
|
99
|
+
endCell = endCellConfig.cell;
|
|
100
|
+
endCellIndex = endCellConfig.cellIndex;
|
|
101
|
+
endCellRect = endCellConfig.cellRect;
|
|
102
|
+
// 如果鼠标松开的日历格子不为空,则进行框选
|
|
103
|
+
if (endCell) {
|
|
104
|
+
type === 'orderPick' ? getCellSelected() : getCellCoordinate();
|
|
105
|
+
}
|
|
106
|
+
cellSelectProcessing = false;
|
|
107
|
+
});
|
|
108
|
+
// 按坐标内的顺序选中
|
|
109
|
+
var getCellSelected = function getCellSelected() {
|
|
110
|
+
for (var i = Math.min(startCellIndex, endCellIndex); i <= Math.max(startCellIndex, endCellIndex); i++) {
|
|
111
|
+
// const rect = calendarCells[i].getBoundingClientRect();
|
|
112
|
+
if (calendarCells[i].classList.contains('ant-picker-cell-in-view')) {
|
|
113
|
+
calendarCells[i].classList.add('spec-calendar-coordinate-picker__order-selected');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
// 按坐标内的范围选中
|
|
118
|
+
var getCellCoordinate = function getCellCoordinate() {
|
|
119
|
+
var direct = ''; // 选中单元格方位
|
|
120
|
+
if (!startCellRect && !endCellRect) return;
|
|
121
|
+
if ((startCellRect === null || startCellRect === void 0 ? void 0 : startCellRect.x) === (endCellRect === null || endCellRect === void 0 ? void 0 : endCellRect.x)) {
|
|
122
|
+
if (startCellRect.y === endCellRect.y) {
|
|
123
|
+
direct = 'center';
|
|
124
|
+
} else if (startCellRect.y > endCellRect.y) {
|
|
125
|
+
direct = 'centerTop';
|
|
126
|
+
} else if (startCellRect.y < endCellRect.y) {
|
|
127
|
+
direct = 'centerBottom';
|
|
128
|
+
}
|
|
129
|
+
} else if ((startCellRect === null || startCellRect === void 0 ? void 0 : startCellRect.x) > (endCellRect === null || endCellRect === void 0 ? void 0 : endCellRect.x)) {
|
|
130
|
+
if (startCellRect.y === endCellRect.y) {
|
|
131
|
+
direct = 'centerLeft';
|
|
132
|
+
} else if (startCellRect.y > endCellRect.y) {
|
|
133
|
+
direct = 'leftTop';
|
|
134
|
+
} else if (startCellRect.y < endCellRect.y) {
|
|
135
|
+
direct = 'leftBottom';
|
|
136
|
+
}
|
|
137
|
+
} else if ((startCellRect === null || startCellRect === void 0 ? void 0 : startCellRect.x) < (endCellRect === null || endCellRect === void 0 ? void 0 : endCellRect.x)) {
|
|
138
|
+
if (startCellRect.y === endCellRect.y) {
|
|
139
|
+
direct = 'centerRight';
|
|
140
|
+
} else if (startCellRect.y > endCellRect.y) {
|
|
141
|
+
direct = 'rightTop';
|
|
142
|
+
} else if (startCellRect.y < endCellRect.y) {
|
|
143
|
+
direct = 'rightBottom';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
var selectedCells = []; // 过滤当前选中的单元格
|
|
147
|
+
for (var i = 0; i < calendarCells.length; i++) {
|
|
148
|
+
var rect = calendarCells[i].getBoundingClientRect();
|
|
149
|
+
if (rect && calendarCells[i].classList.contains('ant-picker-cell-in-view')) {
|
|
150
|
+
switch (direct) {
|
|
151
|
+
case 'center':
|
|
152
|
+
if (rect.x === endCellRect.x && rect.y === endCellRect.y) {
|
|
153
|
+
selectedCells.push(calendarCells[i]);
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'centerTop':
|
|
157
|
+
if (rect.x === endCellRect.x && rect.y >= endCellRect.y && rect.x === endCellRect.x && rect.y <= startCellRect.y) {
|
|
158
|
+
selectedCells.push(calendarCells[i]);
|
|
159
|
+
}
|
|
160
|
+
break;
|
|
161
|
+
case 'centerBottom':
|
|
162
|
+
if (rect.x === endCellRect.x && rect.y <= endCellRect.y && rect.x === endCellRect.x && rect.y >= startCellRect.y) {
|
|
163
|
+
selectedCells.push(calendarCells[i]);
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
case 'centerRight':
|
|
167
|
+
if (rect.y === endCellRect.y && rect.x <= endCellRect.x && rect.y === endCellRect.y && rect.x >= startCellRect.x) {
|
|
168
|
+
selectedCells.push(calendarCells[i]);
|
|
169
|
+
}
|
|
170
|
+
break;
|
|
171
|
+
case 'rightBottom':
|
|
172
|
+
if (rect.y >= startCellRect.y && rect.y <= endCellRect.y && rect.x >= startCellRect.x && rect.x <= endCellRect.x) {
|
|
173
|
+
selectedCells.push(calendarCells[i]);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case 'rightTop':
|
|
177
|
+
if (rect.x >= startCellRect.x && rect.x <= endCellRect.x && rect.y >= endCellRect.y && rect.y <= startCellRect.y) {
|
|
178
|
+
selectedCells.push(calendarCells[i]);
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
case 'centerLeft':
|
|
182
|
+
if (rect.y === endCellRect.y && rect.x >= endCellRect.x && rect.y === endCellRect.y && rect.x <= startCellRect.x) {
|
|
183
|
+
selectedCells.push(calendarCells[i]);
|
|
184
|
+
}
|
|
185
|
+
break;
|
|
186
|
+
case 'leftBottom':
|
|
187
|
+
if (rect.y >= startCellRect.y && rect.y <= endCellRect.y && rect.x <= startCellRect.x && rect.x >= endCellRect.x) {
|
|
188
|
+
selectedCells.push(calendarCells[i]);
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
case 'leftTop':
|
|
192
|
+
if (rect.y <= startCellRect.y && rect.y >= endCellRect.y && rect.x <= startCellRect.x && rect.x >= endCellRect.x) {
|
|
193
|
+
selectedCells.push(calendarCells[i]);
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// console.log('selectedCells', calendarCells)
|
|
200
|
+
for (var j = 0; j < selectedCells.length; j++) {
|
|
201
|
+
// rect.x >= startX && rect.x <= overX && rect.y >= startY && rect.y <= overY
|
|
202
|
+
selectedCells[j].classList.add('spec-calendar-coordinate-picker__directed-selected');
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
// 获取指定坐标的日历格子(按坐标)
|
|
206
|
+
var getCellFromCoordinates = function getCellFromCoordinates(x, y) {
|
|
207
|
+
var cell = null;
|
|
208
|
+
var cellIndex = null;
|
|
209
|
+
var cellRect = null; // 当前格子的坐标信息
|
|
210
|
+
// 遍历所有日历格子
|
|
211
|
+
for (var i = 0; i < calendarCells.length; i++) {
|
|
212
|
+
var rect = calendarCells[i].getBoundingClientRect();
|
|
213
|
+
// 判断坐标是否在日历格子的范围内
|
|
214
|
+
if (x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom) {
|
|
215
|
+
cell = calendarCells[i];
|
|
216
|
+
cellIndex = i;
|
|
217
|
+
cellRect = rect;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return {
|
|
222
|
+
cellIndex: cellIndex,
|
|
223
|
+
cell: cell,
|
|
224
|
+
cellRect: cellRect
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
// 清除框选样式
|
|
228
|
+
var clearSelection = function clearSelection() {
|
|
229
|
+
for (var i = 0; i < calendarCells.length; i++) {
|
|
230
|
+
calendarCells[i].classList.remove('spec-calendar-coordinate-picker__order-selected');
|
|
231
|
+
calendarCells[i].classList.remove('spec-calendar-coordinate-picker__directed-selected');
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
return function () {
|
|
235
|
+
document.removeEventListener('mousedown', function () {}, false);
|
|
236
|
+
document.removeEventListener('mousemove', function () {}, false);
|
|
237
|
+
document.removeEventListener('mouseup', function () {}, false);
|
|
238
|
+
};
|
|
239
|
+
}, [type]);
|
|
240
|
+
var renderPickerHeader = function renderPickerHeader(_ref) {
|
|
241
|
+
var value = _ref.value;
|
|
242
|
+
//
|
|
243
|
+
// const start = 0;
|
|
244
|
+
// const end = 12;
|
|
245
|
+
// const monthOptions = [];
|
|
246
|
+
var current = value.clone();
|
|
247
|
+
var localeData = value.localeData();
|
|
248
|
+
var months = [];
|
|
249
|
+
for (var i = 0; i < 12; i++) {
|
|
250
|
+
current.month(i);
|
|
251
|
+
months.push(localeData.monthsShort(current));
|
|
252
|
+
}
|
|
253
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
254
|
+
style: {
|
|
255
|
+
textAlign: 'right',
|
|
256
|
+
fontSize: '16px',
|
|
257
|
+
paddingRight: '10px'
|
|
258
|
+
}
|
|
259
|
+
}, months[value.month()]);
|
|
260
|
+
};
|
|
261
|
+
var monthArray = (0, _react.useMemo)(function () {
|
|
262
|
+
var months = [];
|
|
263
|
+
for (var i = 0; i < 12; i++) {
|
|
264
|
+
months.push(i + 1);
|
|
265
|
+
}
|
|
266
|
+
return months;
|
|
267
|
+
}, []);
|
|
268
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
269
|
+
className: 'spec-calendar-coordinate'
|
|
270
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
271
|
+
className: 'spec-calendar-coordinate-header'
|
|
272
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
273
|
+
className: 'spec-calendar-coordinate-header-action prev'
|
|
274
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
275
|
+
size: 'small',
|
|
276
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.LeftOutlined, null),
|
|
277
|
+
title: "".concat(yearNum - 1, "\u5E74"),
|
|
278
|
+
onClick: function onClick() {
|
|
279
|
+
return setYearNum(year - 1);
|
|
280
|
+
}
|
|
281
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
282
|
+
className: 'spec-calendar-coordinate-header-year'
|
|
283
|
+
}, year, "\u5E74"), /*#__PURE__*/_react.default.createElement("div", {
|
|
284
|
+
className: 'spec-calendar-coordinate-header-action next'
|
|
285
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
286
|
+
size: 'small',
|
|
287
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.RightOutlined, null),
|
|
288
|
+
title: "".concat(yearNum + 1, "\u5E74"),
|
|
289
|
+
onClick: function onClick() {
|
|
290
|
+
return setYearNum(year + 1);
|
|
291
|
+
}
|
|
292
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
293
|
+
className: 'spec-calendar-coordinate-picker'
|
|
294
|
+
}, monthArray.map(function (mItem) {
|
|
295
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
296
|
+
className: 'spec-calendar-coordinate-picker-col',
|
|
297
|
+
key: mItem
|
|
298
|
+
}, /*#__PURE__*/_react.default.createElement(_CalendarMonthPicker.default, {
|
|
299
|
+
month: mItem,
|
|
300
|
+
year: yearNum,
|
|
301
|
+
headerRender: renderPickerHeader
|
|
302
|
+
}));
|
|
303
|
+
})));
|
|
304
|
+
};
|
|
305
|
+
var _default = CalendarCoordPicker;
|
|
306
|
+
exports.default = _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import (reference) '~antd/es/style/themes/index';
|
|
2
|
+
.spec-calendar-coordinate-header {
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: @padding-sm @padding-md;
|
|
5
|
+
background-color: @body-background;
|
|
6
|
+
margin-bottom: @padding-sm;
|
|
7
|
+
&-year{
|
|
8
|
+
flex: 1;
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
.spec-calendar-coordinate-picker{
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.spec-calendar-coordinate-picker-col {
|
|
19
|
+
width: 25%;
|
|
20
|
+
padding: 0 10px;
|
|
21
|
+
user-select: none;
|
|
22
|
+
|
|
23
|
+
.spec-calendar-coordinate-picker__order-selected{
|
|
24
|
+
background-color: #795da3;
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.spec-calendar-coordinate-picker__directed-selected {
|
|
29
|
+
background-color: @primary-color !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -93,7 +93,7 @@ var removeNoPermission = function removeNoPermission(array, permissionCodes, cod
|
|
|
93
93
|
var _codes$matchIndex;
|
|
94
94
|
// 如果有配置code,则使用func.code.js里面配置的名称
|
|
95
95
|
resultItem = _objectSpread(_objectSpread(_objectSpread({}, resultItem), codes[matchIndex]), {}, {
|
|
96
|
-
icon: resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
|
|
96
|
+
icon: resultItem.icon === '' || resultItem.icon === null ? resultItem.icon : resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
}
|