Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Apr 25, 2024
1 parent f8034e6 commit 44412f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions public/test.html
Expand Up @@ -1352,7 +1352,7 @@
{{ title }}
</li>
</ul>
<ZooComp v-bind:a='state.zoo'></ZooComp>
<ZooComp v-bind:statezoo='state'></ZooComp>
<input type="range" min="1"
v-bind:max="stateArray.length"
Expand Down Expand Up @@ -1590,22 +1590,22 @@
})
vueApp.component("ZooComp",
{
props: ["a"],
props: ["statezoo"],
template: `
<div style="margin-top: 70px;">
Zoocomp {{a}}
Zoocomp {{statezoo}}
<button style="height: 050px;width:100px;" v-on:click="zoo()" >ZOO</button>
</div>`
,
methods: {
zoo: function () {
let mm = this
mm.a = immer.produce(
mm.a
mm.statezoo = immer.produce(
mm.statezoo
,
function(stateChange) {
stateChange =2
stateChange.zoo.a = 2
}
)

Expand Down

0 comments on commit 44412f6

Please sign in to comment.