摘要: 1. setup在beforeCreate生命周期回调之前就执行了,而且就执行一次 <template> </template> <script lang='ts'> import { defineComponent } from 'vue'; export default defineCompon 阅读全文
posted @ 2022-05-02 14:02 幻影之舞 阅读(419) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <body> <h2>1111</h2> <script type="text/javascript"> const user = { name:'鸣人', age:8, wife:{ name:'佐助', age:20 } } // 把目标对象转为代理 阅读全文
posted @ 2022-05-02 13:50 幻影之舞 阅读(179) 评论(0) 推荐(0)
摘要: <template> <!-- vue2中必须要有一对根标签,vue3不用 --> </template> <script lang='ts'> // 可以编写ts代码 // defineComponent函数,目的是可以定义一个组件,内部可以传入一个配置对象 import { defineComp 阅读全文
posted @ 2022-05-02 13:48 幻影之舞 阅读(1861) 评论(0) 推荐(0)