Merge branch 'master' of https://github.com/vueComponent/ant-design-vue
commit
79f4cafeba
|
@ -0,0 +1,19 @@
|
||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import { asyncExpect } from '@/tests/utils'
|
||||||
|
import List from '..'
|
||||||
|
|
||||||
|
describe('List', () => {
|
||||||
|
it('locale not passed to internal div', async () => {
|
||||||
|
const locale = { emptyText: 'Custom text' }
|
||||||
|
const wrapper = mount({
|
||||||
|
render () {
|
||||||
|
return <List dataSource={[]} renderItem={(item) => <List.Item>{item}</List.Item>} locale={locale} />
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
sync: false,
|
||||||
|
})
|
||||||
|
await asyncExpect(() => {
|
||||||
|
expect(wrapper.props().locale).toBe(undefined)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
|
@ -148,7 +148,7 @@ export default {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<transition-group
|
<transition-group
|
||||||
{...getTransitionProps('fade')}
|
{...getTransitionProps('fade', { appear: false })}
|
||||||
tag='div'
|
tag='div'
|
||||||
class={animateClassName}
|
class={animateClassName}
|
||||||
>
|
>
|
||||||
|
|
|
@ -140,7 +140,10 @@ exports[`renders ./components/transfer/demo/large-data.md correctly 1`] = `
|
||||||
<div class="ant-transfer">
|
<div class="ant-transfer">
|
||||||
<div class="ant-transfer-list">
|
<div class="ant-transfer-list">
|
||||||
<div class="ant-transfer-list-header"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label><span class="ant-transfer-list-header-selected"><span>2000 items</span><span class="ant-transfer-list-header-title"></span></span></div>
|
<div class="ant-transfer-list-header"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label><span class="ant-transfer-list-header-selected"><span>2000 items</span><span class="ant-transfer-list-header-title"></span></span></div>
|
||||||
<div class="ant-transfer-list-body">
|
<div class="ant-transfer-list-body ant-transfer-list-body-with-search">
|
||||||
|
<div class="ant-transfer-list-body-search-wrapper">
|
||||||
|
<div><input value="" placeholder="Search here" type="text" class="ant-input ant-transfer-list-search ant-transfer-list-search"><span class="ant-transfer-list-search-action"><i class="anticon anticon-search"></i></span></div>
|
||||||
|
</div>
|
||||||
<ul class="ant-transfer-list-content">
|
<ul class="ant-transfer-list-content">
|
||||||
<div class="LazyLoad" style="height: 32px;"></div>
|
<div class="LazyLoad" style="height: 32px;"></div>
|
||||||
<div class="LazyLoad" style="height: 32px;"></div>
|
<div class="LazyLoad" style="height: 32px;"></div>
|
||||||
|
@ -2149,7 +2152,10 @@ exports[`renders ./components/transfer/demo/large-data.md correctly 1`] = `
|
||||||
<div class="ant-transfer-operation"><button type="button" disabled="disabled" class="ant-btn ant-btn-primary ant-btn-sm"><i class="anticon anticon-right"></i></button><button type="button" disabled="disabled" class="ant-btn ant-btn-primary ant-btn-sm"><i class="anticon anticon-left"></i></button></div>
|
<div class="ant-transfer-operation"><button type="button" disabled="disabled" class="ant-btn ant-btn-primary ant-btn-sm"><i class="anticon anticon-right"></i></button><button type="button" disabled="disabled" class="ant-btn ant-btn-primary ant-btn-sm"><i class="anticon anticon-left"></i></button></div>
|
||||||
<div class="ant-transfer-list">
|
<div class="ant-transfer-list">
|
||||||
<div class="ant-transfer-list-header"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label><span class="ant-transfer-list-header-selected"><span>0 item</span><span class="ant-transfer-list-header-title"></span></span></div>
|
<div class="ant-transfer-list-header"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value=""><span class="ant-checkbox-inner"></span></span></label><span class="ant-transfer-list-header-selected"><span>0 item</span><span class="ant-transfer-list-header-title"></span></span></div>
|
||||||
<div class="ant-transfer-list-body">
|
<div class="ant-transfer-list-body ant-transfer-list-body-with-search">
|
||||||
|
<div class="ant-transfer-list-body-search-wrapper">
|
||||||
|
<div><input value="" placeholder="Search here" type="text" class="ant-input ant-transfer-list-search ant-transfer-list-search"><span class="ant-transfer-list-search-action"><i class="anticon anticon-search"></i></span></div>
|
||||||
|
</div>
|
||||||
<ul class="ant-transfer-list-content"></ul>
|
<ul class="ant-transfer-list-content"></ul>
|
||||||
<div class="ant-transfer-list-body-not-found">Not Found</div>
|
<div class="ant-transfer-list-body-not-found">Not Found</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
:targetKeys="targetKeys"
|
:targetKeys="targetKeys"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
:render="item=>item.title"
|
:render="item=>item.title"
|
||||||
|
showSearch
|
||||||
>
|
>
|
||||||
</a-transfer>
|
</a-transfer>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -203,7 +203,7 @@ export default {
|
||||||
let footer
|
let footer
|
||||||
if (tempFooter) {
|
if (tempFooter) {
|
||||||
footer = (
|
footer = (
|
||||||
<div class={`${prefixCls}-footer`} ref='footer'>
|
<div key='footer' class={`${prefixCls}-footer`} ref='footer'>
|
||||||
{tempFooter}
|
{tempFooter}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -212,7 +212,7 @@ export default {
|
||||||
let header
|
let header
|
||||||
if (title) {
|
if (title) {
|
||||||
header = (
|
header = (
|
||||||
<div class={`${prefixCls}-header`} ref='header'>
|
<div key='header' class={`${prefixCls}-header`} ref='header'>
|
||||||
<div class={`${prefixCls}-title`} id={this.titleId}>
|
<div class={`${prefixCls}-title`} id={this.titleId}>
|
||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
|
@ -252,6 +252,7 @@ export default {
|
||||||
{closer}
|
{closer}
|
||||||
{header}
|
{header}
|
||||||
<div
|
<div
|
||||||
|
key='body'
|
||||||
class={`${prefixCls}-body`}
|
class={`${prefixCls}-body`}
|
||||||
style={bodyStyle}
|
style={bodyStyle}
|
||||||
ref='body'
|
ref='body'
|
||||||
|
|
Loading…
Reference in New Issue