fix: expand icon not fixed
parent
b32053b2ec
commit
3610140413
|
@ -94,7 +94,7 @@ exports[`renders ./components/alert/demo/custom-icon.vue correctly 1`] = `
|
|||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-success" data-show="true">
|
||||
<div class="ant-alert ant-alert-success" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Success Tips</div>
|
||||
<div class="ant-alert-description">
|
||||
|
@ -103,7 +103,7 @@ exports[`renders ./components/alert/demo/custom-icon.vue correctly 1`] = `
|
|||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-info" data-show="true">
|
||||
<div class="ant-alert ant-alert-info" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Informational Notes</div>
|
||||
<div class="ant-alert-description">
|
||||
|
@ -112,7 +112,7 @@ exports[`renders ./components/alert/demo/custom-icon.vue correctly 1`] = `
|
|||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-warning" data-show="true">
|
||||
<div class="ant-alert ant-alert-warning" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Warning</div>
|
||||
<div class="ant-alert-description">
|
||||
|
@ -121,7 +121,7 @@ exports[`renders ./components/alert/demo/custom-icon.vue correctly 1`] = `
|
|||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-error" data-show="true">
|
||||
<div class="ant-alert ant-alert-error" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Error</div>
|
||||
<div class="ant-alert-description">
|
||||
|
@ -130,28 +130,28 @@ exports[`renders ./components/alert/demo/custom-icon.vue correctly 1`] = `
|
|||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-success ant-alert-with-description" data-show="true">
|
||||
<div class="ant-alert ant-alert-success ant-alert-with-description" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Success Tips</div>
|
||||
<div class="ant-alert-description">Detailed description and advices about successful copywriting.</div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-info ant-alert-with-description" data-show="true">
|
||||
<div class="ant-alert ant-alert-info ant-alert-with-description" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Informational Notes</div>
|
||||
<div class="ant-alert-description">Additional description and informations about copywriting.</div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-warning ant-alert-with-description" data-show="true">
|
||||
<div class="ant-alert ant-alert-warning ant-alert-with-description" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Warning</div>
|
||||
<div class="ant-alert-description">This is a warning notice about copywriting.</div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-alert ant-alert-error ant-alert-with-description" data-show="true">
|
||||
<div class="ant-alert ant-alert-error ant-alert-with-description" data-show="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-alert-icon"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span>
|
||||
<div class="ant-alert-content">
|
||||
<div class="ant-alert-message">Error</div>
|
||||
<div class="ant-alert-description">This is an error message about copywriting.</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { ExtractPropTypes } from 'vue';
|
||||
import { inject, cloneVNode, defineComponent, ref } from 'vue';
|
||||
import { inject, defineComponent, ref } from 'vue';
|
||||
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
|
||||
import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined';
|
||||
import ExclamationCircleOutlined from '@ant-design/icons-vue/ExclamationCircleOutlined';
|
||||
|
@ -15,6 +15,7 @@ import { getTransitionProps, Transition } from '../_util/transition';
|
|||
import { isValidElement, getPropsSlot } from '../_util/props-util';
|
||||
import { defaultConfigProvider } from '../config-provider';
|
||||
import { tuple, withInstall } from '../_util/type';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
|
||||
function noop() {}
|
||||
|
||||
|
@ -139,7 +140,7 @@ const Alert = defineComponent({
|
|||
|
||||
const iconNode = (icon &&
|
||||
(isValidElement(icon) ? (
|
||||
cloneVNode(icon, {
|
||||
cloneElement(icon, {
|
||||
class: `${prefixCls}-icon`,
|
||||
})
|
||||
) : (
|
||||
|
|
|
@ -21,13 +21,13 @@ exports[`Table.pagination renders pagination correctly 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="0" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Jack
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="1" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Lucy
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -31,45 +31,45 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="0" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-cell-with-append ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Jack
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="1" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-cell-with-append ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Lucy
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="2" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-cell-with-append ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Tom
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="3" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-cell-with-append ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<td class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last ant-table-selection-column" style="position: sticky; left: 0px;">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Jerry
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -24,21 +24,21 @@ exports[`Table align column should not override cell style 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="1" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->
|
||||
<!---->
|
||||
</td>
|
||||
<td style="color: red; text-align: center;" class="ant-table-cell ant-table-cell-with-append">
|
||||
<td style="color: red; text-align: center;" class="ant-table-cell">
|
||||
<!---->32
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="2" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->
|
||||
<!---->
|
||||
</td>
|
||||
<td style="color: red; text-align: center;" class="ant-table-cell ant-table-cell-with-append">
|
||||
<td style="color: red; text-align: center;" class="ant-table-cell">
|
||||
<!---->42
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -94,25 +94,25 @@ exports[`Table renders JSX correctly 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="1" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->John
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Brown
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->32
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="2" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Jim
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->Green
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->42
|
||||
</td>
|
||||
</tr>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,7 @@ When there's too much information to show and the table can't display all at onc
|
|||
</docs>
|
||||
|
||||
<template>
|
||||
<a-table :columns="columns" :data-source="data">
|
||||
<a-table :columns="columns" :data-source="data" :scroll="{ x: 2000 }">
|
||||
<template #bodyCell="{ column, text }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<a>Delete</a>
|
||||
|
@ -34,7 +34,7 @@ When there's too much information to show and the table can't display all at onc
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
const columns = [
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name' },
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name', fixed: true },
|
||||
{ title: 'Age', dataIndex: 'age', key: 'age' },
|
||||
{ title: 'Address', dataIndex: 'address', key: 'address' },
|
||||
{ title: 'Action', key: 'action' },
|
||||
|
|
|
@ -450,141 +450,141 @@ exports[`renders ./components/transfer/demo/table-transfer.vue correctly 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="0" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content1
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content1
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="1" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content2
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content2
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="3" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content4
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content4
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="4" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content5
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content5
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="6" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content7
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content7
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="7" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content8
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content8
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="9" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content10
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content10
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="10" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content11
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content11
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="12" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content13
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content13
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="13" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content14
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->description of content14
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -650,67 +650,67 @@ exports[`renders ./components/transfer/demo/table-transfer.vue correctly 1`] = `
|
|||
<tbody class="ant-table-tbody">
|
||||
<!---->
|
||||
<tr data-row-key="2" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content3
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="5" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content6
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="8" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content9
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="11" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content12
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="14" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content15
|
||||
</td>
|
||||
</tr>
|
||||
<!---->
|
||||
<tr data-row-key="17" class="ant-table-row ant-table-row-level-0">
|
||||
<td class="ant-table-cell ant-table-cell-with-append ant-table-selection-column">
|
||||
<td class="ant-table-cell ant-table-selection-column">
|
||||
<!----><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input"><span class="ant-checkbox-inner"></span></span>
|
||||
<!---->
|
||||
</label>
|
||||
</td>
|
||||
<td class="ant-table-cell ant-table-cell-with-append">
|
||||
<td class="ant-table-cell">
|
||||
<!---->content18
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -167,26 +167,26 @@ export default defineComponent<BodyRowProps<unknown>>({
|
|||
transformCellText={transformCellText}
|
||||
v-slots={{
|
||||
// ============= Used for nest expandable =============
|
||||
appendNode: () => {
|
||||
if (colIndex === (expandIconColumnIndex || 0) && nestExpandable.value) {
|
||||
return (
|
||||
<>
|
||||
<span
|
||||
style={{ paddingLeft: `${indentSize * indent}px` }}
|
||||
class={`${prefixCls}-row-indent indent-level-${indent}`}
|
||||
/>
|
||||
{expandIcon({
|
||||
prefixCls,
|
||||
expanded: expanded.value,
|
||||
expandable: hasNestChildren.value,
|
||||
record,
|
||||
onExpand: onInternalTriggerExpand,
|
||||
})}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
appendNode:
|
||||
colIndex === (expandIconColumnIndex || 0) && nestExpandable.value
|
||||
? () => {
|
||||
return (
|
||||
<>
|
||||
<span
|
||||
style={{ paddingLeft: `${indentSize * indent}px` }}
|
||||
class={`${prefixCls}-row-indent indent-level-${indent}`}
|
||||
/>
|
||||
{expandIcon({
|
||||
prefixCls,
|
||||
expanded: expanded.value,
|
||||
expandable: hasNestChildren.value,
|
||||
record,
|
||||
onExpand: onInternalTriggerExpand,
|
||||
})}
|
||||
</>
|
||||
);
|
||||
}
|
||||
: undefined,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -62,7 +62,7 @@ export default defineComponent<ExpandedRowProps>({
|
|||
contentNode = (
|
||||
<div
|
||||
style={{
|
||||
width: componentWidth - (fixHeader ? tableContext.scrollbarSize : 0),
|
||||
width: `${componentWidth - (fixHeader ? tableContext.scrollbarSize : 0)}px`,
|
||||
position: 'sticky',
|
||||
left: 0,
|
||||
overflow: 'hidden',
|
||||
|
|
|
@ -122,7 +122,7 @@ function useColumns<RecordType>(
|
|||
const withExpandColumns = computed<ColumnsType<RecordType>>(() => {
|
||||
if (expandable.value) {
|
||||
const expandColIndex = expandIconColumnIndex.value || 0;
|
||||
const prevColumn = baseColumns[expandColIndex];
|
||||
const prevColumn = baseColumns.value[expandColIndex];
|
||||
|
||||
let fixedColumn: FixedType | null;
|
||||
if ((expandFixed.value === 'left' || expandFixed.value) && !expandIconColumnIndex.value) {
|
||||
|
|
Loading…
Reference in New Issue