diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 5fecef3484de87..ce55b58e0cb6fe 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,4 +1,38 @@ ## Changelog + +### 2.8.2 + +_2024-09-06_ + +#### Features + +- Components [check-tag] add disabled prop (#17936 by @HaceraI) +- Components [config-provider] support more message config (#18106 by @btea) + +#### Bug fixes + +- The disabled state should not trigger focus (#18012 by @btea) +- Components [pagination] global size dynamic modification error (#18004 by @btea) +- Components [table] getColumnIndex may be undefned (#16782 by @406087475) +- Components [tag] leave animations not working (#18006 by @makedopamine) +- Components [select] switching single/multiple generates an error (#18030 by @tolking) +- The disabled state should not trigger focus (#18108 by @btea) +- Components [el-tree-select] fix lazy and multiple select node (#17903 by @gaoxuan-haxibiao) +- Theme-chalk [select] remove unnecessary codes of the select border (#18116 by @LoTwT) +- Components [select] call the exposes blur is invalid (#17691 by @tolking) +- Components [mention] replace props.disabled with useFormDisabled (#18119 by @tolking) +- Components [tree-v2] expand all ancestor nodes of the specified node (#18077 by @dadaguai-git) +- Theme-chalk [select] box-shadow noise (#18120 by @HaceraI) +- Hooks PopperContainer cannot be recreated when body is recreated (#18121 by @kimverchan) +- Components [calendar] improve range validation (#18125 by @btea) +- Components [table-v2] columns missing key field (#17891 by @betavs) +- Components [tabs] active-bar not move with the tab label changes (#18165 by @btea) +- Components [message] max affects grouping display (#18189 by @dadaguai-git) +- Components [table-v2] header checkbox cover fixedHeader when scroll (#18179 by @kimverchan) + +#### Refactors + +- Import shared utilities from @element-plus/utils (#18048 by @makedopamine) ### 2.8.1 diff --git a/docs/.vitepress/config/plugins.ts b/docs/.vitepress/config/plugins.ts index 10ab965152ae2e..60ecf4a1757198 100644 --- a/docs/.vitepress/config/plugins.ts +++ b/docs/.vitepress/config/plugins.ts @@ -6,9 +6,9 @@ import tag from '../plugins/tag' import headers from '../plugins/headers' import createDemoContainer from '../plugins/demo' import { ApiTableContainer } from '../plugins/api-table' -import type MarkdownIt from 'markdown-it' +import type { MarkdownRenderer } from 'vitepress' -export const mdPlugin = (md: MarkdownIt) => { +export const mdPlugin = (md: MarkdownRenderer) => { md.use(headers) md.use(externalLinkIcon) md.use(tableWrapper) diff --git a/docs/.vitepress/plugins/api-table.ts b/docs/.vitepress/plugins/api-table.ts index d9ff7b526bce9d..d677ba9ea0343e 100644 --- a/docs/.vitepress/plugins/api-table.ts +++ b/docs/.vitepress/plugins/api-table.ts @@ -1,6 +1,5 @@ -import type MarkdownIt from 'markdown-it' - -export const ApiTableContainer = (md: MarkdownIt) => { +import type { MarkdownRenderer } from 'vitepress' +export const ApiTableContainer = (md: MarkdownRenderer) => { const fence = md.renderer.rules.fence! md.renderer.rules.fence = (...args) => { diff --git a/docs/.vitepress/plugins/demo.ts b/docs/.vitepress/plugins/demo.ts index d465f6bfecbb13..1f94719f04e97e 100644 --- a/docs/.vitepress/plugins/demo.ts +++ b/docs/.vitepress/plugins/demo.ts @@ -1,23 +1,14 @@ import path from 'path' import fs from 'fs' import { docRoot } from '@element-plus/build-utils' -import type MarkdownIt from 'markdown-it' -import type Token from 'markdown-it/lib/token' -import type Renderer from 'markdown-it/lib/renderer' +import type { MarkdownRenderer } from 'vitepress' interface ContainerOpts { marker?: string | undefined validate?(params: string): boolean - render?( - tokens: Token[], - index: number, - options: any, - env: any, - self: Renderer - ): string + render?: MarkdownRenderer['renderer']['rules']['container'] } - -function createDemoContainer(md: MarkdownIt): ContainerOpts { +function createDemoContainer(md: MarkdownRenderer): ContainerOpts { return { validate(params) { return !!params.trim().match(/^demo\s*(.*)$/) diff --git a/docs/.vitepress/plugins/external-link-icon.ts b/docs/.vitepress/plugins/external-link-icon.ts index 1a8d4d90ca214e..b00cd01eb575c0 100644 --- a/docs/.vitepress/plugins/external-link-icon.ts +++ b/docs/.vitepress/plugins/external-link-icon.ts @@ -1,8 +1,11 @@ -import type MarkdownIt from 'markdown-it' -import type Renderer from 'markdown-it/lib/renderer' +import type { MarkdownRenderer } from 'vitepress' -export default (md: MarkdownIt): void => { - const renderToken: Renderer.RenderRule = (tokens, idx, options, env, self) => +type RenderRule = Exclude< + MarkdownRenderer['renderer']['rules']['container'], + undefined +> +export default (md: MarkdownRenderer): void => { + const renderToken: RenderRule = (tokens, idx, options, env, self) => self.renderToken(tokens, idx, options) const defaultLinkOpenRenderer = md.renderer.rules.link_open || renderToken const defaultLinkCloseRenderer = md.renderer.rules.link_close || renderToken diff --git a/docs/.vitepress/plugins/headers.ts b/docs/.vitepress/plugins/headers.ts index 49239a61b5f2b7..cc46e4ef3753e7 100644 --- a/docs/.vitepress/plugins/headers.ts +++ b/docs/.vitepress/plugins/headers.ts @@ -1,12 +1,12 @@ import { resolveHeadersFromTokens, slugify } from '@mdit-vue/shared' -import type MarkdownIt from 'markdown-it' +import type { MarkdownRenderer } from 'vitepress' /** * Get markdown headers info * * Extract them into env */ -export default (md: MarkdownIt): void => { +export default (md: MarkdownRenderer): void => { // extract headers to env const render = md.renderer.render.bind(md.renderer) diff --git a/docs/.vitepress/plugins/table-wrapper.ts b/docs/.vitepress/plugins/table-wrapper.ts index 24e467aebbd91a..200f3cec408c28 100644 --- a/docs/.vitepress/plugins/table-wrapper.ts +++ b/docs/.vitepress/plugins/table-wrapper.ts @@ -1,6 +1,6 @@ -import type MarkdownIt from 'markdown-it' +import type { MarkdownRenderer } from 'vitepress' -export default (md: MarkdownIt): void => { +export default (md: MarkdownRenderer): void => { md.renderer.rules.table_open = () => '
' md.renderer.rules.table_close = () => '
' } diff --git a/docs/.vitepress/plugins/tag.ts b/docs/.vitepress/plugins/tag.ts index 881ddc51070459..ccacaf94b0189e 100644 --- a/docs/.vitepress/plugins/tag.ts +++ b/docs/.vitepress/plugins/tag.ts @@ -1,6 +1,6 @@ -import type MarkdownIt from 'markdown-it' +import type { MarkdownRenderer } from 'vitepress' -export default (md: MarkdownIt): void => { +export default (md: MarkdownRenderer): void => { md.inline.ruler.before('emphasis', 'tag', (state, silent) => { const tagRegExp = /^\^\(([^)]*)\)/ const str = state.src.slice(state.pos, state.posMax) diff --git a/docs/.vitepress/plugins/tooltip.ts b/docs/.vitepress/plugins/tooltip.ts index 71c7b5b0b663b0..f6224d4af3bca6 100644 --- a/docs/.vitepress/plugins/tooltip.ts +++ b/docs/.vitepress/plugins/tooltip.ts @@ -1,6 +1,6 @@ -import type MarkdownIt from 'markdown-it' +import type { MarkdownRenderer } from 'vitepress' -export default (md: MarkdownIt): void => { +export default (md: MarkdownRenderer): void => { md.renderer.rules.tooltip = (tokens, idx) => { const token = tokens[idx] diff --git a/docs/.vitepress/vitepress/components/navbar/vp-translation.vue b/docs/.vitepress/vitepress/components/navbar/vp-translation.vue index 517da2cb8d96bc..0e226153cffe8e 100644 --- a/docs/.vitepress/vitepress/components/navbar/vp-translation.vue +++ b/docs/.vitepress/vitepress/components/navbar/vp-translation.vue @@ -39,10 +39,12 @@ const toTranslation = () => {