diff --git a/.nvmrc b/.nvmrc index 6f7f377bf5148..3f430af82b3df 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16 +v18 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 42c4e8a6c67bb..fc61b81e0b176 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,7 +3,7 @@ "vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", - "antfu.vite", + "antfu.unocss", "lokalise.i18n-ally" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 79b43c476d3ec..098ed37c7340d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,9 @@ "cSpell.words": ["Element Plus", "element-plus"], "typescript.tsdk": "node_modules/typescript/lib", "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, "npm.packageManager": "pnpm", "eslint.probe": [ "javascript", diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 6fbd3a24c4090..79b913ce9ba6d 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,4 +1,44 @@ ## Changelog + +### 2.7.2 + +_2024-04-26_ + +#### Features + +- Hooks add use-aria hooks (#16598 by @kooriookami) +- Components [color-picker] add `teleported` prop (#16634 by @zhixiaotong) +- Components [form] add validate callback promise type (#16652 by @warmthsea) + +#### Bug fixes + +- 🐛 update autocomplete default width (#16633 by @xxholly32) +- Components [select] group error when custom option component (#16621 by @Liao-js) +- Components [table] return type of function summary-method supports VNode (#16648 by @FrontEndDog) +- Test-utils fix main export error (#16504 by @wzc520pyfm) +- Components Add missing export (#16323 by @zzh948498) +- Components [table-v2] fix scrolling fail (#16470 by @Tsong-LC) +- Components [select] `isDisabled` is not fresh (#16419 by @makedopamine) +- Components [progress] bar background support gradient (#16666 by @btea) +- Components [select-v2] custom options init error in multiple (#16664 by @Liao-js) + +### 2.7.1 + +_2024-04-20_ + +#### Features + +- Components [badge] Add badge-style and badge-class (#16585 by @kooriookami) + +#### Bug fixes + +- Hooks [empty-values] warning on modifying computead value (#16508 by @btea) +- Components [input-number] fix binding wheel event warning (#16495 by @Canroc) +- Components [table] fix cell tooltip display error (#16449 by @electroluxcode) +- Components [table] hover style error (#16517 by @dowinweb) +- Components [table] fix grouping head when dynamic column (#16433 by @Liao-js) +- Components [select-v2] fix has existing option when allow create (#16590 by @Liao-js) +- Components [table] table body rerendered when use row-key (#16544 by @Liao-js) ### 2.7.0 diff --git a/README.md b/README.md index d7282b77f8099..0fcd948dc89d1 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Alright, for you to get started if you are looking for making Element Plus better you should keep reading. For developers that uses Element Plus to develop your website you should go ahead visit [Getting Started](https://element-plus.org/). -- 中国大陆[加速镜像站点](https://element-plus.gitee.io/) +- 中国大陆[加速镜像站点](https://cn.element-plus.org/zh-CN/) ## Breaking change list @@ -67,8 +67,8 @@ You can also try Element Plus out with the components built-in playground. - - + + @@ -78,12 +78,12 @@ You can also try Element Plus out with the components built-in playground. - + - + @@ -96,10 +96,15 @@ You can also try Element Plus out with the components built-in playground. - + + + + + + diff --git a/docs/.vitepress/config/head.ts b/docs/.vitepress/config/head.ts index 9864ba916a702..0d8fd0dedf297 100644 --- a/docs/.vitepress/config/head.ts +++ b/docs/.vitepress/config/head.ts @@ -116,18 +116,6 @@ gtag('config', 'UA-175337989-1');`, gtag('config', 'G-M74ZHEQ1M1'); `, ], - [ - 'script', - {}, - `(function(h,o,t,j,a,r){ - h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; - h._hjSettings={hjid:2894908,hjsv:6}; - a=o.getElementsByTagName('head')[0]; - r=o.createElement('script');r.async=1; - r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; - a.appendChild(r); - })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`, - ], [ 'script', { diff --git a/docs/.vitepress/config/sponsors.ts b/docs/.vitepress/config/sponsors.ts index 7140175b401bd..d48f2e97ed119 100644 --- a/docs/.vitepress/config/sponsors.ts +++ b/docs/.vitepress/config/sponsors.ts @@ -17,10 +17,18 @@ export const rightLogoSmallSponsors = [ name: 'BuildAdmin', img: '/images/sponsors/buildadmin.png', imgL: '/images/sponsors/buildadmin-l.png', - url: 'https://wonderful-code.gitee.io/?from=element-plus', + url: 'https://doc.buildadmin.com/?from=element-plus', slogan: 'Vue3 opensource admin system', slogan_cn: 'Vue3企业级开源后台管理系统', }, + { + name: 'Fantastic-admin', + img: '/images/sponsors/fantastic-admin.png', + imgL: '/images/sponsors/fantastic-admin-l.png', + url: 'https://fantastic-admin.github.io/', + slogan: 'Out-of-the-box Vue3 management system framework', + slogan_cn: '一款开箱即用的 Vue3 中后台管理系统框架', + }, { name: 'bit', img: '/images/bit.svg', @@ -33,13 +41,12 @@ export const rightLogoSmallSponsors = [ export const leftCustomImgSponsors = [ { - name: 'JSDesign', - name_cn: '即时设计', - img: '/images/js-design.png', - url: 'https://js.design/?source=element-plus&plan=sy', - slogan: 'Professional online UI design tool', - slogan_cn: '专业在线UI设计工具', - banner_img: '/images/js-design-banner.jpg', + name: '美乐', + img: '/images/sponsors/mele.png', + url: 'https://melecode.com/', + slogan: 'Enterprise-level low-code development platform', + slogan_cn: '企业级全栈低代码开发平台', + banner_img: '/images/sponsors/mele-banner.png', }, { name: 'VForm', diff --git a/docs/.vitepress/crowdin/en-US/pages/resource.json b/docs/.vitepress/crowdin/en-US/pages/resource.json index 96021b4adb21e..d89eb9fca66c1 100644 --- a/docs/.vitepress/crowdin/en-US/pages/resource.json +++ b/docs/.vitepress/crowdin/en-US/pages/resource.json @@ -12,5 +12,7 @@ "figmaVariables": "Figma Variables", "figmaVariablesIntro": "Components all use variables to quickly switch between dark and light modes.", "figma2023": "2023 Figma UI Kit", - "figma2023Intro": "Components designed using Figma's latest variable configuration provide Light/Dark/Dark Alpha theme switching to help you quickly build interface designs." + "figma2023Intro": "Components designed using Figma's latest variable configuration provide Light/Dark/Dark Alpha theme switching to help you quickly build interface designs.", + "masterGo2024": "2024 MasterGo UI Kit", + "masterGo2024Intro": "MasterGo component library with optimized adaptive layouts, more complete component states, and variant switching." } diff --git a/docs/.vitepress/vitepress/components/globals/icons.vue b/docs/.vitepress/vitepress/components/globals/icons.vue index 4ad30754bbdcc..fa98143a0ca2f 100644 --- a/docs/.vitepress/vitepress/components/globals/icons.vue +++ b/docs/.vitepress/vitepress/components/globals/icons.vue @@ -16,6 +16,7 @@ type CategoriesItem = { const lang = useLang() const locale = computed(() => localeData[lang.value]) const copyIcon = ref(true) +const query = ref('') const copyContent = async (content) => { try { @@ -39,7 +40,10 @@ const copySvgIcon = async (name, refs) => { if (copyIcon.value) { await copyContent(`<${name} />`) } else { - const content = refs[name]?.[0].querySelector('svg')?.outerHTML ?? '' + let content = refs[name]?.[0].querySelector('svg')?.outerHTML ?? '' + if (content) { + content = content.replace(/data-v-\w+=""/, '') + } await copyContent(content) } } @@ -63,6 +67,17 @@ IconCategories.categories.forEach((o) => { }) categories.value.push({ name: 'Other', icons: Array.from(iconMap.values()) }) + +const filterCategories = computed(() => { + return categories.value + .map((category) => { + const icons = category.icons.filter((icon) => { + return icon.name.toLowerCase().includes(query.value.toLowerCase()) + }) + return { ...category, icons } + }) + .filter((category) => category.icons.length) +})