Skip to content

Commit

Permalink
fix: 回退style属性
Browse files Browse the repository at this point in the history
  • Loading branch information
yiludege committed Mar 14, 2023
1 parent fc369b3 commit 87540da
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/main-react/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ h3 {
height: 100vh;
overflow: hidden scroll;
width: 1px;
z-index: 2;
}

.nav a {
Expand Down
1 change: 1 addition & 0 deletions examples/main-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ h3 {
height: 100vh;
overflow: hidden scroll;
width: 1px;
z-index: 2;
}
#nav a {
Expand Down
6 changes: 2 additions & 4 deletions packages/wujie-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ export default class WujieReact extends React.PureComponent {

render() {
this.execStartApp();

const { width, height, style } = this.props;
const { width, height } = this.props;
const { myRef: ref } = this.state;
return <div style={{ width, height, ...style }} ref={ref} />;
return <div style={{ width, height }} ref={ref} />;
}
}

Expand Down Expand Up @@ -67,5 +66,4 @@ const propTypes = {
activated: PropTypes.func,
deactivated: PropTypes.func,
loadError: PropTypes.func,
style: PropTypes.object
}
2 changes: 0 additions & 2 deletions packages/wujie-vue2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const wujieVueOptions = {
activated: { type: Function, default: null },
deactivated: { type: Function, default: null },
loadError: { type: Function, default: null },
style: { type: Object, default: {} },
},
data() {
return {
Expand Down Expand Up @@ -92,7 +91,6 @@ const wujieVueOptions = {
style: {
width: this.width,
height: this.height,
...this.style,
},
ref: "wujie",
});
Expand Down
2 changes: 0 additions & 2 deletions packages/wujie-vue3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const wujieVueOptions = {
activated: { type: Function, default: null },
deactivated: { type: Function, default: null },
loadError: { type: Function, default: null },
style: { type: Object, default: {} },
},
data() {
return {
Expand Down Expand Up @@ -91,7 +90,6 @@ const wujieVueOptions = {
style: {
width: this.width,
height: this.height,
...this.style,
},
ref: "wujie",
});
Expand Down

0 comments on commit 87540da

Please sign in to comment.