chore: format (#15137)

This commit is contained in:
btea 2023-12-13 20:12:44 +08:00 committed by GitHub
parent ac6b0e74f5
commit ec34092e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 96 additions and 97 deletions

View File

@ -67,4 +67,3 @@ affix/fixed
| ---------- | --------------------------- | ----------------------- |
| update | update affix state manually | ^[Function]`() => void` |
| updateRoot | update rootRect info | ^[Function]`() => void` |

View File

@ -48,15 +48,16 @@ card/shadow
:::
## API
### Attributes
| Name | Description | Type | Default |
| -------------------- | ------------------------------------------------------------- | --------------------------------- | ------- |
| header | title of the card. Also accepts a DOM passed by `slot#header` | ^[string] | — |
| footer ^(2.4.3) | footer of the card. Also accepts a DOM passed by `slot#footer`| ^[string] | — |
| body-style | CSS style of card body | ^[object]`CSSProperties` | — |
| body-class ^(2.3.10) | custom class name of card body | ^[string] | — |
| shadow | when to show card shadows | ^[enum]`always \| never \| hover` | always |
| Name | Description | Type | Default |
| -------------------- | -------------------------------------------------------------- | --------------------------------- | ------- |
| header | title of the card. Also accepts a DOM passed by `slot#header` | ^[string] | — |
| footer ^(2.4.3) | footer of the card. Also accepts a DOM passed by `slot#footer` | ^[string] | — |
| body-style | CSS style of card body | ^[object]`CSSProperties` | — |
| body-class ^(2.3.10) | custom class name of card body | ^[string] | — |
| shadow | when to show card shadows | ^[enum]`always \| never \| hover` | always |
### Slots

View File

@ -94,8 +94,8 @@ datetime-picker/default-time
| default-value | optional, default date of the calendar | Date / [Date, Date] | | — |
| default-time | the default time value after picking a date. Time `00:00:00` will be used if not specified | Date / [Date, Date] | — | — |
| value-format | optional, format of binding value. If not specified, the binding value will be a Date object | string | see [date formats](https://day.js.org/docs/en/display/format) | — |
| date-format ^(2.4.0) | optional, format of the date displayed value in TimePicker's dropdown | string | see [date formats](https://day.js.org/docs/en/display/format) | — |
| time-format ^(2.4.0) | optional, format of the time displayed value in TimePicker's dropdown | string | see [date formats](https://day.js.org/docs/en/display/format) | — |
| date-format ^(2.4.0) | optional, format of the date displayed value in TimePicker's dropdown | string | see [date formats](https://day.js.org/docs/en/display/format) | — |
| time-format ^(2.4.0) | optional, format of the time displayed value in TimePicker's dropdown | string | see [date formats](https://day.js.org/docs/en/display/format) | — |
| id | same as `id` in native input | string / [string, string] | — | — |
| name | same as `name` in native input | string | — | — |
| unlink-panels | unlink two date-panels in range-picker | boolean | — | false |

View File

@ -64,8 +64,8 @@ descriptions/customized-style
### DescriptionsItem Attributes
| Name | Description | Type | Default |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ------- |
| Name | Description | Type | Default |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ------- |
| label | label text | ^[string] | '' |
| span | colspan of column | ^[number] | 1 |
| width | column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content) | ^[string] / ^[number] | '' |

View File

@ -170,19 +170,19 @@ form/accessibility
### FormItem Attributes
| Name | Description | Type | Default |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ------- |
| Name | Description | Type | Default |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ------- |
| prop | A key of `model`. It could be a path of the property (e.g `a.b.0` or `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required. | ^[string] / ^[string[]] | — |
| label | Label text. | ^[string] | — |
| label-width | Width of label, e.g. `'50px'`. `'auto'` is supported. | ^[string] / ^[number] | '' |
| required | Whether the field is required or not, will be determined by validation rules if omitted. | ^[boolean] | — |
| rules | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | ^[object]`Arrayable<FormItemRule>` | — |
| error | Field error message, set its value and the field will validate error and show this message immediately. | ^[string] | — |
| show-message | Whether to show the error message. | ^[boolean] | true |
| inline-message | Inline style validate message. | ^[string] / ^[boolean] | '' |
| size | Control the size of components in this form-item. | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | — |
| for | Same as for in native label. | ^[string] | — |
| validate-status | Validation state of formItem. | ^[enum]`'' \| 'error' \| 'validating' \| 'success'` | — |
| label | Label text. | ^[string] | — |
| label-width | Width of label, e.g. `'50px'`. `'auto'` is supported. | ^[string] / ^[number] | '' |
| required | Whether the field is required or not, will be determined by validation rules if omitted. | ^[boolean] | — |
| rules | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | ^[object]`Arrayable<FormItemRule>` | — |
| error | Field error message, set its value and the field will validate error and show this message immediately. | ^[string] | — |
| show-message | Whether to show the error message. | ^[boolean] | true |
| inline-message | Inline style validate message. | ^[string] / ^[boolean] | '' |
| size | Control the size of components in this form-item. | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | — |
| for | Same as for in native label. | ^[string] | — |
| validate-status | Validation state of formItem. | ^[enum]`'' \| 'error' \| 'validating' \| 'success'` | — |
#### FormItemRule

View File

@ -110,16 +110,16 @@ image/image-preview
| hide-on-click-modal | whether user can emit close event when clicking backdrop. | ^[boolean] | false |
| teleported | whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`. | ^[boolean] | false |
| zoom-rate ^(2.2.27) | the zoom rate of the image viewer zoom event. | ^[number] | 1.2 |
| min-scale ^(2.4.0) | the min scale of the image viewer zoom event. | ^[number] | 0.2 |
| max-scale ^(2.4.0) | the max scale of the image viewer zoom event. | ^[number] | 7 |
| min-scale ^(2.4.0) | the min scale of the image viewer zoom event. | ^[number] | 0.2 |
| max-scale ^(2.4.0) | the max scale of the image viewer zoom event. | ^[number] | 7 |
| close-on-press-escape | whether the image-viewer can be closed by pressing ESC. | ^[boolean] | true |
### Image Viewer Events
| Name | Description | Type |
| ------ | ------------------------------------------------------------------------------------------------- | ------------------------------------ |
| close | trigger when clicking on close button or when `hide-on-click-modal` enabled clicking on backdrop. | ^[Function]`() => void` |
| switch | trigger when switching images. | ^[Function]`(index: number) => void` |
| Name | Description | Type |
| ---------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------ |
| close | trigger when clicking on close button or when `hide-on-click-modal` enabled clicking on backdrop. | ^[Function]`() => void` |
| switch | trigger when switching images. | ^[Function]`(index: number) => void` |
| rotate ^(2.3.13) | trigger when rotating images. | ^[Function]`(deg: number) => void` |
### Image Viewer Exposes

View File

@ -204,13 +204,13 @@ select/value-key
### Select Slots
| Name | Description | Subtags |
| ------- | ------------------------------------- | --------------------- |
| default | option component list | Option Group / Option |
| header ^(2.4.3) | content at the top of the dropdown | — |
| footer ^(2.4.3) | content at the bottom of the dropdown | — |
| prefix | content as Select prefix | — |
| empty | content when there is no options | — |
| Name | Description | Subtags |
| --------------- | ------------------------------------- | --------------------- |
| default | option component list | Option Group / Option |
| header ^(2.4.3) | content at the top of the dropdown | — |
| footer ^(2.4.3) | content at the bottom of the dropdown | — |
| prefix | content as Select prefix | — |
| empty | content when there is no options | — |
### Select Exposes

View File

@ -87,7 +87,6 @@ slider/show-marks
:::
## API
### Attributes
@ -132,7 +131,7 @@ slider/show-marks
<summary>Show declarations</summary>
```ts
type SliderMarks = Record<number, string | { style: CSSProperties, label: any }>
type SliderMarks = Record<number, string | { style: CSSProperties; label: any }>
type Arrayable<T> = T | T[]
```

View File

@ -34,6 +34,6 @@ typography/line-height
## Font-family
```css
font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
```

View File

@ -93,33 +93,33 @@ upload/manual
### Attributes
| Name | Description | Type | Default |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| action ^(required) | request URL. | ^[string] | # |
| headers | request headers. | ^[object]`Headers \| Record<string, any>` | — |
| method | set upload request method. | ^[string] | post |
| multiple | whether uploading multiple files is permitted. | ^[boolean] | false |
| Name | Description | Type | Default |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| action ^(required) | request URL. | ^[string] | # |
| headers | request headers. | ^[object]`Headers \| Record<string, any>` | — |
| method | set upload request method. | ^[string] | post |
| multiple | whether uploading multiple files is permitted. | ^[boolean] | false |
| data | additions options of request. support `Awaitable` data and `Function` since v2.3.13. | ^[object]`Record<string, any> \| Awaitable<Record<string, any>>` / ^[Function]`(rawFile: UploadRawFile) => Awaitable<Record<string, any>>` | {} |
| name | key name for uploaded file. | ^[string] | file |
| with-credentials | whether cookies are sent. | ^[boolean] | false |
| show-file-list | whether to show the uploaded file list. | ^[boolean] | true |
| drag | whether to activate drag and drop mode. | ^[boolean] | false |
| accept | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`. | ^[string] | '' |
| on-preview | hook function when clicking the uploaded files. | ^[Function]`(uploadFile: UploadFile) => void` | — |
| on-remove | hook function when files are removed. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-success | hook function when uploaded successfully. | ^[Function]`(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-error | hook function when some errors occurs. | ^[Function]`(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-progress | hook function when some progress occurs. | ^[Function]`(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-change | hook function when select file or upload file success or upload file fail. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-exceed | hook function when limit is exceeded. | ^[Function]`(files: File[], uploadFiles: UploadUserFile[]) => void` | — |
| before-upload | hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted. | ^[Function]`(rawFile: UploadRawFile) => Awaitable<void \| undefined \| null \| boolean \| File \| Blob>` | — |
| before-remove | hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>` | — |
| file-list / v-model:file-list | default uploaded files. | ^[object]`UploadUserFile[]` | [] |
| list-type | type of file list. | ^[enum]`'text' \| 'picture' \| 'picture-card'` | text |
| auto-upload | whether to auto upload file. | ^[boolean] | true |
| http-request | override default xhr behavior, allowing you to implement your own upload-file's request. | ^[Function]`(options: UploadRequestOptions) => XMLHttpRequest \| Promise<unknown>` | ajaxUpload [see](https://github.com/element-plus/element-plus/blob/dev/packages/components/upload/src/ajax.ts#L55) |
| disabled | whether to disable upload. | ^[boolean] | false |
| limit | maximum number of uploads allowed. | ^[number] | — |
| name | key name for uploaded file. | ^[string] | file |
| with-credentials | whether cookies are sent. | ^[boolean] | false |
| show-file-list | whether to show the uploaded file list. | ^[boolean] | true |
| drag | whether to activate drag and drop mode. | ^[boolean] | false |
| accept | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`. | ^[string] | '' |
| on-preview | hook function when clicking the uploaded files. | ^[Function]`(uploadFile: UploadFile) => void` | — |
| on-remove | hook function when files are removed. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-success | hook function when uploaded successfully. | ^[Function]`(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-error | hook function when some errors occurs. | ^[Function]`(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-progress | hook function when some progress occurs. | ^[Function]`(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-change | hook function when select file or upload file success or upload file fail. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => void` | — |
| on-exceed | hook function when limit is exceeded. | ^[Function]`(files: File[], uploadFiles: UploadUserFile[]) => void` | — |
| before-upload | hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted. | ^[Function]`(rawFile: UploadRawFile) => Awaitable<void \| undefined \| null \| boolean \| File \| Blob>` | — |
| before-remove | hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted. | ^[Function]`(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>` | — |
| file-list / v-model:file-list | default uploaded files. | ^[object]`UploadUserFile[]` | [] |
| list-type | type of file list. | ^[enum]`'text' \| 'picture' \| 'picture-card'` | text |
| auto-upload | whether to auto upload file. | ^[boolean] | true |
| http-request | override default xhr behavior, allowing you to implement your own upload-file's request. | ^[Function]`(options: UploadRequestOptions) => XMLHttpRequest \| Promise<unknown>` | ajaxUpload [see](https://github.com/element-plus/element-plus/blob/dev/packages/components/upload/src/ajax.ts#L55) |
| disabled | whether to disable upload. | ^[boolean] | false |
| limit | maximum number of uploads allowed. | ^[number] | — |
### Slots
@ -132,13 +132,13 @@ upload/manual
### Exposes
| Name | Description | Type |
| ------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| abort | cancel upload request. | ^[Function]`(file: UploadFile) => void` |
| submit | upload the file list manually. | ^[Function]`() => void` |
| clearFiles | clear the file list (this method is not supported in the `before-upload` hook). | ^[Function]`(status?: UploadStatus[]) => void` |
| handleStart | select the file manually. | ^[Function]`(rawFile: UploadRawFile) => void` |
| handleRemove | remove the file manually. `file` and `rawFile` has been merged. `rawFile` will be removed in `v2.2.0`. | ^[Function]`(file: UploadFile \| UploadRawFile, rawFile?: UploadRawFile) => void` |
| Name | Description | Type |
| ------------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| abort | cancel upload request. | ^[Function]`(file: UploadFile) => void` |
| submit | upload the file list manually. | ^[Function]`() => void` |
| clearFiles | clear the file list (this method is not supported in the `before-upload` hook). | ^[Function]`(status?: UploadStatus[]) => void` |
| handleStart | select the file manually. | ^[Function]`(rawFile: UploadRawFile) => void` |
| handleRemove | remove the file manually. `file` and `rawFile` has been merged. `rawFile` will be removed in `v2.2.0`. | ^[Function]`(file: UploadFile \| UploadRawFile, rawFile?: UploadRawFile) => void` |
## Type Declarations
@ -146,7 +146,6 @@ upload/manual
<summary>Show declarations</summary>
```ts
type UploadFiles = UploadFile[]
type UploadUserFile = Omit<UploadFile, 'status' | 'uid'> &

View File

@ -51,17 +51,17 @@ watermark/custom
### Attributes
| Name | Description | Type | Default |
| ------- | ----------------------------------------------------------------------------------------------- | -------------------------------- | -------------------------- |
| width | The width of the watermark, the default value of `content` is its own width | ^[number] | 120 |
| height | The height of the watermark, the default value of `content` is its own height | ^[number] | 64 |
| rotate | When the watermark is drawn, the rotation Angle, unit `°` | ^[number] | -22 |
| zIndex | The z-index of the appended watermark element | ^[number] | 9 |
| image | Image source, it is recommended to export 2x or 3x image, high priority | ^[string] | - |
| Name | Description | Type | Default |
| ------- | ----------------------------------------------------------------------------------------------- | ----------------------------- | -------------------------- |
| width | The width of the watermark, the default value of `content` is its own width | ^[number] | 120 |
| height | The height of the watermark, the default value of `content` is its own height | ^[number] | 64 |
| rotate | When the watermark is drawn, the rotation Angle, unit `°` | ^[number] | -22 |
| zIndex | The z-index of the appended watermark element | ^[number] | 9 |
| image | Image source, it is recommended to export 2x or 3x image, high priority | ^[string] | - |
| content | Watermark text content | ^[string]/^[object]`string[]` | - |
| font | Text style | [Font](#font) | [Font](#font) |
| gap | The spacing between watermarks | ^[object]`[number, number]` | \[100, 100\] |
| offset | The offset of the watermark from the upper left corner of the container. The default is `gap/2` | ^[object]`[number, number]` | \[gap\[0\]/2, gap\[1\]/2\] |
| font | Text style | [Font](#font) | [Font](#font) |
| gap | The spacing between watermarks | ^[object]`[number, number]` | \[100, 100\] |
| offset | The offset of the watermark from the upper left corner of the container. The default is `gap/2` | ^[object]`[number, number]` | \[gap\[0\]/2, gap\[1\]/2\] |
### Font

View File

@ -35,11 +35,11 @@
@include e(body) {
padding: getCssVar('card', 'padding');
}
@include e(footer) {
padding: calc(#{getCssVar('card', 'padding')} - 2px)
getCssVar('card', 'padding');
border-top: 1px solid getCssVar('card', 'border-color');
box-sizing: border-box;
box-sizing: border-box;
}
}

View File

@ -778,7 +778,7 @@ $table: map.merge(
'expanded-cell-bg-color': getCssVar('fill-color', 'blank'),
'fixed-left-column': inset 10px 0 10px -10px rgb(0 0 0 / 15%),
'fixed-right-column': inset -10px 0 10px -10px rgb(0 0 0 / 15%),
'index': getCssVar('index-normal')
'index': getCssVar('index-normal'),
),
$table
);

View File

@ -240,13 +240,13 @@ $form-item-label-top-margin-bottom: map.merge(
}
.#{$namespace}-select {
&:hover{
box-shadow: 0 0 0 1px transparent;
}
&:hover {
box-shadow: 0 0 0 1px transparent;
}
.#{$namespace}-input{
.#{$namespace}-input {
.#{$namespace}-input__wrapper {
&:hover{
&:hover {
box-shadow: 0 0 0 1px getCssVar('color-danger') inset;
}
}
@ -259,7 +259,6 @@ $form-item-label-top-margin-bottom: map.merge(
}
}
.#{$namespace}-input-group__append,
.#{$namespace}-input-group__prepend {
.#{$namespace}-input__wrapper {

View File

@ -2,8 +2,8 @@
@use 'mixins/mixins' as *;
body {
font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
font-family: Inter, 'Helvetica Neue', Helvetica, 'PingFang SC',
'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
font-weight: 400;
font-size: getCssVar('font-size', 'base');
color: getCssVar('text-color', 'primary');
@ -12,7 +12,9 @@ body {
-webkit-tap-highlight-color: transparent;
}
input, textarea, button {
input,
textarea,
button {
font-family: inherit;
}