随笔分类 - Vue
摘要:toRefs是Vue.js 3中的一个实用函数,用于将响应式对象转换为普通对象,其中每个属性都是一个ref对象。这在某些情况下很有用,特别是想要将一个包含多个响应式属性的对象传递给子组件时。 以下是toRefs的基本用法: import { reactive, toRefs } from 'vue'
阅读全文
摘要:安装pnpm pnpm create vite@latest my-vue-app -- --template vue cd my-vue-app pnpm install pnpm run dev 文档 https://cn.vitejs.dev/
阅读全文
摘要:<script setup> import { computed, ref } from "vue"; // const blog = ref({ // title: "Vue3 基础教程", // content: "Vue3 在 Vue2 的基础上做了很多优化", // link: "https
阅读全文
摘要:本地部署 const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, // devServer: { // open: true,
阅读全文