vue3组合式API(计数器)

javascript 复制代码
<script setup>
import { ref, onMounted } from 'vue'
import './index.css'

const count = ref(0)

const handleCount = () => {
  count.value++
}

onMounted(() => {
  console.log(1)
})
</script>

<template>
  <div class="m-home-wrap">
    home
    <button @click="handleCount">{{ count }}</button>
    <div class="m-home-demo"></div>
  </div>
</template>

<style></style>

人工智能学习网站

https://chat.xutongbao.top

相关推荐
kyriewen9 分钟前
我装了30多个Skill,给AI安排了8个岗位
前端·javascript·ai编程
风骏时光牛马27 分钟前
大模型落地实践中的技术选型思路与方案对比
前端
IT_陈寒1 小时前
Vite打包时的静态资源坑,我帮你踩过了
前端·人工智能·后端
默_笙2 小时前
🔥 让 AI 帮我写完整个 Next.js 博客:框架就是 AI 的"上下文 buff"
前端·javascript
牧艺3 小时前
登录页还在用渐变?我一口气做了 5 个能摸的背景动效:吹蒲公英、滴墨染水、点熔岩闷裂
前端·canvas·交互设计
陆枫Larry3 小时前
状态机简介
前端
陆枫Larry3 小时前
一次登录问题排查:接口没错,错的是旧业务逻辑
前端
小小小小宇3 小时前
大模型打分与采样原理,以及 Pi Agent 核心原理
前端
一位正在转型AI全栈的前端工程师4 小时前
AI 全栈学习之旅 -Week 5:RAG 知识库问答系统:从零到生产级部署的全栈实践总结
前端·python
OpenTiny社区4 小时前
从流式消息到多会话:TinyRobot Kit 如何组织 AI 对话数据层
vue.js