chore: remove require
parent
d57a2acd87
commit
2cbc72f617
|
@ -1 +1 @@
|
|||
Subproject commit 5a00801c5012248ce32d8ed7a4164da3a5fde90f
|
||||
Subproject commit 7c607950a297b2635264abf208d1a1ce64e502de
|
|
@ -1,23 +1,3 @@
|
|||
// matchMedia polyfill for
|
||||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||||
let enquire;
|
||||
|
||||
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
|
||||
if (typeof window !== 'undefined') {
|
||||
const matchMediaPolyfill = mediaQuery => {
|
||||
return {
|
||||
media: mediaQuery,
|
||||
matches: false,
|
||||
addListener() {},
|
||||
removeListener() {},
|
||||
};
|
||||
};
|
||||
// ref: https://github.com/ant-design/ant-design/issues/18774
|
||||
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
|
||||
// eslint-disable-next-line global-require
|
||||
enquire = require('enquire.js');
|
||||
}
|
||||
|
||||
export const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
||||
|
||||
export const responsiveMap = {
|
||||
|
@ -29,65 +9,54 @@ export const responsiveMap = {
|
|||
xxl: '(min-width: 1600px)',
|
||||
};
|
||||
|
||||
let subscribers = [];
|
||||
const subscribers = new Map();
|
||||
let subUid = -1;
|
||||
let screens = {};
|
||||
|
||||
const responsiveObserve = {
|
||||
matchHandlers: {},
|
||||
dispatch(pointMap) {
|
||||
screens = pointMap;
|
||||
if (subscribers.length < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
subscribers.forEach(item => {
|
||||
item.func(screens);
|
||||
});
|
||||
|
||||
return true;
|
||||
subscribers.forEach(func => func(screens));
|
||||
return subscribers.size >= 1;
|
||||
},
|
||||
subscribe(func) {
|
||||
if (subscribers.length === 0) {
|
||||
this.register();
|
||||
}
|
||||
const token = (++subUid).toString();
|
||||
subscribers.push({
|
||||
token,
|
||||
func,
|
||||
});
|
||||
if (!subscribers.size) this.register();
|
||||
subUid += 1;
|
||||
subscribers.set(subUid, func);
|
||||
func(screens);
|
||||
return token;
|
||||
return subUid;
|
||||
},
|
||||
unsubscribe(token) {
|
||||
subscribers = subscribers.filter(item => item.token !== token);
|
||||
if (subscribers.length === 0) {
|
||||
this.unregister();
|
||||
}
|
||||
subscribers.delete(token);
|
||||
if (!subscribers.size) this.unregister();
|
||||
},
|
||||
unregister() {
|
||||
Object.keys(responsiveMap).map(screen => enquire.unregister(responsiveMap[screen]));
|
||||
Object.keys(responsiveMap).forEach(screen => {
|
||||
const matchMediaQuery = responsiveMap[screen];
|
||||
const handler = this.matchHandlers[matchMediaQuery];
|
||||
handler?.mql.removeListener(handler?.listener);
|
||||
});
|
||||
subscribers.clear();
|
||||
},
|
||||
register() {
|
||||
Object.keys(responsiveMap).map(screen =>
|
||||
enquire.register(responsiveMap[screen], {
|
||||
match: () => {
|
||||
const pointMap = {
|
||||
...screens,
|
||||
[screen]: true,
|
||||
};
|
||||
this.dispatch(pointMap);
|
||||
},
|
||||
unmatch: () => {
|
||||
const pointMap = {
|
||||
...screens,
|
||||
[screen]: false,
|
||||
};
|
||||
this.dispatch(pointMap);
|
||||
},
|
||||
// Keep a empty destroy to avoid triggering unmatch when unregister
|
||||
destroy() {},
|
||||
}),
|
||||
);
|
||||
Object.keys(responsiveMap).forEach(screen => {
|
||||
const matchMediaQuery = responsiveMap[screen];
|
||||
const listener = ({ matches }) => {
|
||||
this.dispatch({
|
||||
...screens,
|
||||
[screen]: matches,
|
||||
});
|
||||
};
|
||||
const mql = window.matchMedia(matchMediaQuery);
|
||||
mql.addListener(listener);
|
||||
this.matchHandlers[matchMediaQuery] = {
|
||||
mql,
|
||||
listener,
|
||||
};
|
||||
|
||||
listener(mql);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -314,28 +314,28 @@ exports[`renders ./antdv-demo/docs/carousel/demo/fade.md correctly 1`] = `
|
|||
<!---->
|
||||
<div class="slick-list">
|
||||
<div class="slick-track" style="width: 900%; left: -100%;">
|
||||
<div tabindex="-1" data-index="0" aria-hidden="false" class="slick-slide slick-active slick-current" style="outline: none; position: relative; opacity: 1; transition: opacity 500ms ease, visibility 500ms ease; width: 11.11111111111111%; left: 0px;">
|
||||
<div tabindex="-1" data-index="0" aria-hidden="false" class="slick-slide slick-active slick-current" style="outline: none; width: 11.11111111111111%; position: relative; left: 0px; opacity: 1; transition: opacity 500ms ease, visibility 500ms ease;">
|
||||
<div>
|
||||
<div tabindex="-1" style="width: 100%; display: inline-block;">
|
||||
<h3>1</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tabindex="-1" data-index="1" aria-hidden="true" class="slick-slide" style="outline: none; position: relative; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease; width: 11.11111111111111%; left: -11px;">
|
||||
<div tabindex="-1" data-index="1" aria-hidden="true" class="slick-slide" style="outline: none; width: 11.11111111111111%; position: relative; left: -11px; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease;">
|
||||
<div>
|
||||
<div tabindex="-1" style="width: 100%; display: inline-block;">
|
||||
<h3>2</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tabindex="-1" data-index="2" aria-hidden="true" class="slick-slide" style="outline: none; position: relative; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease; width: 11.11111111111111%; left: -22px;">
|
||||
<div tabindex="-1" data-index="2" aria-hidden="true" class="slick-slide" style="outline: none; width: 11.11111111111111%; position: relative; left: -22px; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease;">
|
||||
<div>
|
||||
<div tabindex="-1" style="width: 100%; display: inline-block;">
|
||||
<h3>3</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div tabindex="-1" data-index="3" aria-hidden="true" class="slick-slide" style="outline: none; position: relative; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease; width: 11.11111111111111%; left: -33px;">
|
||||
<div tabindex="-1" data-index="3" aria-hidden="true" class="slick-slide" style="outline: none; width: 11.11111111111111%; position: relative; left: -33px; opacity: 0; transition: opacity 500ms ease, visibility 500ms ease;">
|
||||
<div>
|
||||
<div tabindex="-1" style="width: 100%; display: inline-block;">
|
||||
<h3>4</h3>
|
||||
|
|
|
@ -5,26 +5,7 @@ import hasProp, { initDefaultProps, getComponent } from '../_util/props-util';
|
|||
import { ConfigConsumerProps } from '../config-provider';
|
||||
import warning from '../_util/warning';
|
||||
import classNames from 'classnames';
|
||||
|
||||
// matchMedia polyfill for
|
||||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||||
if (typeof window !== 'undefined') {
|
||||
const matchMediaPolyfill = mediaQuery => {
|
||||
return {
|
||||
media: mediaQuery,
|
||||
matches: false,
|
||||
addListener() {},
|
||||
removeListener() {},
|
||||
};
|
||||
};
|
||||
// ref: https://github.com/ant-design/ant-design/issues/18774
|
||||
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
|
||||
}
|
||||
// Use require over import (will be lifted up)
|
||||
// make sure matchMedia polyfill run before require('vc-slick')
|
||||
// Fix https://github.com/ant-design/ant-design/issues/6560
|
||||
// Fix https://github.com/ant-design/ant-design/issues/3308
|
||||
const SlickCarousel = require('../vc-slick/src').default;
|
||||
import SlickCarousel from '../vc-slick/src';
|
||||
|
||||
export const CarouselEffect = PropTypes.oneOf(['scrollx', 'fade']);
|
||||
// Carousel
|
||||
|
|
|
@ -8,12 +8,18 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/basic.md correctly 1`] = `
|
|||
<tbody>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">UserName</span><span class="ant-descriptions-item-content"> Zhou Maomao </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Telephone</span><span class="ant-descriptions-item-content"> 1810000000 </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Live</span><span class="ant-descriptions-item-content"> Hangzhou, Zhejiang </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Remark</span><span class="ant-descriptions-item-content"> empty </span></td>
|
||||
<td colspan="2" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Address</span><span class="ant-descriptions-item-content"> No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Address</span><span class="ant-descriptions-item-content"> No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China </span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -30,14 +36,20 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/border.md correctly 1`] = `
|
|||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Product</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Cloud Database </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Billing Mode</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Prepaid </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Automatic Renewal</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> YES </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Order time</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> 2018-04-24 18:00:00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Usage Time</th>
|
||||
<td class="ant-descriptions-item-content" colspan="3"> 2019-04-24 18:00:00 </td>
|
||||
</tr>
|
||||
|
@ -48,14 +60,18 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/border.md correctly 1`] = `
|
|||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Negotiated Amount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $80.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Discount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $20.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Official Receipts</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $60.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Config Info</th>
|
||||
<td class="ant-descriptions-item-content" colspan="5"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -72,22 +88,30 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/responsive.md correctly 1`]
|
|||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Product</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Cloud Database </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Billing</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Prepaid </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Time</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> 18:00:00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Amount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $80.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Discount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $20.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Official</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $60.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Config Info</th>
|
||||
<td class="ant-descriptions-item-content" colspan="5"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1 </td>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1 </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -106,22 +130,30 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/size.md correctly 1`] = `
|
|||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Product</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Cloud Database </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Billing</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Prepaid </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Time</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> 18:00:00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Amount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $80.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Discount</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $20.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Official</th>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $60.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon">Config Info</th>
|
||||
<td class="ant-descriptions-item-content" colspan="5"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -134,12 +166,20 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/size.md correctly 1`] = `
|
|||
<tbody>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Product</span><span class="ant-descriptions-item-content"> Cloud Database </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Billing</span><span class="ant-descriptions-item-content"> Prepaid </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Time</span><span class="ant-descriptions-item-content"> 18:00:00 </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Amount</span><span class="ant-descriptions-item-content"> $80.00 </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Discount</span><span class="ant-descriptions-item-content"> $20.00 </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Official</span><span class="ant-descriptions-item-content"> $60.00 </span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -157,20 +197,32 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/vertical.md correctly 1`] =
|
|||
<tbody>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">UserName</span></td>
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Telephone</span></td>
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Live</span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-content"> Zhou Maomao </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Telephone</span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-content"> 1810000000 </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Live</span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-content"> Hangzhou, Zhejiang </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="2" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Address</span></td>
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Remark</span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="2" class="ant-descriptions-item"><span class="ant-descriptions-item-content"> No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China </span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-label ant-descriptions-item-colon">Remark</span></td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td colspan="1" class="ant-descriptions-item"><span class="ant-descriptions-item-content"> empty </span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -187,20 +239,32 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/vertical-border.md correctl
|
|||
<tbody>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Product</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Billing Mode</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Automatic Renewal</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Cloud Database </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Billing Mode</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Prepaid </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Automatic Renewal</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> YES </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Order time</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="3">Usage Time</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> 2018-04-24 18:00:00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="3">Usage Time</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="3"> 2019-04-24 18:00:00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
|
@ -211,19 +275,27 @@ exports[`renders ./antdv-demo/docs/descriptions/demo/vertical-border.md correctl
|
|||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Negotiated Amount</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Discount</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Official Receipts</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $80.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Discount</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $20.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Official Receipts</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="1"> $60.00 </td>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="5">Config Info</th>
|
||||
<th class="ant-descriptions-item-label ant-descriptions-item-colon" colspan="1">Config Info</th>
|
||||
</tr>
|
||||
<tr class="ant-descriptions-row">
|
||||
<td class="ant-descriptions-item-content" colspan="5"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
<td class="ant-descriptions-item-content" colspan="1"> Data disk type: MongoDB <br> Database version: 3.4 <br> Package: dds.mongo.mid <br> Storage space: 10 GB <br> Replication factor: 3 <br> Region: East China 1<br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,24 +4,6 @@ import Descriptions from '..';
|
|||
import { resetWarned } from '../../_util/warning';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
|
||||
jest.mock('enquire.js', () => {
|
||||
let that;
|
||||
let unmatchFun;
|
||||
return {
|
||||
unregister: jest.fn(),
|
||||
register: (media, options) => {
|
||||
if (media === '(max-width: 575px)') {
|
||||
that = this;
|
||||
options.match.call(that);
|
||||
unmatchFun = options.unmatch;
|
||||
}
|
||||
},
|
||||
callunmatch() {
|
||||
unmatchFun.call(that);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
describe('Descriptions', () => {
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
|
||||
|
@ -176,7 +158,6 @@ describe('Descriptions', () => {
|
|||
|
||||
it('when max-width: 575px,column=1', async () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const enquire = require('enquire.js');
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
|
@ -198,13 +179,10 @@ describe('Descriptions', () => {
|
|||
expect(wrapper.findAll('.ant-descriptions-item-no-label')).toHaveLength(1);
|
||||
});
|
||||
|
||||
enquire.callunmatch();
|
||||
wrapper.unmount();
|
||||
});
|
||||
|
||||
it('when max-width: 575px,column=2', async () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const enquire = require('enquire.js');
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
|
@ -222,8 +200,6 @@ describe('Descriptions', () => {
|
|||
);
|
||||
await asyncExpect(() => {});
|
||||
expect(wrapper.findAll('tr')).toHaveLength(2);
|
||||
|
||||
enquire.callunmatch();
|
||||
wrapper.unmount();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,20 +16,6 @@ import RightOutlined from '@ant-design/icons-vue/RightOutlined';
|
|||
import LeftOutlined from '@ant-design/icons-vue/LeftOutlined';
|
||||
import omit from 'omit.js';
|
||||
|
||||
// matchMedia polyfill for
|
||||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||||
if (typeof window !== 'undefined') {
|
||||
const matchMediaPolyfill = mediaQuery => {
|
||||
return {
|
||||
media: mediaQuery,
|
||||
matches: false,
|
||||
addListener() {},
|
||||
removeListener() {},
|
||||
};
|
||||
};
|
||||
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
||||
}
|
||||
|
||||
const dimensionMaxMap = {
|
||||
xs: '479.98px',
|
||||
sm: '575.98px',
|
||||
|
|
|
@ -356,7 +356,7 @@ exports[`renders ./antdv-demo/docs/layout/demo/top-side.md correctly 1`] = `
|
|||
<ul role="menu" class="ant-menu-light ant-menu-root ant-menu ant-menu-inline" style="height: 100%;">
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open ant-menu-submenu-selected" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="user" class="anticon anticon-user"><svg class="" data-icon="user" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"></path></svg></span>subnav 1</span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item ant-menu-item-selected">option1
|
||||
<!---->
|
||||
|
@ -446,7 +446,7 @@ exports[`renders ./antdv-demo/docs/layout/demo/top-side-2.md correctly 1`] = `
|
|||
<ul role="menu" class="ant-menu-light ant-menu-root ant-menu ant-menu-inline" style="height: 100%; border-right: 0;">
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open ant-menu-submenu-selected" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="user" class="anticon anticon-user"><svg class="" data-icon="user" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"></path></svg></span>subnav 1</span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item ant-menu-item-selected">option1
|
||||
<!---->
|
||||
|
|
|
@ -8,7 +8,7 @@ exports[`Locale Provider set moment locale when locale changes 1`] = `
|
|||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft" style="left: -999px; top: -1002px;">
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft slide-up-enter" style="left: -999px; top: -1002px;">
|
||||
<div class="ant-calendar ant-calendar-picker-container-content" tabindex="0">
|
||||
<!---->
|
||||
<div class="ant-calendar-panel">
|
||||
|
|
|
@ -60,7 +60,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/inline.md correctly 1`] = `
|
|||
<ul role="menu" class="ant-menu-light ant-menu-root ant-menu ant-menu-inline" style="width: 256px;" id="dddddd">
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open ant-menu-submenu-selected" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="mail" class="anticon anticon-mail"><svg class="" data-icon="mail" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"></path></svg></span><span>Navigation One</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<li class="ant-menu-item-group">
|
||||
<div class="ant-menu-item-group-title"><span role="img" aria-label="qq" class="anticon anticon-qq"><svg class="" data-icon="qq" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z"></path></svg></span><span>Item 1</span></div>
|
||||
<ul class="ant-menu-item-group-list">
|
||||
|
@ -122,7 +122,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/inline-collapsed.md correctly 1`] =
|
|||
</li>
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="mail" class="anticon anticon-mail"><svg class="" data-icon="mail" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"></path></svg></span><span>Navigation One</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item">Option 5
|
||||
<!---->
|
||||
|
@ -156,7 +156,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/sider-current.md correctly 1`] = `
|
|||
<ul role="menu" class="ant-menu-light ant-menu-root ant-menu ant-menu-inline" style="width: 256px;">
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="mail" class="anticon anticon-mail"><svg class="" data-icon="mail" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"></path></svg></span><span>Navigation One</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item">Option 1
|
||||
<!---->
|
||||
|
@ -205,7 +205,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/switch-mode.md correctly 1`] = `
|
|||
</li>
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="appstore" class="anticon anticon-appstore"><svg class="" data-icon="appstore" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"></path></svg></span><span>Navigation Three</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item">Option 3
|
||||
<!---->
|
||||
|
@ -241,7 +241,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/template.md correctly 1`] = `
|
|||
</li>
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="2$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="mail" class="anticon anticon-mail"><svg class="" data-icon="mail" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"></path></svg></span><span>Navigation 2</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="2$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="2$Menu">
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline" role="menuitem">
|
||||
<div aria-expanded="false" aria-haspopup="true" style="padding-left: 48px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="mail" class="anticon anticon-mail"><svg class="" data-icon="mail" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"></path></svg></span><span>Navigation 3</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<div></div>
|
||||
|
@ -268,7 +268,7 @@ exports[`renders ./antdv-demo/docs/menu/demo/theme.md correctly 1`] = `
|
|||
</li>
|
||||
<li class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open" role="menuitem">
|
||||
<div aria-expanded="true" aria-owns="sub1$Menu" aria-haspopup="true" style="padding-left: 24px;" class="ant-menu-submenu-title"><span><span role="img" aria-label="appstore" class="anticon anticon-appstore"><svg class="" data-icon="appstore" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"></path></svg></span><span>Navigation Three</span></span><i class="ant-menu-submenu-arrow"></i></div>
|
||||
<ul role="menu" class=" ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<ul role="menu" class="ant-menu-sub ant-menu ant-menu-inline" id="sub1$Menu">
|
||||
<!---->
|
||||
<li role="menuitem" style="padding-left: 48px;" class="ant-menu-item">Option 3
|
||||
<!---->
|
||||
|
|
|
@ -42,7 +42,7 @@ exports[`renders ./antdv-demo/docs/space/demo/base.md correctly 1`] = `
|
|||
<div class="ant-space-item" style="margin-right: 8px;"> Space </div>
|
||||
<div class="ant-space-item" style="margin-right: 8px;"><button class="ant-btn ant-btn-primary" type="button">
|
||||
<!----><span>Button</span></button></div>
|
||||
<div class="ant-space-item" style="margin-right: 8px;"><span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span></div>
|
||||
<div class="ant-space-item" style="margin-right: 8px;"><span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span></div>
|
||||
<div class="ant-space-item">
|
||||
<!----><button class="ant-btn" type="button">
|
||||
<!----><span>Confirm</span></button></div>
|
||||
|
|
|
@ -124,8 +124,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/card-top.md correctly 1`] = `
|
|||
exports[`renders ./antdv-demo/docs/tabs/demo/custom-add-trigger.md correctly 1`] = `
|
||||
<div>
|
||||
<div style="margin-bottom: 16px;"><button class="ant-btn" type="button">
|
||||
<!----><span>ADD</span>
|
||||
</button></div>
|
||||
<!----><span>ADD</span></button></div>
|
||||
<div class="ant-tabs-card ant-tabs-editable-card ant-tabs-no-animation ant-tabs ant-tabs-top">
|
||||
<div role="tablist" class="ant-tabs-bar ant-tabs-top-bar ant-tabs-card-bar" tabindex="0">
|
||||
<div class="ant-tabs-nav-container"><span unselectable="unselectable" class="ant-tabs-tab-prev ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-prev-icon"><span role="img" aria-label="left" class="anticon anticon-left ant-tabs-tab-prev-icon-target"><svg class="" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></span></span></span><span unselectable="unselectable" class="ant-tabs-tab-next ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-next-icon"><span role="img" aria-label="right" class="anticon anticon-right ant-tabs-tab-next-icon-target"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span></span>
|
||||
|
@ -243,8 +242,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/editable-card.md correctly 1`] = `
|
|||
<div class="ant-tabs-card ant-tabs-editable-card ant-tabs-no-animation ant-tabs ant-tabs-top">
|
||||
<div role="tablist" class="ant-tabs-bar ant-tabs-top-bar ant-tabs-card-bar" tabindex="0">
|
||||
<div class="ant-tabs-extra-content" style="float: right;"><span><span tabindex="-1" role="img" aria-label="plus" class="anticon anticon-plus ant-tabs-new-tab"><svg class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span>
|
||||
<!----></span>
|
||||
</div>
|
||||
<!----></span></div>
|
||||
<div class="ant-tabs-nav-container"><span unselectable="unselectable" class="ant-tabs-tab-prev ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-prev-icon"><span role="img" aria-label="left" class="anticon anticon-left ant-tabs-tab-prev-icon-target"><svg class="" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></span></span></span><span unselectable="unselectable" class="ant-tabs-tab-next ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-next-icon"><span role="img" aria-label="right" class="anticon anticon-right ant-tabs-tab-next-icon-target"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span></span>
|
||||
<div class="ant-tabs-nav-wrap">
|
||||
<div class="ant-tabs-nav-scroll">
|
||||
|
@ -292,8 +290,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/extra.md correctly 1`] = `
|
|||
<div class="ant-tabs-line ant-tabs ant-tabs-top">
|
||||
<div role="tablist" class="ant-tabs-bar ant-tabs-top-bar" tabindex="0">
|
||||
<div class="ant-tabs-extra-content" style="float: right;"><button class="ant-btn" type="button">
|
||||
<!----><span>Extra Action</span>
|
||||
</button></div>
|
||||
<!----><span>Extra Action</span></button></div>
|
||||
<div class="ant-tabs-nav-container"><span unselectable="unselectable" class="ant-tabs-tab-prev ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-prev-icon"><span role="img" aria-label="left" class="anticon anticon-left ant-tabs-tab-prev-icon-target"><svg class="" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></span></span></span><span unselectable="unselectable" class="ant-tabs-tab-next ant-tabs-tab-btn-disabled"><span class="ant-tabs-tab-next-icon"><span role="img" aria-label="right" class="anticon anticon-right ant-tabs-tab-next-icon-target"><svg class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span></span>
|
||||
<div class="ant-tabs-nav-wrap">
|
||||
<div class="ant-tabs-nav-scroll">
|
||||
|
|
|
@ -5,13 +5,14 @@ import FileOutlined from '@ant-design/icons-vue/FileOutlined';
|
|||
import CaretDownFilled from '@ant-design/icons-vue/CaretDownFilled';
|
||||
import MinusSquareOutlined from '@ant-design/icons-vue/MinusSquareOutlined';
|
||||
import PlusSquareOutlined from '@ant-design/icons-vue/PlusSquareOutlined';
|
||||
import { Tree as VcTree, TreeNode } from '../vc-tree';
|
||||
import VcTree from '../vc-tree';
|
||||
import animation from '../_util/openAnimation';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import { initDefaultProps, getOptionProps, getComponent, getSlot } from '../_util/props-util';
|
||||
import { cloneElement } from '../_util/vnode';
|
||||
import { ConfigConsumerProps } from '../config-provider';
|
||||
|
||||
const TreeNode = VcTree.TreeNode;
|
||||
function TreeProps() {
|
||||
return {
|
||||
showLine: PropTypes.bool,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/avatar.md correctly 1`] = `<span class="ant-upload-picture-card-wrapper"><!----><div class="ant-upload ant-upload-select ant-upload-select-picture-card"><!----></div></span>`;
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/avatar.md correctly 1`] = `<span class="ant-upload-picture-card-wrapper avatar-uploader"><!----><div class="ant-upload ant-upload-select ant-upload-select-picture-card"><!----></div></span>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/basic.md correctly 1`] = `<span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span>`;
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/basic.md correctly 1`] = `<span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/defaultFileList.md correctly 1`] = `
|
||||
<span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text"><div class="ant-upload-list-item-info"><span><span role="img" aria-label="paper-clip" class="anticon anticon-paper-clip"><svg class="" data-icon="paper-clip" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"></path></svg></span><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="http://www.baidu.com/xxx.png">xxx.png</a><span class="ant-upload-list-item-card-actions "><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text"><div class="ant-upload-list-item-info"><span><span role="img" aria-label="paper-clip" class="anticon anticon-paper-clip"><svg class="" data-icon="paper-clip" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"></path></svg></span><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="http://www.baidu.com/xxx.png">xxx.png</a><span class="ant-upload-list-item-card-actions "><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div></span></div>
|
||||
|
@ -24,12 +24,12 @@ exports[`renders ./antdv-demo/docs/upload/demo/defaultFileList.md correctly 1`]
|
|||
</div></span>
|
||||
`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/directory.md correctly 1`] = `<span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span>`;
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/directory.md correctly 1`] = `<span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/drag.md correctly 1`] = `<span><div class="ant-upload ant-upload-drag"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/fileList.md correctly 1`] = `
|
||||
<span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text"><div class="ant-upload-list-item-info"><span><span role="img" aria-label="paper-clip" class="anticon anticon-paper-clip"><svg class="" data-icon="paper-clip" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"></path></svg></span><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="http://www.baidu.com/xxx.png">xxx.png</a><span class="ant-upload-list-item-card-actions "><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text"><div class="ant-upload-list-item-info"><span><span role="img" aria-label="paper-clip" class="anticon anticon-paper-clip"><svg class="" data-icon="paper-clip" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"></path></svg></span><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="http://www.baidu.com/xxx.png">xxx.png</a><span class="ant-upload-list-item-card-actions "><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div></span></div>
|
||||
|
@ -71,7 +71,7 @@ exports[`renders ./antdv-demo/docs/upload/demo/picture-card.md correctly 1`] = `
|
|||
`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/picture-style.md correctly 1`] = `
|
||||
<div><span><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-picture"><div class="ant-upload-list-item-info"><span><a class="ant-upload-list-item-thumbnail" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" target="_blank" rel="noopener noreferrer"><img src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="xxx.png" class="ant-upload-list-item-image"></a><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png">xxx.png</a><span class="ant-upload-list-item-card-actions picture"><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<div><span class=""><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-picture"><div class="ant-upload-list-item-info"><span><a class="ant-upload-list-item-thumbnail" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" target="_blank" rel="noopener noreferrer"><img src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="xxx.png" class="ant-upload-list-item-image"></a><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png">xxx.png</a><span class="ant-upload-list-item-card-actions picture"><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div></span></div>
|
||||
|
@ -79,7 +79,7 @@ exports[`renders ./antdv-demo/docs/upload/demo/picture-style.md correctly 1`] =
|
|||
<!---->
|
||||
<!---->
|
||||
</div></span></div>
|
||||
</div></span><br><br><span><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-picture"><div class="ant-upload-list-item-info"><span><a class="ant-upload-list-item-thumbnail" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" target="_blank" rel="noopener noreferrer"><img src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="xxx.png" class="ant-upload-list-item-image"></a><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png">xxx.png</a><span class="ant-upload-list-item-card-actions picture"><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
</div></span><br><br><span class="upload-list-inline"><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"><div class="ant-upload-animate-enter"><span><div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-picture"><div class="ant-upload-list-item-info"><span><a class="ant-upload-list-item-thumbnail" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" target="_blank" rel="noopener noreferrer"><img src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="xxx.png" class="ant-upload-list-item-image"></a><a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1" title="xxx.png" href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png">xxx.png</a><span class="ant-upload-list-item-card-actions picture"><!----><a title="Remove file"><span title="Remove file" tabindex="-1" role="img" aria-label="delete" class="anticon anticon-delete"><svg class="" data-icon="delete" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896" focusable="false"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path></svg></span></a></span></span></div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div></span></div>
|
||||
|
@ -90,11 +90,11 @@ exports[`renders ./antdv-demo/docs/upload/demo/picture-style.md correctly 1`] =
|
|||
</div></span></div>
|
||||
`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/preview-file.md correctly 1`] = `<div><span><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"></div></span></div>`;
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/preview-file.md correctly 1`] = `<div><span class=""><div class="ant-upload ant-upload-select ant-upload-select-picture"><!----></div><div class="ant-upload-list ant-upload-list-picture"></div></span></div>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/transform-file.md correctly 1`] = `<div><span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span></div>`;
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/transform-file.md correctly 1`] = `<div><span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span></div>`;
|
||||
|
||||
exports[`renders ./antdv-demo/docs/upload/demo/upload-manually.md correctly 1`] = `
|
||||
<div class="clearfix"><span><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span><button style="margin-top: 16px;" disabled="" class="ant-btn ant-btn-primary" type="button">
|
||||
<div class="clearfix"><span class=""><div class="ant-upload ant-upload-select ant-upload-select-text"><!----></div><div class="ant-upload-list ant-upload-list-text"></div></span><button style="margin-top: 16px;" disabled="" class="ant-btn ant-btn-primary" type="button">
|
||||
<!----><span>Start Upload</span></button></div>
|
||||
`;
|
||||
|
|
|
@ -6,20 +6,9 @@ import { getWidth, setStyle, menuAllProps } from './util';
|
|||
import { cloneElement } from '../_util/vnode';
|
||||
import { getPropsData, getAllProps, getSlot, findDOMNode } from '../_util/props-util';
|
||||
|
||||
const canUseDOM = !!(
|
||||
typeof window !== 'undefined' &&
|
||||
window.document &&
|
||||
window.document.createElement
|
||||
);
|
||||
|
||||
const MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed';
|
||||
const FLOAT_PRECISION_ADJUST = 0.5;
|
||||
|
||||
// Fix ssr
|
||||
if (canUseDOM) {
|
||||
require('mutationobserver-shim');
|
||||
}
|
||||
|
||||
const DOMWrap = {
|
||||
name: 'DOMWrap',
|
||||
mixins: [BaseMixin],
|
||||
|
|
|
@ -5,7 +5,6 @@ import InnerSlider from './inner-slider';
|
|||
import defaultProps from './default-props';
|
||||
import { canUseDOM } from './utils/innerSliderUtils';
|
||||
import { getSlot } from '../../_util/props-util';
|
||||
const enquire = canUseDOM() && require('enquire.js');
|
||||
|
||||
export default {
|
||||
name: 'Slider',
|
||||
|
@ -26,8 +25,15 @@ export default {
|
|||
},
|
||||
media(query, handler) {
|
||||
// javascript handler for css media query
|
||||
enquire.register(query, handler);
|
||||
this._responsiveMediaHandlers.push({ query, handler });
|
||||
const mql = window.matchMedia(query);
|
||||
const listener = ({ matches }) => {
|
||||
if (matches) {
|
||||
handler();
|
||||
}
|
||||
};
|
||||
mql.addListener(listener);
|
||||
listener(mql);
|
||||
this._responsiveMediaHandlers.push({ mql, query, listener });
|
||||
},
|
||||
slickPrev() {
|
||||
this.innerSlider.slickPrev();
|
||||
|
@ -47,11 +53,6 @@ export default {
|
|||
},
|
||||
// handles responsive breakpoints
|
||||
beforeMount() {
|
||||
// performance monitoring
|
||||
// if (process.env.NODE_ENV !== 'production') {
|
||||
// const { whyDidYouUpdate } = require('why-did-you-update')
|
||||
// whyDidYouUpdate(React)
|
||||
// }
|
||||
if (this.responsive) {
|
||||
const breakpoints = this.responsive.map(breakpt => breakpt.breakpoint);
|
||||
// sort them in increasing order of their numerical value
|
||||
|
@ -87,7 +88,7 @@ export default {
|
|||
},
|
||||
beforeUnmount() {
|
||||
this._responsiveMediaHandlers.forEach(function(obj) {
|
||||
enquire.unregister(obj.query, obj.handler);
|
||||
obj.mql.removeListener(obj.listener);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { inject } from 'vue';
|
||||
import warning from 'warning';
|
||||
import PropTypes from '../../../_util/vue-types';
|
||||
import { Tree } from '../../../vc-tree';
|
||||
import Tree from '../../../vc-tree';
|
||||
import BaseMixin from '../../../_util/BaseMixin';
|
||||
import { createRef } from '../util';
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { TreeNode } from '../../vc-tree';
|
||||
import VcTree from '../../vc-tree';
|
||||
/**
|
||||
* SelectNode wrapped the tree node.
|
||||
* Let's use SelectNode instead of TreeNode
|
||||
* since TreeNode is so confuse here.
|
||||
*/
|
||||
const TreeNode = VcTree.TreeNode;
|
||||
function SelectNode(_, { attrs, slots }) {
|
||||
return <TreeNode {...attrs} vSlots={slots} />;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// based on rc-tree 2.1.3
|
||||
'use strict';
|
||||
import Tree from './src';
|
||||
|
||||
module.exports = require('./src/');
|
||||
export default Tree;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import ProxyTree, { Tree } from './Tree';
|
||||
import Tree from './Tree';
|
||||
import TreeNode from './TreeNode';
|
||||
Tree.TreeNode = TreeNode;
|
||||
ProxyTree.TreeNode = TreeNode;
|
||||
|
||||
export { Tree, TreeNode };
|
||||
export default ProxyTree;
|
||||
export default Tree;
|
||||
|
|
|
@ -15,7 +15,7 @@ Use Drawer to quickly preview details of an object, such as those in a list.
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import demo from '../antdv-demo/docs/tree/demo';
|
||||
import demo from '../antdv-demo/docs/carousel/demo';
|
||||
export default {
|
||||
components: {
|
||||
demo,
|
||||
|
|
|
@ -196,7 +196,6 @@
|
|||
"dom-align": "^1.10.4",
|
||||
"dom-closest": "^0.2.0",
|
||||
"dom-scroll-into-view": "^2.0.0",
|
||||
"enquire.js": "^2.1.6",
|
||||
"intersperse": "^1.0.0",
|
||||
"is-mobile": "^2.2.1",
|
||||
"is-negative-zero": "^2.0.0",
|
||||
|
@ -206,7 +205,7 @@
|
|||
"moment": "^2.21.0",
|
||||
"mutationobserver-shim": "^0.3.2",
|
||||
"node-emoji": "^1.10.0",
|
||||
"omit.js": "^1.0.0",
|
||||
"omit.js": "^2.0.0",
|
||||
"raf": "^3.4.0",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"scroll-into-view-if-needed": "^2.2.25",
|
||||
|
|
|
@ -8,15 +8,15 @@ if (typeof window !== 'undefined') {
|
|||
global.window.dispatchEvent(new Event('resize'));
|
||||
};
|
||||
global.window.scrollTo = () => {};
|
||||
// if (!window.matchMedia) {
|
||||
// Object.defineProperty(global.window, 'matchMedia', {
|
||||
// value: jest.fn(query => ({
|
||||
// matches: query.includes('max-width'),
|
||||
// addListener: jest.fn(),
|
||||
// removeListener: jest.fn(),
|
||||
// })),
|
||||
// });
|
||||
// }
|
||||
if (!window.matchMedia) {
|
||||
Object.defineProperty(global.window, 'matchMedia', {
|
||||
value: jest.fn(query => ({
|
||||
matches: query.includes('max-width'),
|
||||
addListener: jest.fn(),
|
||||
removeListener: jest.fn(),
|
||||
})),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// The built-in requestAnimationFrame and cancelAnimationFrame not working with jest.runFakeTimes()
|
||||
|
|
Loading…
Reference in New Issue