fix(web-antdv-next): adapt notification and open change APIs
parent
0efde47539
commit
1123f00795
|
|
@ -72,7 +72,6 @@ import {
|
||||||
Checkbox as CheckboxComponent,
|
Checkbox as CheckboxComponent,
|
||||||
CheckboxGroup as CheckboxGroupComponent,
|
CheckboxGroup as CheckboxGroupComponent,
|
||||||
DatePicker as DatePickerComponent,
|
DatePicker as DatePickerComponent,
|
||||||
DateRangePicker as RangePickerComponent,
|
|
||||||
Divider as DividerComponent,
|
Divider as DividerComponent,
|
||||||
Image as ImageComponent,
|
Image as ImageComponent,
|
||||||
ImagePreviewGroup,
|
ImagePreviewGroup,
|
||||||
|
|
@ -85,6 +84,7 @@ import {
|
||||||
notification,
|
notification,
|
||||||
Radio as RadioComponent,
|
Radio as RadioComponent,
|
||||||
RadioGroup as RadioGroupComponent,
|
RadioGroup as RadioGroupComponent,
|
||||||
|
DateRangePicker as RangePickerComponent,
|
||||||
Rate as RateComponent,
|
Rate as RateComponent,
|
||||||
Select as SelectComponent,
|
Select as SelectComponent,
|
||||||
Space as SpaceComponent,
|
Space as SpaceComponent,
|
||||||
|
|
@ -279,9 +279,9 @@ async function previewImage(
|
||||||
{
|
{
|
||||||
class: 'hidden',
|
class: 'hidden',
|
||||||
preview: {
|
preview: {
|
||||||
visible: visible.value,
|
open: visible.value,
|
||||||
current: currentIndex,
|
current: currentIndex,
|
||||||
onVisibleChange: (value: boolean) => {
|
onOpenChange: (value: boolean) => {
|
||||||
visible.value = value;
|
visible.value = value;
|
||||||
if (!value) {
|
if (!value) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -675,13 +675,13 @@ async function initComponentAdapter() {
|
||||||
fieldNames: { label: 'label', value: 'value', children: 'children' },
|
fieldNames: { label: 'label', value: 'value', children: 'children' },
|
||||||
loadingSlot: 'suffixIcon',
|
loadingSlot: 'suffixIcon',
|
||||||
modelPropName: 'value',
|
modelPropName: 'value',
|
||||||
visibleEvent: 'onVisibleChange',
|
visibleEvent: 'onOpenChange',
|
||||||
}),
|
}),
|
||||||
ApiSelect: withDefaultPlaceholder(ApiComponent, 'select', {
|
ApiSelect: withDefaultPlaceholder(ApiComponent, 'select', {
|
||||||
component: Select,
|
component: Select,
|
||||||
loadingSlot: 'suffixIcon',
|
loadingSlot: 'suffixIcon',
|
||||||
modelPropName: 'value',
|
modelPropName: 'value',
|
||||||
visibleEvent: 'onVisibleChange',
|
visibleEvent: 'onOpenChange',
|
||||||
}),
|
}),
|
||||||
ApiTreeSelect: withDefaultPlaceholder(ApiComponent, 'select', {
|
ApiTreeSelect: withDefaultPlaceholder(ApiComponent, 'select', {
|
||||||
component: TreeSelect,
|
component: TreeSelect,
|
||||||
|
|
@ -689,7 +689,7 @@ async function initComponentAdapter() {
|
||||||
loadingSlot: 'suffixIcon',
|
loadingSlot: 'suffixIcon',
|
||||||
modelPropName: 'value',
|
modelPropName: 'value',
|
||||||
optionsPropName: 'treeData',
|
optionsPropName: 'treeData',
|
||||||
visibleEvent: 'onVisibleChange',
|
visibleEvent: 'onOpenChange',
|
||||||
}),
|
}),
|
||||||
AutoComplete,
|
AutoComplete,
|
||||||
Cascader,
|
Cascader,
|
||||||
|
|
@ -743,8 +743,8 @@ async function initComponentAdapter() {
|
||||||
copyPreferencesSuccess: (title, content) => {
|
copyPreferencesSuccess: (title, content) => {
|
||||||
notification.success({
|
notification.success({
|
||||||
description: content,
|
description: content,
|
||||||
message: title,
|
|
||||||
placement: 'bottomRight',
|
placement: 'bottomRight',
|
||||||
|
title,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ async function handleSendMessage(event: any) {
|
||||||
}
|
}
|
||||||
// 1. 校验消息是否为空
|
// 1. 校验消息是否为空
|
||||||
if (isEmpty(unref(message.value)?.trim())) {
|
if (isEmpty(unref(message.value)?.trim())) {
|
||||||
notification.warning({ message: '请输入消息后再发送哦!' });
|
notification.warning({ title: '请输入消息后再发送哦!' });
|
||||||
message.value = '';
|
message.value = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue