parent
6c71de6e70
commit
d6cdd2ea85
|
@ -7,4 +7,3 @@ es/
|
||||||
lib/
|
lib/
|
||||||
_site/
|
_site/
|
||||||
dist/
|
dist/
|
||||||
package.json
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
**/*.svg
|
**/*.svg
|
||||||
package.json
|
|
||||||
lib/
|
lib/
|
||||||
es/
|
es/
|
||||||
dist/
|
dist/
|
||||||
|
|
|
@ -84,7 +84,7 @@ const responsiveObserve = {
|
||||||
};
|
};
|
||||||
this.dispatch(pointMap);
|
this.dispatch(pointMap);
|
||||||
},
|
},
|
||||||
// Keep a empty destory to avoid triggering unmatch when unregister
|
// Keep a empty destroy to avoid triggering unmatch when unregister
|
||||||
destroy() {},
|
destroy() {},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -11,7 +11,7 @@ function getDisplayName(WrappedComponent) {
|
||||||
const defaultMapStateToProps = () => ({});
|
const defaultMapStateToProps = () => ({});
|
||||||
export default function connect(mapStateToProps) {
|
export default function connect(mapStateToProps) {
|
||||||
const shouldSubscribe = !!mapStateToProps;
|
const shouldSubscribe = !!mapStateToProps;
|
||||||
const finnalMapStateToProps = mapStateToProps || defaultMapStateToProps;
|
const finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
|
||||||
return function wrapWithConnect(WrappedComponent) {
|
return function wrapWithConnect(WrappedComponent) {
|
||||||
const tempProps = omit(WrappedComponent.props || {}, ['store']);
|
const tempProps = omit(WrappedComponent.props || {}, ['store']);
|
||||||
const props = {
|
const props = {
|
||||||
|
@ -30,13 +30,13 @@ export default function connect(mapStateToProps) {
|
||||||
this.store = this.storeContext.store;
|
this.store = this.storeContext.store;
|
||||||
this.preProps = omit(getOptionProps(this), ['__propsSymbol__']);
|
this.preProps = omit(getOptionProps(this), ['__propsSymbol__']);
|
||||||
return {
|
return {
|
||||||
subscribed: finnalMapStateToProps(this.store.getState(), this.$props),
|
subscribed: finalMapStateToProps(this.store.getState(), this.$props),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
__propsSymbol__() {
|
__propsSymbol__() {
|
||||||
if (mapStateToProps && mapStateToProps.length === 2) {
|
if (mapStateToProps && mapStateToProps.length === 2) {
|
||||||
this.subscribed = finnalMapStateToProps(this.store.getState(), this.$props);
|
this.subscribed = finalMapStateToProps(this.store.getState(), this.$props);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -53,7 +53,7 @@ export default function connect(mapStateToProps) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const props = omit(getOptionProps(this), ['__propsSymbol__']);
|
const props = omit(getOptionProps(this), ['__propsSymbol__']);
|
||||||
const nextSubscribed = finnalMapStateToProps(this.store.getState(), props);
|
const nextSubscribed = finalMapStateToProps(this.store.getState(), props);
|
||||||
if (
|
if (
|
||||||
!shallowEqual(this.preProps, props) ||
|
!shallowEqual(this.preProps, props) ||
|
||||||
!shallowEqual(this.subscribed, nextSubscribed)
|
!shallowEqual(this.subscribed, nextSubscribed)
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default {
|
||||||
const attributeName = this.getAttributeName();
|
const attributeName = this.getAttributeName();
|
||||||
node.removeAttribute(attributeName);
|
node.removeAttribute(attributeName);
|
||||||
node.setAttribute(attributeName, 'true');
|
node.setAttribute(attributeName, 'true');
|
||||||
// Not white or transparnt or grey
|
// Not white or transparent or grey
|
||||||
styleForPesudo = styleForPesudo || document.createElement('style');
|
styleForPesudo = styleForPesudo || document.createElement('style');
|
||||||
if (
|
if (
|
||||||
waveColor &&
|
waveColor &&
|
||||||
|
|
Loading…
Reference in New Issue