zmc
2023-08-08 bab83405c39ae9ab8b6569ca29b1e9a6a3b04327
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!-- <script >
import {store} from '../utils/status.js'
  export default {
    data() {
      return{
        store
      }
    },
    methods: {
 
     }
}
</script>
 
<template>
  <div>
   <el-button @click="store.increment()">增加</el-button>
   <div>count:{{ store.count }}</div>
  </div>
</template>
 
<style lang="scss" scoped>
 
</style> -->
 
<!-- <script setup>
 
import { useMouse } from '../utils/status1.js'
const { x, y } = useMouse()
 
</script> -->
 
<template>
Mouse position is at: {{ x }}, {{ y }}
<div>{{ c }}</div>
<div>{{ d }}</div>
</template>
 
<script >
import { useMouse } from '../utils/status1.js'
export default {
  setup() {
    const { x, y } = useMouse()
    return { x, y }
  },
  data(){
    return{
      c:'好的',
      d:1
    }
  },
  watch:{
    x(){
      this.d = this.x
    }
  }
 
}
</script>