Skip to content

Commit 8b6a771

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-v3.3
2 parents bb4b86a + 39ac6ed commit 8b6a771

File tree

10 files changed

+38
-19
lines changed

10 files changed

+38
-19
lines changed

components/config-provider/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ watchEffect(() => {
6969

7070
type GlobalConfigProviderProps = {
7171
prefixCls?: MaybeRef<ConfigProviderProps['prefixCls']>;
72+
getPopupContainer?: ConfigProviderProps['getPopupContainer'];
7273
};
7374

7475
let stopWatchEffect: WatchStopHandle;

components/grid/Row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const rowProps = () => ({
2323
justify: String as PropType<typeof RowJustify[number]>,
2424
prefixCls: String,
2525
gutter: {
26-
type: [Number, Array] as PropType<Gutter | [Gutter, Gutter]>,
26+
type: [Number, Array, Object] as PropType<Gutter | [Gutter, Gutter]>,
2727
default: 0 as Gutter | [Gutter, Gutter],
2828
},
2929
wrap: { type: Boolean, default: undefined },

components/select/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,7 @@ exports[`renders ./components/select/demo/suffix.vue correctly 1`] = `
596596
<!---->
597597
<div class="ant-select-selector"><span class="ant-select-selection-search"><input type="search" id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" style="opacity: 0;"></span><span class="ant-select-selection-item" title="Lucy">Lucy</span>
598598
<!---->
599-
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="smile" class="anticon anticon-smile"><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>
600-
<!----></span>
599+
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="smile" class="anticon anticon-smile ant-select-suffix"><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></span>
601600
<!---->
602601
</div>
603602
</div>
@@ -608,8 +607,7 @@ exports[`renders ./components/select/demo/suffix.vue correctly 1`] = `
608607
<!---->
609608
<div class="ant-select-selector"><span class="ant-select-selection-search"><input type="search" id="rc_select_TEST_OR_SSR" disabled="" autocomplete="off" class="ant-select-selection-search-input" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" readonly="" unselectable="on" style="opacity: 0;"></span><span class="ant-select-selection-item" title="Lucy">Lucy</span>
610609
<!---->
611-
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="meh" class="anticon anticon-meh"><svg focusable="false" class="" data-icon="meh" 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 565H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"></path></svg></span>
612-
<!----></span>
610+
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="meh" class="anticon anticon-meh ant-select-suffix"><svg focusable="false" class="" data-icon="meh" 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 565H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"></path></svg></span></span>
613611
<!---->
614612
</div>
615613
</div>

components/select/demo/suffix.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Basic Usage
2424
:options="options1"
2525
@change="handleChange"
2626
>
27-
<template #suffixIcon><smile-outlined /></template>
27+
<template #suffixIcon><smile-outlined class="ant-select-suffix" /></template>
2828
</a-select>
2929
<a-select v-model:value="value2" style="width: 120px" disabled :options="options2">
30-
<template #suffixIcon><meh-outlined /></template>
30+
<template #suffixIcon><meh-outlined class="ant-select-suffix" /></template>
3131
</a-select>
3232
</a-space>
3333
</template>

components/table/style/resize.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
}
2525

2626
.@{table-prefix-cls}-resize-handle.dragging {
27+
overflow: hidden;
2728
.@{table-prefix-cls}-resize-handle-line {
2829
opacity: 1;
2930
}

components/tree/DirectoryTree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export default defineComponent({
239239
);
240240
} else {
241241
// Single click
242-
newSelectedKeys = keys;
242+
newSelectedKeys = [key];
243243
lastSelectedKey.value = key;
244244
cachedSelectedKeys.value = newSelectedKeys;
245245
newEvent.selectedNodes = convertDirectoryKeysToNodes(

components/typography/Base.tsx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import useConfigInject from '../_util/hooks/useConfigInject';
3030
import type { EventHandler } from '../_util/EventInterface';
3131
import omit from '../_util/omit';
3232
import type { AutoSizeType } from '../input/inputProps';
33+
import useMergedState from '../_util/hooks/useMergedState';
3334

3435
export type BaseType = 'secondary' | 'success' | 'warning' | 'danger';
3536

@@ -130,7 +131,6 @@ const Base = defineComponent({
130131
const { prefixCls, direction } = useConfigInject('typography', props);
131132

132133
const state = reactive({
133-
edit: false,
134134
copied: false,
135135
ellipsisText: '',
136136
ellipsisContent: null,
@@ -256,29 +256,39 @@ const Base = defineComponent({
256256
}, 3000);
257257
});
258258
}
259+
259260
const editable = computed(() => {
260261
const editable = props.editable;
261-
if (!editable) return { editing: state.edit };
262+
if (!editable) return { editing: false };
262263

263264
return {
264-
editing: state.edit,
265265
...(typeof editable === 'object' ? editable : null),
266266
};
267267
});
268268

269+
const [editing, setEditing] = useMergedState(false, {
270+
value: computed(() => {
271+
return editable.value.editing;
272+
}),
273+
});
274+
269275
function triggerEdit(edit: boolean) {
270276
const { onStart } = editable.value;
271277
if (edit && onStart) {
272278
onStart();
273279
}
274280

275-
state.edit = edit;
276-
nextTick(() => {
277-
if (!edit) {
281+
setEditing(edit);
282+
}
283+
watch(
284+
editing,
285+
val => {
286+
if (!val) {
278287
editIcon.value?.focus();
279288
}
280-
});
281-
}
289+
},
290+
{ flush: 'post' },
291+
);
282292

283293
// ============== Ellipsis ==============
284294
function resizeOnNextFrame() {
@@ -468,7 +478,7 @@ const Base = defineComponent({
468478
}
469479

470480
return () => {
471-
const { editing, triggerType = ['icon'] } = editable.value;
481+
const { triggerType = ['icon'] } = editable.value;
472482
const children =
473483
props.ellipsis || props.editable
474484
? props.content !== undefined
@@ -478,7 +488,7 @@ const Base = defineComponent({
478488
? slots.default()
479489
: props.content;
480490

481-
if (editing) {
491+
if (editing.value) {
482492
return renderEditInput();
483493
}
484494
return (

components/upload/Upload.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,13 @@ export default defineComponent({
343343
};
344344
return () => {
345345
const { listType, disabled, type } = props;
346+
const { class: className, style: styleName, ...transAttrs } = attrs;
346347
const rcUploadProps = {
347348
onBatchStart,
348349
onError,
349350
onProgress,
350351
onSuccess,
352+
...transAttrs,
351353
...(props as RcUploadProps),
352354
id: props.id ?? formItemContext.id.value,
353355
prefixCls: prefixCls.value,

components/upload/index.zh-CN.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/QaeBt_ZMg/Upload.svg
2525
| beforeUpload | 上传文件之前的钩子,参数为上传的文件,若返回 `false` 则停止上传。支持返回一个 Promise 对象,Promise 对象 reject 时则停止上传,resolve 时开始上传( resolve 传入 `File``Blob` 对象则上传 resolve 传入对象)。 | (file, fileList) => `boolean` \| `Promise` || |
2626
| customRequest | 通过覆盖默认的上传行为,可以自定义自己的上传实现 | Function || | |
2727
| data | 上传所需参数或返回上传参数的方法 | object\|(file) => object || | |
28-
| directory | 支持上传文件夹([caniuse](https://caniuse.com/#feat=input-file-directory)| boolean | false | | |
2928
| directory | 支持上传文件夹([caniuse](https://caniuse.com/#feat=input-file-directory)| boolean | false | 3.0 | |
3029
| disabled | 是否禁用 | boolean | false | | |
3130
| downloadIcon | 自定义下载 icon | v-slot:iconRender="{file: UploadFile}" | - | 3.0 | |

components/vc-image/src/Preview.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ const Preview = defineComponent({
295295
},
296296
{ flush: 'post', immediate: true },
297297
);
298+
watch([lastWheelZoomDirection], () => {
299+
const { wheelDirection } = lastWheelZoomDirection.value;
300+
if (wheelDirection > 0) {
301+
onZoomOut();
302+
} else if (wheelDirection < 0) {
303+
onZoomIn();
304+
}
305+
});
298306
});
299307
onUnmounted(() => {
300308
removeListeners();

0 commit comments

Comments
 (0)