Merge pull request #24118 from ant-design/master-to-merge-feature

chore: merge master into feature
This commit is contained in:
偏右 2020-05-13 17:55:20 +08:00 committed by GitHub
commit 41dd9560c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 514 additions and 161 deletions

View File

@ -1,20 +1,17 @@
name: Automatic Rebase
# https://github.com/marketplace/actions/automatic-rebase
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.2
uses: cirrus-actions/rebase@1.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -24,15 +24,9 @@ describe('Wave component', () => {
</Wave>,
);
expect(wrapper.find('button').getDOMNode().className).toBe('');
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
expect(
wrapper
.find('button')
.getDOMNode()
.hasAttribute('ant-click-animating-without-extra-node'),
wrapper.find('button').getDOMNode().hasAttribute('ant-click-animating-without-extra-node'),
).toBe(false);
wrapper.unmount();
process.env.NODE_ENV = TEST_NODE_ENV;
@ -45,15 +39,9 @@ describe('Wave component', () => {
</Wave>,
);
expect(wrapper.find('button').getDOMNode().className).toBe('');
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
expect(
wrapper
.find('button')
.getDOMNode()
.getAttribute('ant-click-animating-without-extra-node'),
wrapper.find('button').getDOMNode().getAttribute('ant-click-animating-without-extra-node'),
).toBe('false');
wrapper.unmount();
});
@ -66,10 +54,7 @@ describe('Wave component', () => {
</button>
</Wave>,
);
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(0);
@ -84,10 +69,7 @@ describe('Wave component', () => {
</button>
</Wave>,
);
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
await sleep(200);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(1);
@ -101,10 +83,7 @@ describe('Wave component', () => {
<div style={{ borderTopColor: 'blue' }}>button</div>
</Wave>,
);
wrapper
.find('div')
.getDOMNode()
.click();
wrapper.find('div').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(1);
@ -118,10 +97,7 @@ describe('Wave component', () => {
<div style={{ backgroundColor: 'green' }}>button</div>
</Wave>,
);
wrapper
.find('div')
.getDOMNode()
.click();
wrapper.find('div').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(1);
@ -135,10 +111,7 @@ describe('Wave component', () => {
<div style={{ borderColor: 'yellow', backgroundColor: 'green' }}>button</div>
</Wave>,
);
wrapper
.find('div')
.getDOMNode()
.click();
wrapper.find('div').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(1);
@ -154,10 +127,7 @@ describe('Wave component', () => {
</button>
</Wave>,
);
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles.length).toBe(0);
@ -172,10 +142,7 @@ describe('Wave component', () => {
</Wave>
</ConfigProvider>,
);
wrapper
.find('button')
.getDOMNode()
.click();
wrapper.find('button').getDOMNode().click();
await sleep(0);
const styles = document.getElementsByTagName('style');
expect(styles[0].getAttribute('nonce')).toBe('YourNonceCode');

View File

@ -254,7 +254,6 @@
.button-size(
@btn-height-sm; @btn-padding-horizontal-sm; @btn-font-size-sm; @btn-border-radius-sm
);
line-height: @btn-height-sm - 2px;
}
}
// primary button style

View File

@ -11601,6 +11601,7 @@ exports[`ConfigProvider components DatePicker DatePicker configProvider 1`] = `
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11645,6 +11646,7 @@ exports[`ConfigProvider components DatePicker DatePicker configProvider componen
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11689,6 +11691,7 @@ exports[`ConfigProvider components DatePicker DatePicker configProvider componen
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11733,6 +11736,7 @@ exports[`ConfigProvider components DatePicker DatePicker configProvider virtual
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11777,6 +11781,7 @@ exports[`ConfigProvider components DatePicker DatePicker normal 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11821,6 +11826,7 @@ exports[`ConfigProvider components DatePicker DatePicker prefixCls 1`] = `
class="prefix-DatePicker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -11865,6 +11871,7 @@ exports[`ConfigProvider components DatePicker MonthPicker configProvider 1`] = `
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -11909,6 +11916,7 @@ exports[`ConfigProvider components DatePicker MonthPicker configProvider compone
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -11953,6 +11961,7 @@ exports[`ConfigProvider components DatePicker MonthPicker configProvider compone
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -11997,6 +12006,7 @@ exports[`ConfigProvider components DatePicker MonthPicker configProvider virtual
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -12041,6 +12051,7 @@ exports[`ConfigProvider components DatePicker MonthPicker normal 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -12085,6 +12096,7 @@ exports[`ConfigProvider components DatePicker MonthPicker prefixCls 1`] = `
class="prefix-MonthPicker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -12129,6 +12141,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider 1`] = `
class="config-picker-input config-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12168,6 +12181,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider 1`] = `
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12215,6 +12229,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider compone
class="config-picker-input config-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12254,6 +12269,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider compone
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12301,6 +12317,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider compone
class="config-picker-input config-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12340,6 +12357,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider compone
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12387,6 +12405,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider virtual
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12426,6 +12445,7 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider virtual
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12473,6 +12493,7 @@ exports[`ConfigProvider components DatePicker RangePicker normal 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12512,6 +12533,7 @@ exports[`ConfigProvider components DatePicker RangePicker normal 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12559,6 +12581,7 @@ exports[`ConfigProvider components DatePicker RangePicker prefixCls 1`] = `
class="prefix-RangePicker-input prefix-RangePicker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -12598,6 +12621,7 @@ exports[`ConfigProvider components DatePicker RangePicker prefixCls 1`] = `
class="prefix-RangePicker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -12645,6 +12669,7 @@ exports[`ConfigProvider components DatePicker WeekPicker configProvider 1`] = `
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -12689,6 +12714,7 @@ exports[`ConfigProvider components DatePicker WeekPicker configProvider componen
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -12733,6 +12759,7 @@ exports[`ConfigProvider components DatePicker WeekPicker configProvider componen
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -12777,6 +12804,7 @@ exports[`ConfigProvider components DatePicker WeekPicker configProvider virtual
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -12821,6 +12849,7 @@ exports[`ConfigProvider components DatePicker WeekPicker normal 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -12865,6 +12894,7 @@ exports[`ConfigProvider components DatePicker WeekPicker prefixCls 1`] = `
class="prefix-WeekPicker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -25749,6 +25779,7 @@ Array [
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -27160,6 +27191,7 @@ Array [
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -28571,6 +28603,7 @@ Array [
class="config-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -29982,6 +30015,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -31393,6 +31427,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -32804,6 +32839,7 @@ Array [
class="prefix-TimePicker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"

View File

@ -9,6 +9,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -607,6 +608,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Избери дата"
readonly=""
size="12"

View File

@ -8,6 +8,7 @@ exports[`RangePicker customize separator 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -23,6 +24,7 @@ exports[`RangePicker customize separator 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -69,6 +71,7 @@ Array [
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -108,6 +111,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"

View File

@ -9,6 +9,7 @@ exports[`WeekPicker should support style prop 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"

View File

@ -9,6 +9,7 @@ exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -49,6 +50,7 @@ exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -89,6 +91,7 @@ exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -129,6 +132,7 @@ exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select quarter"
readonly=""
size="12"
@ -169,6 +173,7 @@ exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select year"
readonly=""
size="12"
@ -213,6 +218,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -253,6 +259,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -293,6 +300,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -333,6 +341,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select year"
readonly=""
size="12"
@ -373,6 +382,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -412,6 +422,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -455,6 +466,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start week"
readonly=""
size="12"
@ -494,6 +506,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End week"
readonly=""
size="12"
@ -537,6 +550,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start month"
readonly=""
size="12"
@ -576,6 +590,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End month"
readonly=""
size="12"
@ -619,6 +634,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start year"
readonly=""
size="12"
@ -658,6 +674,7 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End year"
readonly=""
size="12"
@ -705,6 +722,7 @@ exports[`renders ./components/date-picker/demo/date-render.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -744,6 +762,7 @@ exports[`renders ./components/date-picker/demo/date-render.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -783,6 +802,7 @@ exports[`renders ./components/date-picker/demo/date-render.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -830,6 +850,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
disabled=""
placeholder="Select date"
readonly=""
@ -871,6 +892,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
disabled=""
placeholder="Select month"
readonly=""
@ -912,6 +934,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
disabled=""
placeholder="Start date"
readonly=""
@ -952,6 +975,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
disabled=""
placeholder="End date"
readonly=""
@ -996,6 +1020,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -1035,6 +1060,7 @@ exports[`renders ./components/date-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
disabled=""
placeholder="End date"
readonly=""
@ -1107,6 +1133,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="21"
@ -1147,6 +1174,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -1187,6 +1215,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -1226,6 +1255,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -1268,6 +1298,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="21"
@ -1307,6 +1338,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="21"
@ -1354,6 +1386,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -1394,6 +1427,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="21"
@ -1434,6 +1468,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -1473,6 +1508,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -1516,6 +1552,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="21"
@ -1555,6 +1592,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="21"
@ -1598,6 +1636,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -1642,6 +1681,7 @@ exports[`renders ./components/date-picker/demo/format.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -1706,6 +1746,7 @@ exports[`renders ./components/date-picker/demo/format.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -1770,6 +1811,7 @@ exports[`renders ./components/date-picker/demo/format.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -1834,6 +1876,7 @@ exports[`renders ./components/date-picker/demo/format.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -1873,6 +1916,7 @@ exports[`renders ./components/date-picker/demo/format.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -1944,6 +1988,7 @@ exports[`renders ./components/date-picker/demo/mode.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="21"
@ -1984,6 +2029,7 @@ exports[`renders ./components/date-picker/demo/mode.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start month"
readonly=""
size="12"
@ -2023,6 +2069,7 @@ exports[`renders ./components/date-picker/demo/mode.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End month"
readonly=""
size="12"
@ -2070,6 +2117,7 @@ exports[`renders ./components/date-picker/demo/presetted-ranges.md correctly 1`]
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -2109,6 +2157,7 @@ exports[`renders ./components/date-picker/demo/presetted-ranges.md correctly 1`]
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -2152,6 +2201,7 @@ exports[`renders ./components/date-picker/demo/presetted-ranges.md correctly 1`]
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="21"
@ -2191,6 +2241,7 @@ exports[`renders ./components/date-picker/demo/presetted-ranges.md correctly 1`]
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="21"
@ -2238,6 +2289,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -2277,6 +2329,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -2320,6 +2373,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="21"
@ -2359,6 +2413,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="21"
@ -2402,6 +2457,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start week"
readonly=""
size="12"
@ -2441,6 +2497,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End week"
readonly=""
size="12"
@ -2484,6 +2541,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start month"
readonly=""
size="12"
@ -2523,6 +2581,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End month"
readonly=""
size="12"
@ -2566,6 +2625,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start year"
readonly=""
size="12"
@ -2605,6 +2665,7 @@ exports[`renders ./components/date-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End year"
readonly=""
size="12"
@ -2651,6 +2712,7 @@ exports[`renders ./components/date-picker/demo/select-in-range.md correctly 1`]
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -2690,6 +2752,7 @@ exports[`renders ./components/date-picker/demo/select-in-range.md correctly 1`]
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -2800,6 +2863,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -2840,6 +2904,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -2880,6 +2945,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -2919,6 +2985,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -2962,6 +3029,7 @@ exports[`renders ./components/date-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -3006,6 +3074,7 @@ exports[`renders ./components/date-picker/demo/start-end.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Start"
readonly=""
size="21"
@ -3045,6 +3114,7 @@ exports[`renders ./components/date-picker/demo/start-end.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End"
readonly=""
size="21"
@ -3089,6 +3159,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -3129,6 +3200,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -3169,6 +3241,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -3208,6 +3281,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -3251,6 +3325,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -3291,6 +3366,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -3312,6 +3388,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -3333,6 +3410,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -3372,6 +3450,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -3396,6 +3475,7 @@ exports[`renders ./components/date-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -3421,6 +3501,7 @@ exports[`renders ./components/date-picker/demo/time.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="21"
@ -3461,6 +3542,7 @@ exports[`renders ./components/date-picker/demo/time.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="18"
@ -3500,6 +3582,7 @@ exports[`renders ./components/date-picker/demo/time.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="18"

View File

@ -8,6 +8,7 @@ exports[`mount rtl render component should be rendered correctly in RTL directio
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -50,6 +51,7 @@ exports[`mount rtl render component should be rendered correctly in RTL directio
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -92,6 +94,7 @@ exports[`mount rtl render component should be rendered correctly in RTL directio
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select week"
readonly=""
size="12"
@ -134,6 +137,7 @@ exports[`mount rtl render component should be rendered correctly in RTL directio
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -173,6 +177,7 @@ exports[`mount rtl render component should be rendered correctly in RTL directio
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"

View File

@ -788,6 +788,7 @@ exports[`Picker format by locale date 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="请选择日期"
readonly=""
size="12"
@ -854,6 +855,7 @@ exports[`Picker format by locale dateTime 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="请选择日期"
readonly=""
size="21"
@ -920,6 +922,7 @@ exports[`Picker format by locale month 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="请选择月份"
readonly=""
size="12"
@ -986,6 +989,7 @@ exports[`Picker format by locale week 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="请选择周"
readonly=""
size="12"

View File

@ -3183,6 +3183,7 @@ exports[`renders ./components/form/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -3429,6 +3430,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
id="time_related_controls_date-picker"
placeholder="Select date"
readonly=""
@ -3496,6 +3498,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
id="time_related_controls_date-time-picker"
placeholder="Select date"
readonly=""
@ -3563,6 +3566,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
id="time_related_controls_month-picker"
placeholder="Select month"
readonly=""
@ -3630,6 +3634,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
id="time_related_controls_range-picker"
placeholder="Start date"
readonly=""
@ -3670,6 +3675,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -3739,6 +3745,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
id="time_related_controls_range-time-picker"
placeholder="Start date"
readonly=""
@ -3779,6 +3786,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="21"
@ -3848,6 +3856,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
id="time_related_controls_time-picker"
placeholder="Select time"
readonly=""
@ -5633,6 +5642,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -5723,6 +5733,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -6029,6 +6040,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -6097,6 +6109,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"

View File

@ -85,7 +85,7 @@ describe('Form', () => {
await change(wrapper, 1, '');
wrapper.update();
await sleep(100);
await sleep(300);
expect(wrapper.find('.ant-form-item-explain').length).toBe(1);
await operate('.remove');

View File

@ -249,7 +249,7 @@ validateFields()
#### Rule
Rule 支持接收 object 进行配置,也支持 function 来动态获取 from 的数据:
Rule 支持接收 object 进行配置,也支持 function 来动态获取 form 的数据:
```tsx
type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);

View File

@ -435,6 +435,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -475,6 +476,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -692,6 +694,7 @@ Array [
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -731,6 +734,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"
@ -773,6 +777,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select month"
readonly=""
size="12"
@ -1379,6 +1384,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select date"
readonly=""
size="12"
@ -1430,6 +1436,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start date"
readonly=""
size="12"
@ -1469,6 +1476,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End date"
readonly=""
size="12"

View File

@ -40,7 +40,8 @@
&-dark &-item,
&-dark &-item-group-title,
&-dark &-item > a {
&-dark &-item > a,
&-dark &-item > span > a {
color: @menu-dark-color;
}
@ -76,7 +77,8 @@
&-dark &-submenu-title:hover {
color: @menu-dark-highlight-color;
background-color: transparent;
> a {
> a,
> span > a {
color: @menu-dark-highlight-color;
}
> .@{menu-prefix-cls}-submenu-title,
@ -105,7 +107,9 @@
border-right: 0;
}
> a,
> a:hover {
> span > a,
> a:hover,
> span > a:hover {
color: @menu-dark-highlight-color;
}
.@{iconfont-css-prefix} {
@ -125,7 +129,8 @@
&-dark &-item-disabled,
&-dark &-submenu-disabled {
&,
> a {
> a,
> span > a {
color: @disabled-color-dark !important;
opacity: 0.8;
}

View File

@ -66,6 +66,7 @@
.@{select-prefix-cls}-rtl& {
margin-right: 0;
margin-left: @input-padding-vertical-base;
padding: 0 @padding-xs 0 (@padding-xs / 2);
text-align: right;
}
// It's ok not to do this, but 24px makes bottom narrow in view should adjust

View File

@ -40,9 +40,9 @@
@btn-padding-horizontal-base: @default-padding-sm - 1px;
@btn-padding-horizontal-lg: @btn-padding-horizontal-base;
@btn-padding-horizontal-sm: @default-padding-xs - 1px;
@btn-square-only-icon-size: 14px;
@btn-square-only-icon-size-sm: 14px;
@btn-square-only-icon-size-lg: 16px;
@btn-square-only-icon-size: 14px;
@btn-square-only-icon-size-sm: 12px;
// Breadcrumb
// ---

View File

@ -5,7 +5,7 @@ import RcTable, { Summary } from 'rc-table';
import { TableProps as RcTableProps, INTERNAL_HOOKS } from 'rc-table/lib/Table';
import { convertChildrenToColumns } from 'rc-table/lib/hooks/useColumns';
import Spin, { SpinProps } from '../spin';
import Pagination, { PaginationConfig } from '../pagination';
import Pagination from '../pagination';
import { ConfigContext } from '../config-provider/context';
import usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from './hooks/usePagination';
import useLazyKVMap from './hooks/useLazyKVMap';
@ -72,7 +72,7 @@ export interface TableProps<RecordType>
locale?: TableLocale;
onChange?: (
pagination: PaginationConfig,
pagination: TablePaginationConfig,
filters: Record<string, Key[] | null>,
sorter: SorterResult<RecordType> | SorterResult<RecordType>[],
extra: TableCurrentDataSource<RecordType>,
@ -396,7 +396,7 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) {
let topPaginationNode: React.ReactNode;
let bottomPaginationNode: React.ReactNode;
if (pagination !== false) {
let paginationSize: PaginationConfig['size'];
let paginationSize: TablePaginationConfig['size'];
if (mergedPagination.size) {
paginationSize = mergedPagination.size;
} else {

View File

@ -9,6 +9,7 @@ exports[`renders ./components/time-picker/demo/12hours.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="12"
@ -52,6 +53,7 @@ exports[`renders ./components/time-picker/demo/12hours.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="11"
@ -94,6 +96,7 @@ exports[`renders ./components/time-picker/demo/12hours.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -140,6 +143,7 @@ exports[`renders ./components/time-picker/demo/addon.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -185,6 +189,7 @@ exports[`renders ./components/time-picker/demo/basic.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -230,6 +235,7 @@ exports[`renders ./components/time-picker/demo/colored-popup.md correctly 1`] =
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -275,6 +281,7 @@ exports[`renders ./components/time-picker/demo/disabled.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
disabled=""
placeholder="Select time"
readonly=""
@ -321,6 +328,7 @@ exports[`renders ./components/time-picker/demo/hide-column.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -390,6 +398,7 @@ exports[`renders ./components/time-picker/demo/interval-options.md correctly 1`]
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -436,6 +445,7 @@ exports[`renders ./components/time-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input ant-picker-input-active"
>
<input
autocomplete="off"
placeholder="Start time"
readonly=""
size="10"
@ -475,6 +485,7 @@ exports[`renders ./components/time-picker/demo/range-picker.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="End time"
readonly=""
size="10"
@ -525,6 +536,7 @@ exports[`renders ./components/time-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -591,6 +603,7 @@ exports[`renders ./components/time-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -657,6 +670,7 @@ exports[`renders ./components/time-picker/demo/size.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -727,6 +741,7 @@ exports[`renders ./components/time-picker/demo/suffix.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -769,6 +784,7 @@ exports[`renders ./components/time-picker/demo/value.md correctly 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"

View File

@ -8,6 +8,7 @@ exports[`TimePicker not render clean icon when allowClear is false 1`] = `
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -54,6 +55,7 @@ Array [
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"
@ -1488,6 +1490,7 @@ exports[`TimePicker rtl render component should be rendered correctly in RTL dir
class="ant-picker-input"
>
<input
autocomplete="off"
placeholder="Select time"
readonly=""
size="10"

View File

@ -2,72 +2,70 @@
@tree-prefix-cls: ~'@{ant-prefix}-tree';
.@{tree-prefix-cls} {
&.@{tree-prefix-cls}-directory {
// ================== TreeNode ==================
.@{tree-prefix-cls}-treenode {
position: relative;
.@{tree-prefix-cls}.@{tree-prefix-cls}-directory {
// ================== TreeNode ==================
.@{tree-prefix-cls}-treenode {
position: relative;
// Hover color
// Hover color
&::before {
position: absolute;
top: 0;
right: 0;
bottom: 4px;
left: 0;
transition: background-color 0.3s;
content: '';
pointer-events: none;
}
&:hover {
&::before {
position: absolute;
top: 0;
right: 0;
bottom: 4px;
left: 0;
transition: background-color 0.3s;
content: '';
pointer-events: none;
background: @item-hover-bg;
}
}
// Elements
> * {
z-index: 1;
}
// >>> Switcher
.@{tree-prefix-cls}-switcher {
transition: color 0.3s;
}
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
border-radius: 0;
user-select: none;
&:hover {
&::before {
background: @item-hover-bg;
}
background: transparent;
}
// Elements
> * {
z-index: 1;
&.@{tree-prefix-cls}-node-selected {
color: @tree-directory-selected-color;
background: transparent;
}
}
// ============= Selected =============
&-selected {
&:hover::before,
&::before {
background: @primary-color;
}
// >>> Switcher
.@{tree-prefix-cls}-switcher {
transition: color 0.3s;
color: @tree-directory-selected-color;
}
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
border-radius: 0;
user-select: none;
&:hover {
background: transparent;
}
&.@{tree-prefix-cls}-node-selected {
color: @tree-directory-selected-color;
background: transparent;
}
}
// ============= Selected =============
&-selected {
&:hover::before,
&::before {
background: @primary-color;
}
// >>> Switcher
.@{tree-prefix-cls}-switcher {
color: @tree-directory-selected-color;
}
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
color: @tree-directory-selected-color;
background: transparent;
}
color: @tree-directory-selected-color;
background: transparent;
}
}
}

View File

@ -10,8 +10,9 @@
.antCheckboxFn(@checkbox-prefix-cls: ~'@{ant-prefix}-tree-checkbox');
.antTreeFn(@tree-prefix-cls) {
.@{tree-prefix-cls} {
.antTreeFn(@custom-tree-prefix-cls) {
@custom-tree-node-prefix-cls: ~'@{custom-tree-prefix-cls}-treenode';
.@{custom-tree-prefix-cls} {
.reset-component;
background: @tree-bg;
border-radius: @border-radius-base;
@ -26,19 +27,19 @@
align-items: flex-start;
}
&.@{tree-prefix-cls}-block-node {
.@{tree-prefix-cls}-list-holder-inner {
&.@{custom-tree-prefix-cls}-block-node {
.@{custom-tree-prefix-cls}-list-holder-inner {
align-items: stretch;
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
.@{custom-tree-prefix-cls}-node-content-wrapper {
flex: auto;
}
}
}
// ===================== TreeNode =====================
.@{tree-node-prefix-cls} {
.@{custom-tree-node-prefix-cls} {
display: flex;
align-items: flex-start;
padding: 0 0 (@padding-xs / 2) 0;
@ -46,7 +47,7 @@
// Disabled
&-disabled {
// >>> Title
.@{tree-prefix-cls}-node-content-wrapper {
.@{custom-tree-prefix-cls}-node-content-wrapper {
color: @disabled-color;
cursor: not-allowed;
@ -56,7 +57,7 @@
}
}
&-active .@{tree-prefix-cls}-node-content-wrapper {
&-active .@{custom-tree-prefix-cls}-node-content-wrapper {
background: @tree-node-hover-bg;
}
}
@ -90,7 +91,7 @@
}
&_close {
.@{tree-prefix-cls}-switcher-icon {
.@{custom-tree-prefix-cls}-switcher-icon {
svg {
transform: rotate(-90deg);
}
@ -123,12 +124,13 @@
&:hover {
background-color: @tree-node-hover-bg;
}
&.@{tree-prefix-cls}-node-selected {
&.@{custom-tree-prefix-cls}-node-selected {
background-color: @tree-node-selected-bg;
}
// Icon
.@{tree-prefix-cls}-iconEle {
.@{custom-tree-prefix-cls}-iconEle {
display: inline-block;
width: @tree-title-height;
height: @tree-title-height;
@ -149,19 +151,19 @@
user-select: none;
}
.@{tree-node-prefix-cls}.drag-over {
.@{custom-tree-node-prefix-cls}.drag-over {
> [draggable] {
color: white;
background-color: @primary-color;
opacity: 0.8;
}
}
.@{tree-node-prefix-cls}.drag-over-gap-top {
.@{custom-tree-node-prefix-cls}.drag-over-gap-top {
> [draggable] {
border-top-color: @primary-color;
}
}
.@{tree-node-prefix-cls}.drag-over-gap-bottom {
.@{custom-tree-node-prefix-cls}.drag-over-gap-bottom {
> [draggable] {
border-bottom-color: @primary-color;
}
@ -170,7 +172,7 @@
// ==================== Show Line =====================
&-show-line {
// ================ Indent lines ================
.@{tree-prefix-cls}-indent {
.@{custom-tree-prefix-cls}-indent {
&-unit {
position: relative;
height: 100%;
@ -193,8 +195,8 @@
}
/* Motion should hide line of measure */
.@{tree-node-prefix-cls}-motion:not(.@{tree-motion}-leave):not(.@{tree-motion}-appear-active) {
.@{tree-prefix-cls}-indent-unit {
.@{custom-tree-node-prefix-cls}-motion:not(.@{tree-motion}-leave):not(.@{tree-motion}-appear-active) {
.@{custom-tree-prefix-cls}-indent-unit {
&::before {
display: none;
}
@ -202,7 +204,7 @@
}
// ============== Cover Background ==============
.@{tree-prefix-cls}-switcher {
.@{custom-tree-prefix-cls}-switcher {
z-index: 1;
background: @component-background;
}

View File

@ -5,43 +5,41 @@
@tree-prefix-cls: ~'@{ant-prefix}-tree';
@tree-node-prefix-cls: ~'@{tree-prefix-cls}-treenode';
.antTreeFn(@tree-prefix-cls) {
.@{tree-prefix-cls} {
.@{tree-prefix-cls} {
&-rtl {
direction: rtl;
}
// ===================== TreeNode =====================
.@{tree-node-prefix-cls} {
&-rtl {
direction: rtl;
}
}
// ===================== TreeNode =====================
.@{tree-node-prefix-cls} {
&-rtl {
direction: rtl;
}
}
// >>> Switcher
& &-switcher {
&_close {
.@{tree-prefix-cls}-switcher-icon {
svg {
.@{tree-prefix-cls}-rtl& {
transform: rotate(90deg);
}
// >>> Switcher
& &-switcher {
&_close {
.@{tree-prefix-cls}-switcher-icon {
svg {
.@{tree-prefix-cls}-rtl& {
transform: rotate(90deg);
}
}
}
}
// ==================== Show Line =====================
&-show-line {
// ================ Indent lines ================
.@{tree-prefix-cls}-indent {
&-unit {
&::before {
.@{tree-prefix-cls}-rtl& {
right: auto;
left: -@tree-title-height / 2;
border-right: none;
border-left: 1px solid @border-color-base;
}
}
// ==================== Show Line =====================
&-show-line {
// ================ Indent lines ================
.@{tree-prefix-cls}-indent {
&-unit {
&::before {
.@{tree-prefix-cls}-rtl& {
right: auto;
left: -@tree-title-height / 2;
border-right: none;
border-left: 1px solid @border-color-base;
}
}
}

View File

@ -76,7 +76,7 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
// Reduce non-minified dist files size
config.optimization.usedExports = true;
// use esbuild
if (process.env.CSB_REPO) {
if (process.env.ESBUILD) {
config.optimization.minimizer[0] = new EsbuildPlugin();
}
// skip codesandbox ci