@nutui/nutui-react 2.6.19 → 2.6.21

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.
@@ -5,42 +5,42 @@ export interface SearchBarProps extends BasicComponent {
5
5
  * 当前输入的值
6
6
  * @default -
7
7
  */
8
- value?: number | string;
8
+ value?: number | string
9
9
  /**
10
10
  * 输入框默认暗纹
11
11
  * @default 请输入
12
12
  */
13
- placeholder?: string;
13
+ placeholder?: string
14
14
  /**
15
15
  * 搜索框形状,可选值为 round
16
16
  * @default square
17
17
  */
18
- shape?: 'square' | 'round';
18
+ shape?: 'square' | 'round'
19
19
  /**
20
20
  * 是否禁用输入框
21
21
  * @default false
22
22
  */
23
- disabled?: boolean;
23
+ disabled?: boolean
24
24
  /**
25
25
  * 最大输入长度
26
26
  * @default 9999
27
27
  */
28
- maxLength?: number;
28
+ maxLength?: number
29
29
  /**
30
30
  * 是否展示清除按钮
31
31
  * @default true
32
32
  */
33
- clearable?: boolean;
33
+ clearable?: boolean
34
34
  /**
35
35
  * 输入框只读
36
36
  * @default false
37
37
  */
38
- readOnly?: boolean;
38
+ readOnly?: boolean
39
39
  /**
40
40
  * 是否自动聚焦
41
41
  * @default false
42
42
  */
43
- autoFocus?: boolean;
43
+ autoFocus?: boolean
44
44
  /**
45
45
  * 是否展示返回按钮
46
46
  * @default false
@@ -70,31 +70,31 @@ export interface SearchBarProps extends BasicComponent {
70
70
  * 确定搜索时触发
71
71
  * @default -
72
72
  */
73
- onSearch?: (val: string) => void;
73
+ onSearch?: (val: string) => void
74
74
  /**
75
75
  * 输入内容时触发
76
76
  * @default -
77
77
  */
78
- onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void;
78
+ onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void
79
79
  /**
80
80
  * 聚焦时触发
81
81
  * @default -
82
82
  */
83
- onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
83
+ onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void
84
84
  /**
85
85
  * 失焦时触发
86
86
  * @default -
87
87
  */
88
- onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
88
+ onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void
89
89
  /**
90
90
  * 点击清空时触发
91
91
  * @default -
92
92
  */
93
- onClear?: (event: MouseEvent<HTMLDivElement>) => void;
93
+ onClear?: (event: MouseEvent<HTMLDivElement>) => void
94
94
  /**
95
95
  * 点击输入区域时触发
96
96
  * @default -
97
97
  */
98
- onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
98
+ onInputClick?: (event: MouseEvent<HTMLInputElement>) => void
99
99
  }
100
100
  export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
@@ -1,38 +1,24 @@
1
1
  import { default as React, FunctionComponent, ChangeEvent, FocusEvent, MouseEvent } from 'react';
2
2
  import { BasicComponent } from '../../utils/typings';
3
3
  export interface SearchBarProps extends BasicComponent {
4
- /** 文本值 */
5
4
  value?: number | string;
6
- /** 输入框占位提示文字 */
7
5
  placeholder?: string;
8
- /** 搜索框形状,可选值为 round */
9
6
  shape?: 'square' | 'round';
10
- /** 是否禁用输入框 */
11
7
  disabled?: boolean;
12
- /** 最大输入长度 */
13
8
  maxLength?: number;
14
- /** 是否启用清除图标,点击清除图标后会清空输入框 */
15
9
  clearable?: boolean;
16
- /** 是否将输入框设为只读状态,只读状态下无法输入内容 */
17
10
  readOnly?: boolean;
18
- /** 是否自动聚焦,iOS 系统不支持该属性 */
19
11
  autoFocus?: boolean;
20
12
  backable: boolean;
21
13
  left: React.ReactNode;
22
14
  right: React.ReactNode;
23
15
  leftIn: React.ReactNode;
24
16
  rightIn: React.ReactNode;
25
- /** 确定搜索时触发 */
26
17
  onSearch?: (val: string) => void;
27
- /** 输入框内容变化时触发 */
28
18
  onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void;
29
- /** 输入框获得焦点时触发 */
30
19
  onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
31
- /** 输入框失去焦点时触发 */
32
20
  onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
33
- /** 点击清除按钮后触发 */
34
21
  onClear?: (event: MouseEvent<HTMLDivElement>) => void;
35
- /** 点击输入区域时触发 */
36
22
  onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
37
23
  }
38
24
  export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
@@ -44,6 +44,11 @@ export interface UploaderProps extends BasicComponent {
44
44
  */
45
45
  uploadIcon?: React.ReactNode
46
46
  /**
47
+ * 删除区域的图标名称
48
+ * @default -
49
+ */
50
+ deleteIcon?: React.ReactNode
51
+ /**
47
52
  * 上传区域图片下方文字
48
53
  * @default -
49
54
  */
@@ -3,21 +3,18 @@ import { default as Taro } from '@tarojs/taro';
3
3
  import { UploadOptions } from './upload';
4
4
  import { BasicComponent } from '../../utils/typings';
5
5
  import { FileItem } from './file-item';
6
- /** 图片的尺寸 */
7
6
  interface sizeType {
8
7
  /** 原图 */
9
8
  original: string;
10
9
  /** compressed */
11
10
  compressed: string;
12
11
  }
13
- /** 图片的来源 */
14
12
  interface sourceType {
15
13
  /** 从相册选图 */
16
14
  album: string;
17
15
  /** 使用相机 */
18
16
  camera: string;
19
17
  }
20
- /** 视频的来源 */
21
18
  interface mediaType {
22
19
  /** 只能拍摄图片或从相册选择图片 */
23
20
  image: string;
@@ -37,6 +34,7 @@ export interface UploaderProps extends BasicComponent {
37
34
  previewType: 'picture' | 'list';
38
35
  fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
39
36
  uploadIcon?: React.ReactNode;
37
+ deleteIcon?: React.ReactNode;
40
38
  uploadLabel?: React.ReactNode;
41
39
  name: string;
42
40
  accept: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.6.19",
3
+ "version": "2.6.21",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "lint-staged": {
50
50
  "*.{scss,md}": "prettier --write",
51
- "*.{ts,tsx,js,md}": "eslint"
51
+ "*.{ts,tsx,js}": "eslint"
52
52
  },
53
53
  "dependencies": {
54
54
  "@babel/runtime": "^7.23.9",