test: update transfer snap

pull/2682/head
tanjinzhou 2020-08-13 17:46:44 +08:00
parent ae0acb73ea
commit 1850d04eed
7 changed files with 6569 additions and 2224 deletions

@ -1 +1 @@
Subproject commit 55b555db9f1598318c402df2132ff05bc491c473 Subproject commit aab758ee2c072e350f2cc6140f8293ce8d9c7c9e

View File

@ -128,7 +128,7 @@ export default {
onMouseenter={onMouseleave} onMouseenter={onMouseleave}
> >
<VcCheckbox {...checkboxProps} class={checkboxClass} ref="vcCheckbox" /> <VcCheckbox {...checkboxProps} class={checkboxClass} ref="vcCheckbox" />
{children !== undefined && <span>{children}</span>} {children.length ? <span>{children}</span> : null}
</label> </label>
); );
}, },

View File

@ -64,12 +64,12 @@ const Switch = {
const loadingIcon = loading ? <LoadingOutlined class={`${prefixCls}-loading-icon`} /> : null; const loadingIcon = loading ? <LoadingOutlined class={`${prefixCls}-loading-icon`} /> : null;
const switchProps = { const switchProps = {
...restProps, ...restProps,
...$attrs,
prefixCls, prefixCls,
loadingIcon, loadingIcon,
checkedChildren: getComponent(this, 'checkedChildren'), checkedChildren: getComponent(this, 'checkedChildren'),
unCheckedChildren: getComponent(this, 'unCheckedChildren'), unCheckedChildren: getComponent(this, 'unCheckedChildren'),
disabled: disabled || loading, disabled: disabled || loading,
...$attrs,
class: classes, class: classes,
ref: this.saveRef, ref: this.saveRef,
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,12 @@
import classNames from 'classnames'; import classNames from 'classnames';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import { isValidElement, initDefaultProps, splitAttrs, findDOMNode } from '../_util/props-util'; import {
isValidElement,
initDefaultProps,
splitAttrs,
findDOMNode,
filterEmpty,
} from '../_util/props-util';
import BaseMixin from '../_util/BaseMixin'; import BaseMixin from '../_util/BaseMixin';
import Checkbox from '../checkbox'; import Checkbox from '../checkbox';
import Search from './search'; import Search from './search';
@ -55,7 +61,7 @@ export const TransferListProps = {
function renderListNode(renderList, props) { function renderListNode(renderList, props) {
let bodyContent = renderList ? renderList(props) : null; let bodyContent = renderList ? renderList(props) : null;
const customize = !!bodyContent; const customize = !!bodyContent && filterEmpty(bodyContent).length > 0;
if (!customize) { if (!customize) {
bodyContent = defaultRenderList(props); bodyContent = defaultRenderList(props);
} }

View File

@ -85,6 +85,8 @@ export default {
loadingIcon, loadingIcon,
defaultChecked, defaultChecked,
autofocus, autofocus,
checkedChildren,
unCheckedChildren,
...restProps ...restProps
} = getOptionProps(this); } = getOptionProps(this);
const checked = this.stateChecked; const checked = this.stateChecked;

View File

@ -4,7 +4,7 @@
</div> </div>
</template> </template>
<script> <script>
import demo from '../antdv-demo/docs/space/demo/index'; import demo from '../antdv-demo/docs/transfer/demo/tree-transfer';
export default { export default {
components: { components: {