12 2023 档案

摘要:最近要经常用到mysql的日期相关函数,但以前用的少,索性总结下 1 DATE_FORMAT(date,format)、TIME_FORMAT(time,format) published_at字段以datetime类型存储 format格式 %a 缩写星期名 %b 缩写月名 %c 月,数值 %D 阅读全文
posted @ 2023-12-29 17:17 carol2014 阅读(5) 评论(0) 推荐(0) 编辑
摘要:Electron是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架。 嵌入 Chromium 和 Node.js 到 二进制的 Electron 允许您保持一个 JavaScript 代码代码库并创建 在Windows上运行的跨平台应用 macOS和Linux——不需要本 阅读全文
posted @ 2023-12-28 15:01 carol2014 阅读(50) 评论(0) 推荐(0) 编辑
摘要:日常开发过程中会使用原生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 阅读(256) 评论(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 阅读(26) 评论(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 阅读(21) 评论(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 阅读(83) 评论(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 阅读(38) 评论(0) 推荐(0) 编辑
摘要:这次是被坑了,在linux apache运行完好的代码放到IIS服务器上居然没有数据,检查发现居然出现了419错误,要求ajax post请求中应该包含csrf token字段。 然后就突然想起来了,上次相似的项目也发生过这样的问题,上次没记录,时日长久,这次居然一点儿也没想起来... 按照错误提示 阅读全文
posted @ 2023-12-26 10:33 carol2014 阅读(91) 评论(0) 推荐(0) 编辑
摘要:表单输入绑定 <!-- 文本 (Text) --> <input v-model="message" placeholder="edit me" /> <p>Message is: {{ message }}</p> <!-- 多行文本 (Textarea) --> <textarea v-mode 阅读全文
posted @ 2023-12-20 16:28 carol2014 阅读(4) 评论(0) 推荐(0) 编辑
摘要:HTML5 dialog标签简单使用 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1 阅读全文
posted @ 2023-12-20 16:05 carol2014 阅读(92) 评论(0) 推荐(0) 编辑
摘要:之前有一天看到了这样的一段代码,居然可以使用dom的id直接调用方法和获取属性,真是刷新了我的认知了。 <div> <p id="content">aa</p> <button onclick="console.log(content.innerText)">打印内容</button> </div> 阅读全文
posted @ 2023-12-20 15:54 carol2014 阅读(10) 评论(0) 推荐(0) 编辑
摘要:最近要在系统中增加一个桑基图,要求桑基图可以根据选择的分析因子重新绘图。 仔细看了下echarts的示例,桑基图本身很简单,困难的是如何根据数据资料整理成桑基图的数据格式,并且实现选择分析因子重新绘图。 研究了几天的数据资料,特将方法写个demo记录下。 <script src="./plugins 阅读全文
posted @ 2023-12-20 11:23 carol2014 阅读(138) 评论(0) 推荐(0) 编辑