style: remove not use file
parent
4770ed4708
commit
29d681ff52
|
@ -1,10 +0,0 @@
|
|||
export function antDecorator(Vue) {
|
||||
return Vue.directive('decorator', {});
|
||||
}
|
||||
|
||||
export default {
|
||||
// just for tag
|
||||
install: Vue => {
|
||||
antDecorator(Vue);
|
||||
},
|
||||
};
|
|
@ -1,30 +0,0 @@
|
|||
import { nextTick } from 'vue';
|
||||
const antvRef = {
|
||||
beforeMount: function bind(el, binding, vnode) {
|
||||
nextTick(function() {
|
||||
binding.value(el, vnode.key);
|
||||
});
|
||||
binding.value(el, vnode.key);
|
||||
},
|
||||
updated: function update(el, binding, vnode, oldVnode) {
|
||||
if (oldVnode && oldVnode.directives) {
|
||||
let oldBinding = oldVnode.directives.find(function(directive) {
|
||||
return directive === antvRef;
|
||||
});
|
||||
if (oldBinding && oldBinding.value !== binding.value) {
|
||||
oldBinding && oldBinding.value(null, oldVnode.key);
|
||||
binding.value(el, vnode.key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Should not have this situation
|
||||
if (vnode.el !== oldVnode.el) {
|
||||
binding.value(el, vnode.key);
|
||||
}
|
||||
},
|
||||
unmounted: function unbind(el, binding, vnode) {
|
||||
binding.value(null, vnode.key);
|
||||
},
|
||||
};
|
||||
|
||||
export default antvRef;
|
|
@ -1,12 +0,0 @@
|
|||
import ref from 'vue-ref';
|
||||
// import { antInput } from './antInputDirective';
|
||||
import { antDecorator } from './FormDecoratorDirective';
|
||||
import { antPortal } from './portalDirective';
|
||||
|
||||
export default {
|
||||
install: Vue => {
|
||||
Vue.use(ref, { name: 'ant-ref' });
|
||||
antDecorator(Vue);
|
||||
antPortal(Vue);
|
||||
},
|
||||
};
|
|
@ -1,49 +0,0 @@
|
|||
import { createVNode } from 'vue';
|
||||
import PropTypes from './vue-types';
|
||||
import { getOptionProps } from './props-util';
|
||||
|
||||
function getDisplayName(WrappedComponent) {
|
||||
return WrappedComponent.name || 'Component';
|
||||
}
|
||||
let k = 1;
|
||||
export default function wrapWithConnect(WrappedComponent) {
|
||||
const tempProps = WrappedComponent.props || {};
|
||||
const methods = WrappedComponent.methods || {};
|
||||
const props = {};
|
||||
Object.keys(tempProps).forEach(k => {
|
||||
props[k] = { ...tempProps[k], required: false };
|
||||
});
|
||||
WrappedComponent.props.__propsSymbol__ = PropTypes.any;
|
||||
WrappedComponent.props.children = PropTypes.array.def([]);
|
||||
const ProxyWrappedComponent = {
|
||||
props,
|
||||
inheritAttrs: false,
|
||||
name: `Proxy_${getDisplayName(WrappedComponent)}`,
|
||||
methods: {
|
||||
getProxyWrappedInstance() {
|
||||
return this.$refs.wrappedInstance;
|
||||
},
|
||||
},
|
||||
render() {
|
||||
const { $slots = {}, $attrs } = this;
|
||||
const props = getOptionProps(this);
|
||||
const wrapProps = {
|
||||
...props,
|
||||
...$attrs,
|
||||
__propsSymbol__: k++,
|
||||
ref: 'wrappedInstance',
|
||||
};
|
||||
const slots = {};
|
||||
for (let [key, value] of Object.entries($slots)) {
|
||||
slots[key] = () => value();
|
||||
}
|
||||
return createVNode(WrappedComponent, wrapProps, slots);
|
||||
},
|
||||
};
|
||||
Object.keys(methods).map(m => {
|
||||
ProxyWrappedComponent.methods[m] = function() {
|
||||
return this.getProxyWrappedInstance()[m](...arguments);
|
||||
};
|
||||
});
|
||||
return ProxyWrappedComponent;
|
||||
}
|
|
@ -577,14 +577,6 @@ const Drawer = {
|
|||
currentDrawer[this.drawerId] = open ? this.container : open;
|
||||
const children = this.getChildToRender(this.sFirstEnter ? open : false);
|
||||
if (!getContainer) {
|
||||
// const directives = [
|
||||
// {
|
||||
// name: 'ant-ref',
|
||||
// value: c => {
|
||||
// this.container = c;
|
||||
// },
|
||||
// },
|
||||
// ];
|
||||
return (
|
||||
<div
|
||||
class={wrapperClassName}
|
||||
|
|
Loading…
Reference in New Issue