Merge branch 'next' of github.com:vueComponent/ant-design-vue into next
commit
c177494c1d
|
@ -68,7 +68,7 @@ const TransButton = defineComponent({
|
||||||
onKeyup={this.onKeyUp}
|
onKeyup={this.onKeyUp}
|
||||||
style={{ ...(!noStyle ? inlineStyle : null) }}
|
style={{ ...(!noStyle ? inlineStyle : null) }}
|
||||||
>
|
>
|
||||||
{this.$slots.default && this.$slots.default()}
|
{this.$slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -169,6 +169,6 @@ export default defineComponent({
|
||||||
if (csp) {
|
if (csp) {
|
||||||
this.csp = csp;
|
this.csp = csp;
|
||||||
}
|
}
|
||||||
return this.$slots.default && this.$slots.default()[0];
|
return this.$slots.default?.()[0];
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -258,7 +258,7 @@ const Affix = defineComponent({
|
||||||
>
|
>
|
||||||
<div {...props} style={placeholderStyle} ref="placeholderNode">
|
<div {...props} style={placeholderStyle} ref="placeholderNode">
|
||||||
<div class={className} ref="fixedNode" style={affixStyle}>
|
<div class={className} ref="fixedNode" style={affixStyle}>
|
||||||
{$slots.default && $slots.default()}
|
{$slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ResizeObserver>
|
</ResizeObserver>
|
||||||
|
|
|
@ -283,7 +283,7 @@ export default defineComponent({
|
||||||
<div class={`${prefixCls}-ink`}>
|
<div class={`${prefixCls}-ink`}>
|
||||||
<span class={inkClass} ref="inkNode" />
|
<span class={inkClass} ref="inkNode" />
|
||||||
</div>
|
</div>
|
||||||
{$slots.default && $slots.default()}
|
{$slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default defineComponent({
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</a>
|
</a>
|
||||||
{$slots.default && $slots.default()}
|
{$slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -118,7 +118,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
: {};
|
: {};
|
||||||
|
|
||||||
let children: VueNode = this.$slots.default && this.$slots.default();
|
let children: VueNode = this.$slots.default?.();
|
||||||
if (src && isImgExist) {
|
if (src && isImgExist) {
|
||||||
children = (
|
children = (
|
||||||
<img src={src} srcset={srcset || srcSet} onError={this.handleImgLoadError} alt={alt} />
|
<img src={src} srcset={srcset || srcSet} onError={this.handleImgLoadError} alt={alt} />
|
||||||
|
|
|
@ -93,7 +93,7 @@ const BackTop = defineComponent({
|
||||||
};
|
};
|
||||||
|
|
||||||
const backTopBtn = this.visible ? (
|
const backTopBtn = this.visible ? (
|
||||||
<div {...divProps}>{($slots.default && $slots.default()) || defaultElement}</div>
|
<div {...divProps}>{$slots.default?.() || defaultElement}</div>
|
||||||
) : null;
|
) : null;
|
||||||
const transitionProps = getTransitionProps('fade');
|
const transitionProps = getTransitionProps('fade');
|
||||||
return <Transition {...transitionProps}>{backTopBtn}</Transition>;
|
return <Transition {...transitionProps}>{backTopBtn}</Transition>;
|
||||||
|
|
|
@ -69,7 +69,7 @@ exports[`Cascader can be selected 3`] = `
|
||||||
exports[`Cascader popup correctly when panel is open 1`] = `
|
exports[`Cascader popup correctly when panel is open 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<!---->
|
<!---->
|
||||||
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft" style="left: -999px; top: -995px;">
|
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft " style="left: -999px; top: -995px;">
|
||||||
<div>
|
<div>
|
||||||
<ul class="ant-cascader-menu">
|
<ul class="ant-cascader-menu">
|
||||||
<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>
|
<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`] = `
|
||||||
exports[`Cascader popup correctly with defaultValue 1`] = `
|
exports[`Cascader popup correctly with defaultValue 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<!---->
|
<!---->
|
||||||
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft slide-up-enter" style="left: -999px; top: -995px;">
|
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft " style="left: -999px; top: -995px;">
|
||||||
<div>
|
<div>
|
||||||
<ul class="ant-cascader-menu">
|
<ul class="ant-cascader-menu">
|
||||||
<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>
|
<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>
|
||||||
|
|
|
@ -9,7 +9,7 @@ exports[`Comment Comment can be used as editor, user can customize the editor co
|
||||||
<!---->
|
<!---->
|
||||||
<div class="ant-spin-container">
|
<div class="ant-spin-container">
|
||||||
<ul class="ant-list-items">
|
<ul class="ant-list-items">
|
||||||
<li class="ant-list-item">
|
<li class="ant-list-item ">
|
||||||
<div class="ant-comment">
|
<div class="ant-comment">
|
||||||
<div class="ant-comment-inner">
|
<div class="ant-comment-inner">
|
||||||
<div class="ant-comment-avatar"><img src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" alt="comment-avatar"></div>
|
<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
|
||||||
<div class="ant-comment-content-detail">
|
<div class="ant-comment-content-detail">
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-row ant-form-item">
|
<div class="ant-row ant-form-item">
|
||||||
|
<!---->
|
||||||
<div class="ant-col ant-form-item-control-wrapper">
|
<div class="ant-col ant-form-item-control-wrapper">
|
||||||
<div class="ant-form-item-control"><span class="ant-form-item-children"><textarea rows="4" class="ant-input"></textarea><!----></span>
|
<div class="ant-form-item-control"><span class="ant-form-item-children"><textarea rows="4" class="ant-input"></textarea><!----></span>
|
||||||
<!---->
|
<!---->
|
||||||
|
@ -51,6 +52,7 @@ exports[`Comment Comment can be used as editor, user can customize the editor co
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-row ant-form-item">
|
<div class="ant-row ant-form-item">
|
||||||
|
<!---->
|
||||||
<div class="ant-col ant-form-item-control-wrapper">
|
<div class="ant-col ant-form-item-control-wrapper">
|
||||||
<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>
|
<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>
|
||||||
<!----></span>
|
<!----></span>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { reactive, provide, VNodeTypes, PropType, defineComponent, App } from 'vue';
|
import { reactive, provide, VNodeTypes, PropType, defineComponent, App, watch } from 'vue';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';
|
import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';
|
||||||
import LocaleProvider, { Locale, ANT_MARK } from '../locale-provider';
|
import LocaleProvider, { Locale, ANT_MARK } from '../locale-provider';
|
||||||
|
@ -81,7 +81,7 @@ const ConfigProvider = defineComponent({
|
||||||
getPopupContainer: {
|
getPopupContainer: {
|
||||||
type: Function as PropType<(triggerNode: HTMLElement) => HTMLElement>,
|
type: Function as PropType<(triggerNode: HTMLElement) => HTMLElement>,
|
||||||
},
|
},
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: String,
|
||||||
getPrefixCls: {
|
getPrefixCls: {
|
||||||
type: Function as PropType<(suffixCls?: string, customizePrefixCls?: string) => string>,
|
type: Function as PropType<(suffixCls?: string, customizePrefixCls?: string) => string>,
|
||||||
},
|
},
|
||||||
|
@ -140,6 +140,10 @@ const ConfigProvider = defineComponent({
|
||||||
renderEmpty: renderEmptyComponent,
|
renderEmpty: renderEmptyComponent,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(props, () => {
|
||||||
|
Object.assign(configProvider, props);
|
||||||
|
});
|
||||||
|
|
||||||
provide('configProvider', configProvider);
|
provide('configProvider', configProvider);
|
||||||
|
|
||||||
const renderProvider = (legacyLocale: Locale) => {
|
const renderProvider = (legacyLocale: Locale) => {
|
||||||
|
|
|
@ -187,7 +187,7 @@ const Drawer = defineComponent({
|
||||||
>
|
>
|
||||||
{this.renderHeader(prefixCls)}
|
{this.renderHeader(prefixCls)}
|
||||||
<div key="body" class={`${prefixCls}-body`} style={bodyStyle}>
|
<div key="body" class={`${prefixCls}-body`} style={bodyStyle}>
|
||||||
{this.$slots.default && this.$slots.default()}
|
{this.$slots.default?.()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -216,7 +216,7 @@ const Select = defineComponent({
|
||||||
dropdownClassName={rcSelectRtlDropDownClassName}
|
dropdownClassName={rcSelectRtlDropDownClassName}
|
||||||
onChange={triggerChange}
|
onChange={triggerChange}
|
||||||
>
|
>
|
||||||
{slots.default && slots.default()}
|
{slots.default?.()}
|
||||||
</RcSelect>
|
</RcSelect>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default defineComponent({
|
||||||
[`${prefixCls}-reverse`]: !!reverse,
|
[`${prefixCls}-reverse`]: !!reverse,
|
||||||
[`${prefixCls}-${mode}`]: !!mode,
|
[`${prefixCls}-${mode}`]: !!mode,
|
||||||
});
|
});
|
||||||
const children = filterEmpty(this.$slots.default && this.$slots.default());
|
const children = filterEmpty(this.$slots.default?.());
|
||||||
// // Remove falsy items
|
// // Remove falsy items
|
||||||
// const falsylessItems = filterEmpty(this.$slots.default)
|
// const falsylessItems = filterEmpty(this.$slots.default)
|
||||||
// const items = falsylessItems.map((item, idx) => {
|
// const items = falsylessItems.map((item, idx) => {
|
||||||
|
|
|
@ -52,9 +52,7 @@ export default defineComponent({
|
||||||
>
|
>
|
||||||
{dot}
|
{dot}
|
||||||
</div>
|
</div>
|
||||||
<div class={`${prefixCls}-item-content`}>
|
<div class={`${prefixCls}-item-content`}>{this.$slots.default?.()}</div>
|
||||||
{this.$slots.default && this.$slots.default()}
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,7 +10,7 @@ const FunctionProvider = {
|
||||||
if (props.injectExtraPropsKey) {
|
if (props.injectExtraPropsKey) {
|
||||||
provide(props.injectExtraPropsKey, reactive(attrs));
|
provide(props.injectExtraPropsKey, reactive(attrs));
|
||||||
}
|
}
|
||||||
return () => slots.default && slots.default();
|
return () => slots.default?.();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ const VueResizeObserver = defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return this.$slots.default && this.$slots.default()[0];
|
return this.$slots.default?.()[0];
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ const TransBtn = (props: TransBtnProps, { slots }: SetupContext) => {
|
||||||
icon
|
icon
|
||||||
) : (
|
) : (
|
||||||
<span class={className.split(/\s+/).map((cls: any) => `${cls}-icon`)}>
|
<span class={className.split(/\s+/).map((cls: any) => `${cls}-icon`)}>
|
||||||
{slots.default && slots.default()}
|
{slots.default?.()}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -246,7 +246,7 @@ export default {
|
||||||
align={align}
|
align={align}
|
||||||
onAlign={this.onAlign}
|
onAlign={this.onAlign}
|
||||||
>
|
>
|
||||||
<PopupInner {...popupInnerProps}>{$slots.default && $slots.default()}</PopupInner>
|
<PopupInner {...popupInnerProps}>{$slots.default?.()}</PopupInner>
|
||||||
</Align>
|
</Align>
|
||||||
) : null}
|
) : null}
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default {
|
||||||
return (
|
return (
|
||||||
<div class={!visible ? hiddenClassName : ''}>
|
<div class={!visible ? hiddenClassName : ''}>
|
||||||
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
|
<LazyRenderBox class={`${prefixCls}-content`} visible={visible}>
|
||||||
{this.$slots.default && this.$slots.default()}
|
{this.$slots.default?.()}
|
||||||
</LazyRenderBox>
|
</LazyRenderBox>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue