上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页
摘要: 日常开发过程中会使用原生js和jquery设置获取checked、disabled属性,测试总结下。 原生js <dl> <dt>表单</dt> <dd> <p>名字:<input type="text" id="name" value="name" /></p> <p> 城市:<select id 阅读全文
posted @ 2023-12-27 17:16 carol2014 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 状态管理 src/views/Pinia.vue <script setup> import { ref } from "vue"; import { storeToRefs } from "pinia"; import { useCounterStore } from "../stores/cou 阅读全文
posted @ 2023-12-26 16:44 carol2014 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 逻辑复用-组合式函数 src/views/ad/User.vue <script setup> import { useMouse } from "../../js/mouse.js"; import { useFetch } from "../../js/fetch.js"; import { r 阅读全文
posted @ 2023-12-26 16:10 carol2014 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 组件 src/views/ad/Comp.vue <script setup> import { ref, provide, readonly, defineAsyncComponent } from "vue"; import DemoComp from "../../components/sim 阅读全文
posted @ 2023-12-26 15:54 carol2014 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 响应式状态 src/views/basic/Reactive.vue <script setup> import { ref, reactive, computed, watch, watchEffect } from "vue"; //reactive 响应式对象 只能用于对象、数组和集合类型 c 阅读全文
posted @ 2023-12-26 15:23 carol2014 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 事件绑定 src/views/basic/Event.vue <script setup> import { nextTick, ref } from "vue"; function clickA() { console.log("点击了a标签,点击事件传递到了外层p标签"); } function 阅读全文
posted @ 2023-12-26 15:17 carol2014 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 表单相关 src/views/basic/Form.vue <script setup> import { ref } from "vue"; const message = ref("hello"); const checked = ref(); const checkedNames = ref( 阅读全文
posted @ 2023-12-26 15:04 carol2014 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 模板语法 src/views/basic/Template.vue <script setup> import { ref, reactive, onMounted } from "vue"; //模板语法 const msg = "hello"; const rawHtml = "<span st 阅读全文
posted @ 2023-12-26 15:00 carol2014 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 我的vue3学习之路总是学学停停,最开始在18年开发微信小程序,就发现小程序和vue的语法有些相似,然后就去看了vue2的文档,随后忙其它的事情就丢下了。 直到22年又开始捡起来vue3,有了组合式api,语法简明很多,然后又不知道忙什么丢下。。。 前段有些空时间,就把vue3的学习整理下,使用vi 阅读全文
posted @ 2023-12-26 14:55 carol2014 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 这次是被坑了,在linux apache运行完好的代码放到IIS服务器上居然没有数据,检查发现居然出现了419错误,要求ajax post请求中应该包含csrf token字段。 然后就突然想起来了,上次相似的项目也发生过这样的问题,上次没记录,时日长久,这次居然一点儿也没想起来... 按照错误提示 阅读全文
posted @ 2023-12-26 10:33 carol2014 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页