element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

fix(components): [descriptions] allow wrapping description-item

Open makedopamine opened this issue 6 months ago โ€ข 4 comments

fix #18452

makedopamine avatar Jun 08 '25 15:06 makedopamine

github-actions[bot] avatar Jun 08 '25 15:06 github-actions[bot]

Open in StackBlitz

npm i https://pkg.pr.new/element-plus/element-plus@20961

commit: 2e34a79

pkg-pr-new[bot] avatar Jun 08 '25 15:06 pkg-pr-new[bot]

Size Change: +673 B (+0.05%)

Total Size: 1.47 MB

Filename Size Change
./dist/element-plus/dist/index.full.js 418 kB +206 B (+0.05%)
./dist/element-plus/dist/index.full.min.js 303 kB +123 B (+0.04%)
./dist/element-plus/dist/index.full.min.mjs 299 kB +142 B (+0.05%)
./dist/element-plus/dist/index.full.mjs 409 kB +202 B (+0.05%)
โ„น๏ธ View Unchanged
Filename Size
./dist/element-plus/dist/index.css 45.7 kB

compressed-size-action

github-actions[bot] avatar Jun 08 '25 15:06 github-actions[bot]

๐Ÿงช Playground Preview: https://element-plus.run/?pr=20961 Please comment the example via this playground if needed.

github-actions[bot] avatar Jun 08 '25 15:06 github-actions[bot]

But there is a problem when toggling a wrapper component, demo.

Replacing onBeforeMount with onMounted can fix this issue, but it takes an extra microtask tick to update the DOM, which means the render function will run again in the next event loop. I'd like to first refactor useOrderedChildren in a separate PR to make it work with onBeforeMount.

Update: While working on this, I found that using onMounted doesn't take an extra microtask tick, but it does retrigger the render.

makedopamine avatar Jun 19 '25 12:06 makedopamine

Very clear, ok ๐Ÿ˜€๐Ÿ‘

Dsaquel avatar Jun 19 '25 19:06 Dsaquel

Replacing onBeforeMount with onMounted can fix this issue, but it takes an extra microtask tick to update the DOM, which means the render function will run again in the next event loop. I'd like to first refactor useOrderedChildren in a separate PR to make it work with onBeforeMount.

While working on this, I found that using onMounted doesn't take an extra microtask tick, but it does retrigger the render.

makedopamine avatar Jun 24 '25 06:06 makedopamine