fix: inject value maybe undefined && tag style invalid (#6320)
* fix: inject value maybe undefined * fix(tag): style invalidpull/6294/head
parent
f85485e733
commit
eda7247c2c
|
@ -323,7 +323,7 @@ const Cascader = defineComponent({
|
||||||
getTransitionDirection(placement.value),
|
getTransitionDirection(placement.value),
|
||||||
transitionName,
|
transitionName,
|
||||||
)}
|
)}
|
||||||
getPopupContainer={getPopupContainer.value}
|
getPopupContainer={getPopupContainer?.value}
|
||||||
customSlots={{
|
customSlots={{
|
||||||
...slots,
|
...slots,
|
||||||
checkable: () => <span class={`${cascaderPrefixCls.value}-checkbox-inner`} />,
|
checkable: () => <span class={`${cascaderPrefixCls.value}-checkbox-inner`} />,
|
||||||
|
|
|
@ -148,7 +148,7 @@ const Drawer = defineComponent({
|
||||||
const [wrapSSR, hashId] = useStyle(prefixCls);
|
const [wrapSSR, hashId] = useStyle(prefixCls);
|
||||||
const getContainer = computed(() =>
|
const getContainer = computed(() =>
|
||||||
// 有可能为 false,所以不能直接判断
|
// 有可能为 false,所以不能直接判断
|
||||||
props.getContainer === undefined && getPopupContainer.value
|
props.getContainer === undefined && getPopupContainer?.value
|
||||||
? () => getPopupContainer.value(document.body)
|
? () => getPopupContainer.value(document.body)
|
||||||
: props.getContainer,
|
: props.getContainer,
|
||||||
);
|
);
|
||||||
|
|
|
@ -43,7 +43,7 @@ const Image = defineComponent<ImageProps>({
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
const imageLocale = configProvider.locale.value?.Image || defaultLocale.Image;
|
const imageLocale = configProvider.locale?.value?.Image || defaultLocale.Image;
|
||||||
const defaultPreviewMask = () => (
|
const defaultPreviewMask = () => (
|
||||||
<div class={`${prefixCls.value}-mask-info`}>
|
<div class={`${prefixCls.value}-mask-info`}>
|
||||||
<EyeOutlined />
|
<EyeOutlined />
|
||||||
|
|
|
@ -56,7 +56,7 @@ const PageHeader = defineComponent({
|
||||||
compact.value = width < 768;
|
compact.value = width < 768;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const ghost = computed(() => props.ghost ?? pageHeader.value?.ghost ?? true);
|
const ghost = computed(() => props.ghost ?? pageHeader?.value?.ghost ?? true);
|
||||||
|
|
||||||
const getBackIcon = () => {
|
const getBackIcon = () => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -266,7 +266,7 @@ const Select = defineComponent({
|
||||||
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
|
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
|
||||||
{...selectProps}
|
{...selectProps}
|
||||||
{...attrs}
|
{...attrs}
|
||||||
showSearch={props.showSearch ?? select.value?.showSearch}
|
showSearch={props.showSearch ?? select?.value?.showSearch}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
listHeight={listHeight}
|
listHeight={listHeight}
|
||||||
listItemHeight={listItemHeight}
|
listItemHeight={listItemHeight}
|
||||||
|
@ -279,7 +279,7 @@ const Select = defineComponent({
|
||||||
clearIcon={clearIcon}
|
clearIcon={clearIcon}
|
||||||
notFoundContent={mergedNotFound}
|
notFoundContent={mergedNotFound}
|
||||||
class={[mergedClassName.value, attrs.class]}
|
class={[mergedClassName.value, attrs.class]}
|
||||||
getPopupContainer={getPopupContainer.value}
|
getPopupContainer={getPopupContainer?.value}
|
||||||
dropdownClassName={rcSelectRtlDropdownClassName}
|
dropdownClassName={rcSelectRtlDropdownClassName}
|
||||||
onChange={triggerChange}
|
onChange={triggerChange}
|
||||||
onBlur={handleBlur}
|
onBlur={handleBlur}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { HTMLAttributes, App, PropType, ExtractPropTypes, Plugin } from 'vue';
|
import type { HTMLAttributes, App, PropType, ExtractPropTypes, Plugin, CSSProperties } from 'vue';
|
||||||
import { ref, defineComponent, watchEffect, computed } from 'vue';
|
import { ref, defineComponent, watchEffect, computed } from 'vue';
|
||||||
import classNames from '../_util/classNames';
|
import classNames from '../_util/classNames';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
|
@ -133,7 +133,11 @@ const Tag = defineComponent({
|
||||||
const isNeedWave = 'onClick' in attrs;
|
const isNeedWave = 'onClick' in attrs;
|
||||||
|
|
||||||
const tagNode = (
|
const tagNode = (
|
||||||
<span {...attrs} class={tagClassName.value} style={tagStyle}>
|
<span
|
||||||
|
{...attrs}
|
||||||
|
class={tagClassName.value}
|
||||||
|
style={[tagStyle, attrs.style as CSSProperties]}
|
||||||
|
>
|
||||||
{kids}
|
{kids}
|
||||||
{renderCloseIcon()}
|
{renderCloseIcon()}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -314,7 +314,7 @@ const TreeSelect = defineComponent({
|
||||||
}
|
}
|
||||||
showTreeIcon={treeIcon as any}
|
showTreeIcon={treeIcon as any}
|
||||||
notFoundContent={mergedNotFound}
|
notFoundContent={mergedNotFound}
|
||||||
getPopupContainer={getPopupContainer.value}
|
getPopupContainer={getPopupContainer?.value}
|
||||||
treeMotion={null}
|
treeMotion={null}
|
||||||
dropdownClassName={mergedDropdownClassName.value}
|
dropdownClassName={mergedDropdownClassName.value}
|
||||||
choiceTransitionName={choiceTransitionName.value}
|
choiceTransitionName={choiceTransitionName.value}
|
||||||
|
|
Loading…
Reference in New Issue