From ef944e895392cf57004b2e8dbad76a159ab0cd4b Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 26 八月 2025 17:47:01 +0800
Subject: [PATCH] 45
---
src/views/test.vue | 32 ++++++++++++--------------------
1 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/src/views/test.vue b/src/views/test.vue
index 7c1bd47..266debc 100644
--- a/src/views/test.vue
+++ b/src/views/test.vue
@@ -1,26 +1,18 @@
<template>
- <div>hello test page{{content}}</div>
- <div>{{data.a}}</div>
- <button @click="butclick">点击</button>
+ <div class="test">
+ {{a}}
+ <button @click="actionA">点我呀</button>
+ </div>
</template>
<script lang="ts" setup>
- import {ref,reactive,watchEffect,watch} from 'vue'
- const data=reactive({
- a:'chenyinc',
- h:'dadsad'
- })
- const butclick=()=>{
- data.a='你好'
- content.value='haha'
- }
- const content=ref('content')
- watchEffect(()=>{
- const x1=data.a
- console.log('watchEffect所指定的回调执行了',x1)
- })
- watch(content,(newValue,oldValue)=>{
- console.log(newValue,oldValue,'变化了')
- })
+ import usePage from './vuetool/index.js'
+ const {a,actionA} = usePage()
</script>
+<style>
+ .paibanclass {
+ background: rgb(228, 231, 225);
+ color: #00f;
+ }
+</style>
--
Gitblit v1.8.0