Skip to content

Commit c177494

Browse files
committed
Merge branch 'next' of github.com:vueComponent/ant-design-vue into next
2 parents ee0d450 + d219ff1 commit c177494

File tree

19 files changed

+27
-23
lines changed

19 files changed

+27
-23
lines changed

components/_util/transButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const TransButton = defineComponent({
6868
onKeyup={this.onKeyUp}
6969
style={{ ...(!noStyle ? inlineStyle : null) }}
7070
>
71-
{this.$slots.default && this.$slots.default()}
71+
{this.$slots.default?.()}
7272
</div>
7373
);
7474
},

components/_util/wave.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ export default defineComponent({
169169
if (csp) {
170170
this.csp = csp;
171171
}
172-
return this.$slots.default && this.$slots.default()[0];
172+
return this.$slots.default?.()[0];
173173
},
174174
});

components/affix/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const Affix = defineComponent({
258258
>
259259
<div {...props} style={placeholderStyle} ref="placeholderNode">
260260
<div class={className} ref="fixedNode" style={affixStyle}>
261-
{$slots.default && $slots.default()}
261+
{$slots.default?.()}
262262
</div>
263263
</div>
264264
</ResizeObserver>

components/anchor/Anchor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export default defineComponent({
283283
<div class={`${prefixCls}-ink`}>
284284
<span class={inkClass} ref="inkNode" />
285285
</div>
286-
{$slots.default && $slots.default()}
286+
{$slots.default?.()}
287287
</div>
288288
</div>
289289
);

components/anchor/AnchorLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default defineComponent({
8282
>
8383
{title}
8484
</a>
85-
{$slots.default && $slots.default()}
85+
{$slots.default?.()}
8686
</div>
8787
);
8888
},

components/avatar/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default defineComponent({
118118
}
119119
: {};
120120

121-
let children: VueNode = this.$slots.default && this.$slots.default();
121+
let children: VueNode = this.$slots.default?.();
122122
if (src && isImgExist) {
123123
children = (
124124
<img src={src} srcset={srcset || srcSet} onError={this.handleImgLoadError} alt={alt} />

components/back-top/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const BackTop = defineComponent({
9393
};
9494

9595
const backTopBtn = this.visible ? (
96-
<div {...divProps}>{($slots.default && $slots.default()) || defaultElement}</div>
96+
<div {...divProps}>{$slots.default?.() || defaultElement}</div>
9797
) : null;
9898
const transitionProps = getTransitionProps('fade');
9999
return <Transition {...transitionProps}>{backTopBtn}</Transition>;

components/cascader/__tests__/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ exports[`Cascader can be selected 3`] = `
6969
exports[`Cascader popup correctly when panel is open 1`] = `
7070
<div>
7171
<!---->
72-
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft" style="left: -999px; top: -995px;">
72+
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft " style="left: -999px; top: -995px;">
7373
<div>
7474
<ul class="ant-cascader-menu">
7575
<li class="ant-cascader-menu-item ant-cascader-menu-item-expand" title="Zhejiang" role="menuitem">Zhejiang<span class="ant-cascader-menu-item-expand-icon"><span role="img" aria-label="right" class="anticon anticon-right"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span>
@@ -87,7 +87,7 @@ exports[`Cascader popup correctly when panel is open 1`] = `
8787
exports[`Cascader popup correctly with defaultValue 1`] = `
8888
<div>
8989
<!---->
90-
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft slide-up-enter" style="left: -999px; top: -995px;">
90+
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft " style="left: -999px; top: -995px;">
9191
<div>
9292
<ul class="ant-cascader-menu">
9393
<li class="ant-cascader-menu-item ant-cascader-menu-item-expand ant-cascader-menu-item-active" title="Zhejiang" role="menuitem">Zhejiang<span class="ant-cascader-menu-item-expand-icon"><span role="img" aria-label="right" class="anticon anticon-right"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span>

components/comment/__tests__/__snapshots__/index.test.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`Comment Comment can be used as editor, user can customize the editor co
99
<!---->
1010
<div class="ant-spin-container">
1111
<ul class="ant-list-items">
12-
<li class="ant-list-item">
12+
<li class="ant-list-item ">
1313
<div class="ant-comment">
1414
<div class="ant-comment-inner">
1515
<div class="ant-comment-avatar"><img src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" alt="comment-avatar"></div>
@@ -43,6 +43,7 @@ exports[`Comment Comment can be used as editor, user can customize the editor co
4343
<div class="ant-comment-content-detail">
4444
<div>
4545
<div class="ant-row ant-form-item">
46+
<!---->
4647
<div class="ant-col ant-form-item-control-wrapper">
4748
<div class="ant-form-item-control"><span class="ant-form-item-children"><textarea rows="4" class="ant-input"></textarea><!----></span>
4849
<!---->
@@ -51,6 +52,7 @@ exports[`Comment Comment can be used as editor, user can customize the editor co
5152
</div>
5253
</div>
5354
<div class="ant-row ant-form-item">
55+
<!---->
5456
<div class="ant-col ant-form-item-control-wrapper">
5557
<div class="ant-form-item-control"><span class="ant-form-item-children"><button class="ant-btn ant-btn-primary" type="submit" ant-click-animating-without-extra-node="true"><!----><span>Add Comment</span></button>
5658
<!----></span>

components/config-provider/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { reactive, provide, VNodeTypes, PropType, defineComponent, App } from 'vue';
1+
import { reactive, provide, VNodeTypes, PropType, defineComponent, App, watch } from 'vue';
22
import PropTypes from '../_util/vue-types';
33
import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';
44
import LocaleProvider, { Locale, ANT_MARK } from '../locale-provider';
@@ -81,7 +81,7 @@ const ConfigProvider = defineComponent({
8181
getPopupContainer: {
8282
type: Function as PropType<(triggerNode: HTMLElement) => HTMLElement>,
8383
},
84-
prefixCls: PropTypes.string,
84+
prefixCls: String,
8585
getPrefixCls: {
8686
type: Function as PropType<(suffixCls?: string, customizePrefixCls?: string) => string>,
8787
},
@@ -140,6 +140,10 @@ const ConfigProvider = defineComponent({
140140
renderEmpty: renderEmptyComponent,
141141
});
142142

143+
watch(props, () => {
144+
Object.assign(configProvider, props);
145+
});
146+
143147
provide('configProvider', configProvider);
144148

145149
const renderProvider = (legacyLocale: Locale) => {

0 commit comments

Comments
 (0)