From 2b668bd815109f94b3ffa574c59e42a5bd331389 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Wed, 21 Jun 2023 19:56:02 +0800 Subject: [PATCH 01/29] test: [table] add show-overflow-tooltip to table and table-column (#13323) --- .../components/table/__tests__/table.test.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/components/table/__tests__/table.test.ts b/packages/components/table/__tests__/table.test.ts index 0e3519c434..303cb5b6ae 100644 --- a/packages/components/table/__tests__/table.test.ts +++ b/packages/components/table/__tests__/table.test.ts @@ -1632,4 +1632,31 @@ describe('Table.vue', () => { // 5 rows and 2 columns should be 10 expect(findTooltipEl).toEqual(10) }) + + it('add show-overflow-tooltip to table and table-column', async () => { + const wrapper = mount({ + components: { + ElTable, + ElTableColumn, + }, + + template: ` + + + + + `, + + data() { + const testData = getTestData() as any + return { + testData, + } + }, + }) + + await doubleWait() + const findTooltipEl = wrapper.findAll('.el-tooltip').length + expect(findTooltipEl).toEqual(5) + }) }) From 8558957b28ab9669cb5048f9416c1ba6d57b2372 Mon Sep 17 00:00:00 2001 From: zepeng <75007029+yj-liuzepeng@users.noreply.github.com> Date: Thu, 22 Jun 2023 12:51:53 +0800 Subject: [PATCH 02/29] docs(components): [image] update image slot viewer description (#13325) --- docs/en-US/component/image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en-US/component/image.md b/docs/en-US/component/image.md index a2571102dd..ccd8e13578 100644 --- a/docs/en-US/component/image.md +++ b/docs/en-US/component/image.md @@ -93,7 +93,7 @@ image/image-preview | ----------- | -------------------------------------------------------- | | placeholder | custom placeholder content when image hasn't loaded yet. | | error | custom image load failed content. | -| viewer | description of the image. | +| viewer | custom content when image preview. | ## Image Viewer API From 06f974b311a3899bc2a642750b728ef047803728 Mon Sep 17 00:00:00 2001 From: wonderl17 <31885971+wonderl17@users.noreply.github.com> Date: Thu, 22 Jun 2023 15:55:50 +0800 Subject: [PATCH 03/29] fix: correct sass map has-key parameter (#13132) fix: correct map.has-key using --- docs/.vitepress/vitepress/styles/mixins.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/vitepress/styles/mixins.scss b/docs/.vitepress/vitepress/styles/mixins.scss index 27c85422b5..6946b2b60e 100644 --- a/docs/.vitepress/vitepress/styles/mixins.scss +++ b/docs/.vitepress/vitepress/styles/mixins.scss @@ -23,7 +23,7 @@ $breakpoints: ( ) !default; @mixin respond-to($breakpoint) { - @if #{map.has-key($breakpoints, $breakpoints)} { + @if #{map.has-key($breakpoints, $breakpoint)} { @media screen and (min-width: #{map.get($breakpoints, $breakpoint)}) { @content; } From ce547913387ffe58fc86f33d8bf6621842c1e2fd Mon Sep 17 00:00:00 2001 From: vaebe <52314078+vaebe@users.noreply.github.com> Date: Fri, 23 Jun 2023 10:23:30 +0800 Subject: [PATCH 04/29] docs(components): [dialog] add description of props modal-class (#13122) --- docs/en-US/component/dialog.md | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/docs/en-US/component/dialog.md b/docs/en-US/component/dialog.md index 8af567c556..caa4bf56a5 100644 --- a/docs/en-US/component/dialog.md +++ b/docs/en-US/component/dialog.md @@ -113,27 +113,28 @@ When using `modal` = false, please make sure that `append-to-body` was set to ** ## Attributes -| Name | Description | Type | Accepted Values | Default | -| -------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------- | --------------- | ------- | -| model-value / v-model | visibility of Dialog | boolean | — | — | -| title | title of Dialog. Can also be passed with a named slot (see the following table) | string | — | — | -| width | width of Dialog | string / number | — | 50% | -| fullscreen | whether the Dialog takes up full screen | boolean | — | false | -| top | value for `margin-top` of Dialog CSS | string | — | 15vh | -| modal | whether a mask is displayed | boolean | — | true | -| append-to-body | whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true` | boolean | — | false | -| lock-scroll | whether scroll of body is disabled while Dialog is displayed | boolean | — | true | -| custom-class ^(deprecated) | custom class names for Dialog | string | — | — | -| open-delay | Time(milliseconds) before open | number | — | 0 | -| close-delay | Time(milliseconds) before close | number | — | 0 | -| close-on-click-modal | whether the Dialog can be closed by clicking the mask | boolean | — | true | -| close-on-press-escape | whether the Dialog can be closed by pressing ESC | boolean | — | true | -| show-close | whether to show a close button | boolean | — | true | -| before-close | callback before Dialog closes, and it will prevent Dialog from closing | Function(done) (done is used to close the Dialog) | — | — | -| draggable | enable dragging feature for Dialog | boolean | — | false | -| center | whether to align the header and footer in center | boolean | — | false | -| align-center | whether to align the dialog both horizontally and vertically | boolean | — | false | -| destroy-on-close | Destroy elements in Dialog when closed | boolean | — | false | +| Name | Description | Type | Accepted Values | Default | +|----------------------------|---------------------------------------------------------------------------------------------------|--------------------------------------------------| --------------- |--------| +| model-value / v-model | visibility of Dialog | boolean | — | — | +| title | title of Dialog. Can also be passed with a named slot (see the following table) | string | — | — | +| width | width of Dialog | string / number | — | 50% | +| fullscreen | whether the Dialog takes up full screen | boolean | — | false | +| top | value for `margin-top` of Dialog CSS | string | — | 15vh | +| modal | whether a mask is displayed | boolean | — | true | +| modal-class | custom class names for mask | string | — | — | +| append-to-body | whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true` | boolean | — | false | +| lock-scroll | whether scroll of body is disabled while Dialog is displayed | boolean | — | true | +| custom-class ^(deprecated) | custom class names for Dialog | string | — | — | +| open-delay | Time(milliseconds) before open | number | — | 0 | +| close-delay | Time(milliseconds) before close | number | — | 0 | +| close-on-click-modal | whether the Dialog can be closed by clicking the mask | boolean | — | true | +| close-on-press-escape | whether the Dialog can be closed by pressing ESC | boolean | — | true | +| show-close | whether to show a close button | boolean | — | true | +| before-close | callback before Dialog closes, and it will prevent Dialog from closing | Function(done) (done is used to close the Dialog) | — | — | +| draggable | enable dragging feature for Dialog | boolean | — | false | +| center | whether to align the header and footer in center | boolean | — | false | +| align-center | whether to align the dialog both horizontally and vertically | boolean | — | false | +| destroy-on-close | Destroy elements in Dialog when closed | boolean | — | false | :::warning From c6ab1804e47da10de742af734fa71a81a5c79b3a Mon Sep 17 00:00:00 2001 From: Hefty Date: Sat, 24 Jun 2023 22:15:35 +0800 Subject: [PATCH 05/29] fix(components): [date-picker] One input affect the other input (#12181) * fix(components): [date-picker] One input affects the other input * fix: check if minDate or maxDate is empty * chore: remove debugger --- .../src/date-picker-com/panel-date-range.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/components/date-picker/src/date-picker-com/panel-date-range.vue b/packages/components/date-picker/src/date-picker-com/panel-date-range.vue index ab2f04f810..601d4b775b 100644 --- a/packages/components/date-picker/src/date-picker-com/panel-date-range.vue +++ b/packages/components/date-picker/src/date-picker-com/panel-date-range.vue @@ -543,7 +543,6 @@ const handleMaxTimeClose = () => { const handleDateInput = (value: string | null, type: ChangeType) => { dateUserInput.value[type] = value const parsedValueD = dayjs(value, dateFormat.value).locale(lang.value) - if (parsedValueD.isValid()) { if (disabledDate && disabledDate(parsedValueD.toDate())) { return @@ -554,7 +553,10 @@ const handleDateInput = (value: string | null, type: ChangeType) => { .year(parsedValueD.year()) .month(parsedValueD.month()) .date(parsedValueD.date()) - if (!props.unlinkPanels) { + if ( + !props.unlinkPanels && + (!maxDate.value || maxDate.value.isBefore(minDate.value)) + ) { rightDate.value = parsedValueD.add(1, 'month') maxDate.value = minDate.value.add(1, 'month') } @@ -564,7 +566,10 @@ const handleDateInput = (value: string | null, type: ChangeType) => { .year(parsedValueD.year()) .month(parsedValueD.month()) .date(parsedValueD.date()) - if (!props.unlinkPanels) { + if ( + !props.unlinkPanels && + (!minDate.value || minDate.value.isAfter(maxDate.value)) + ) { leftDate.value = parsedValueD.subtract(1, 'month') minDate.value = maxDate.value.subtract(1, 'month') } From 5d2bedc86721c3ca66413bc93238f83689868402 Mon Sep 17 00:00:00 2001 From: xy <1454556135@qq.com> Date: Sun, 25 Jun 2023 09:29:10 +0800 Subject: [PATCH 06/29] fix(components): [virtual-list] Resetting the vertical scrollbar state (#13319) --- packages/components/virtual-list/src/builders/build-grid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/virtual-list/src/builders/build-grid.ts b/packages/components/virtual-list/src/builders/build-grid.ts index fcbaccc1f7..9133ca1dfb 100644 --- a/packages/components/virtual-list/src/builders/build-grid.ts +++ b/packages/components/virtual-list/src/builders/build-grid.ts @@ -339,7 +339,7 @@ const createGrid = ({ }, (x: number, y: number) => { hScrollbar.value?.onMouseUp?.() - hScrollbar.value?.onMouseUp?.() + vScrollbar.value?.onMouseUp?.() const width = unref(parsedWidth) const height = unref(parsedHeight) scrollTo({ From 4e9fc0854cf8785a6daed9f1b69577a771722c07 Mon Sep 17 00:00:00 2001 From: wzc520pyfm <69044080+wzc520pyfm@users.noreply.github.com> Date: Mon, 26 Jun 2023 17:55:23 +0800 Subject: [PATCH 07/29] refactor(components): [select] override the class using computed (#13302) * refactor(components): [select] override the class using computed * refactor(components): [select] shorthand class object --- packages/components/select/src/option.vue | 22 +++--- packages/components/select/src/select.vue | 87 +++++++++++++---------- 2 files changed, 65 insertions(+), 44 deletions(-) diff --git a/packages/components/select/src/option.vue b/packages/components/select/src/option.vue index 8def3cb047..cc0758b6a7 100644 --- a/packages/components/select/src/option.vue +++ b/packages/components/select/src/option.vue @@ -1,14 +1,7 @@