Merge branch 'vueComponent:main' into feat/imagePreviewPlaceholder

pull/8322/head
Sean 2025-09-01 16:59:06 +08:00 committed by GitHub
commit ea5e27224f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 30 additions and 22 deletions

View File

@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: cache package-lock.json - name: cache package-lock.json
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
@ -27,7 +27,7 @@ jobs:
- name: cache node_modules - name: cache node_modules
id: node_modules_cache_id id: node_modules_cache_id
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -52,13 +52,13 @@ jobs:
# submodules: true # submodules: true
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

View File

@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: cache package-lock.json - name: cache package-lock.json
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
@ -27,7 +27,7 @@ jobs:
- name: cache node_modules - name: cache node_modules
id: node_modules_cache_id id: node_modules_cache_id
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -43,25 +43,25 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: cache lib - name: cache lib
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: lib path: lib
key: lib-${{ github.sha }} key: lib-${{ github.sha }}
- name: cache es - name: cache es
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: es path: es
key: es-${{ github.sha }} key: es-${{ github.sha }}
@ -77,13 +77,13 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -99,13 +99,13 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

View File

@ -21,7 +21,7 @@ If you want specific control over the positioning and placement of the `Icon`, t
<template> <template>
<a-space direction="vertical"> <a-space direction="vertical">
<a-space warp> <a-space wrap>
<a-tooltip title="search"> <a-tooltip title="search">
<a-button type="primary" shape="circle" :icon="h(SearchOutlined)" /> <a-button type="primary" shape="circle" :icon="h(SearchOutlined)" />
</a-tooltip> </a-tooltip>
@ -32,7 +32,7 @@ If you want specific control over the positioning and placement of the `Icon`, t
</a-tooltip> </a-tooltip>
<a-button :icon="h(SearchOutlined)">Search</a-button> <a-button :icon="h(SearchOutlined)">Search</a-button>
</a-space> </a-space>
<a-space warp> <a-space wrap>
<a-tooltip title="search"> <a-tooltip title="search">
<a-button shape="circle" :icon="h(SearchOutlined)" /> <a-button shape="circle" :icon="h(SearchOutlined)" />
</a-tooltip> </a-tooltip>

View File

@ -182,6 +182,7 @@ const genBaseStyle: GenerateStyle<SliderToken> = token => {
borderRadius: '50%', borderRadius: '50%',
cursor: 'pointer', cursor: 'pointer',
transition: `border-color ${token.motionDurationSlow}`, transition: `border-color ${token.motionDurationSlow}`,
pointerEvents: 'auto',
'&-active': { '&-active': {
borderColor: token.colorPrimaryBorder, borderColor: token.colorPrimaryBorder,

View File

@ -840,6 +840,7 @@ export default defineComponent({
customizeRawInputElement, customizeRawInputElement,
{ {
ref: selectorDomRef, ref: selectorDomRef,
tabindex: 0,
}, },
false, false,
true, true,
@ -877,7 +878,11 @@ export default defineComponent({
// Render raw // Render raw
if (customizeRawInputElement) { if (customizeRawInputElement) {
renderNode = selectorNode; renderNode = (
<div onKeydown={onInternalKeyDown} onKeyup={onInternalKeyUp}>
{selectorNode}
</div>
);
} else { } else {
renderNode = ( renderNode = (
<div <div

View File

@ -151,7 +151,7 @@ const SelectSelector = defineComponent<SelectorProps>({
) { ) {
const onMouseDown = (e: MouseEvent) => { const onMouseDown = (e: MouseEvent) => {
onPreventMouseDown(e); onPreventMouseDown(e);
props.onToggleOpen(!open); props.onToggleOpen(!props.open);
}; };
let originData = option; let originData = option;
// For TreeSelect // For TreeSelect

View File

@ -2,11 +2,13 @@ import type { BaseOptionType, DefaultOptionType, RawValueType, FieldNames } from
import { warning } from '../../vc-util/warning'; import { warning } from '../../vc-util/warning';
import type { FlattenOptionData } from '../interface'; import type { FlattenOptionData } from '../interface';
function getKey(data: BaseOptionType, index: number) { function getKey(data: BaseOptionType, index: number, fieldNames?: FieldNames) {
const { key } = data; const { key } = data;
let value: RawValueType; let value: RawValueType;
if ('value' in data) { if (fieldNames && fieldNames.value && data[fieldNames.value] !== undefined) {
({ [fieldNames.value]: value } = data);
} else if ('value' in data) {
({ value } = data); ({ value } = data);
} }
@ -54,7 +56,7 @@ export function flattenOptions<OptionType extends BaseOptionType = DefaultOption
const value = data[fieldValue]; const value = data[fieldValue];
// Option // Option
flattenList.push({ flattenList.push({
key: getKey(data, flattenList.length), key: getKey(data, flattenList.length, fieldNames),
groupOption: isGroupOption, groupOption: isGroupOption,
data, data,
label, label,
@ -67,7 +69,7 @@ export function flattenOptions<OptionType extends BaseOptionType = DefaultOption
} }
// Option Group // Option Group
flattenList.push({ flattenList.push({
key: getKey(data, flattenList.length), key: getKey(data, flattenList.length, fieldNames),
group: true, group: true,
data, data,
label: grpLabel, label: grpLabel,