前端学习(2194):单一界面和多界面状态管理

tech2026-09-26  1

<template> <div id="app"> <h2>{{message}}</h2> <h2>{{counter}}</h2> <button @click="counter++">+</button> <button @click="counter--">-</button> </div> </template> <script> export default { name: 'App', data(){ return { message:'我是app组件', counter:0 } } } </script> <style> </style>

 运行结果

最新回复(0)