@giteeteam/apps-team-components 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @giteeteam/components
1
+ # @giteeteam/apps-team-components
2
2
 
3
3
  - gitee team components
@@ -19,15 +19,17 @@ const UserGroupReadView = props => {
19
19
  var _a, _b;
20
20
  let showValue = null;
21
21
  if (mode === 'multiple') {
22
- if (Array.isArray(options) && options.length >= 1 && value && Array.isArray(value)) {
22
+ if (value && Array.isArray(value)) {
23
23
  showValue = value.reduce((showValue, val) => {
24
- const opt = options.filter(item => item.value === handleValue(val));
25
- if (opt.length) {
24
+ var _a;
25
+ const opt = options === null || options === void 0 ? void 0 : options.filter(item => item.value === handleValue(val));
26
+ const showLabel = ((_a = opt === null || opt === void 0 ? void 0 : opt[0]) === null || _a === void 0 ? void 0 : _a.label) || (val === null || val === void 0 ? void 0 : val.label);
27
+ if (showLabel) {
26
28
  if (showValue) {
27
- return showValue + ',' + opt[0].label;
29
+ return showValue + ',' + showLabel;
28
30
  }
29
31
  else {
30
- return showValue + opt[0].label;
32
+ return showValue + showLabel;
31
33
  }
32
34
  }
33
35
  return '';
@@ -9,9 +9,7 @@ export declare const getStartOfWeekUnix: (date: DateValue) => number;
9
9
  export declare const getEndOfWeekUnix: (date: DateValue) => number;
10
10
  export declare const getStartOfMonthUnix: (date: DateValue) => number;
11
11
  export declare const getEndOfMonthUnix: (date: DateValue) => number;
12
- export declare const getStartOfYearUnix: (date: DateValue) => number;
13
12
  export declare const getFormat: (date: DateValue, format: string) => string;
14
- export declare const chineseDateTimeFormat: Intl.DateTimeFormat;
15
13
  export declare enum DateTypeEnum {
16
14
  dateTime = "second",
17
15
  date = "date",
package/dist/lib/date.js CHANGED
@@ -42,21 +42,9 @@ export const getStartOfMonthUnix = (date) => {
42
42
  export const getEndOfMonthUnix = (date) => {
43
43
  return dayjs(date).endOf('month').valueOf();
44
44
  };
45
- export const getStartOfYearUnix = (date) => {
46
- return dayjs(date).startOf('year').valueOf();
47
- };
48
45
  export const getFormat = (date, format) => {
49
46
  return dayjs(date).format(format);
50
47
  };
51
- export const chineseDateTimeFormat = new Intl.DateTimeFormat('zh-CN', {
52
- hour12: false,
53
- year: 'numeric',
54
- month: 'numeric',
55
- day: 'numeric',
56
- hour: 'numeric',
57
- minute: 'numeric',
58
- second: 'numeric',
59
- });
60
48
  export var DateTypeEnum;
61
49
  (function (DateTypeEnum) {
62
50
  DateTypeEnum["dateTime"] = "second";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",