12 2023 档案

摘要:最近要经常用到 mysql 的日期相关函数,但以前用的少,索性总结下 DATE_FORMAT(date,format)、TIME_FORMAT(time,format) published_at 字段以 datetime 类型存储 format格式 SELECT title,published_at 阅读全文
posted @ 2023-12-29 17:17 carol2014 阅读(34) 评论(0) 推荐(0)
摘要:Electron是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架。 嵌入 Chromium 和 Node.js 到二进制的 Electron 允许您保持一个 JavaScript 代码代码库并创建 在Windows上运行的跨平台应用 macOS和Linux,不需要本地开 阅读全文
posted @ 2023-12-28 15:01 carol2014 阅读(163) 评论(0) 推荐(0)
摘要:日常开发过程中会使用原生 js 和 jquery 设置获取 checked、disabled 属性,测试总结下。 原生 js <dl> <dt>表单</dt> <dd> <p>名字:<input type="text" id="name" value="name" /></p> <p> 城市:<se 阅读全文
posted @ 2023-12-27 17:16 carol2014 阅读(622) 评论(0) 推荐(0)
摘要:状态管理 <script setup> import { ref } from "vue"; import { storeToRefs } from "pinia"; import { useCounterStore } from "../stores/counter"; import { useT 阅读全文
posted @ 2023-12-26 16:44 carol2014 阅读(68) 评论(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 阅读(52) 评论(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 阅读(28) 评论(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 阅读(53) 评论(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 阅读(137) 评论(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 阅读(42) 评论(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 阅读(60) 评论(0) 推荐(0)
摘要:我的vue3学习之路总是学学停停,最开始在18年开发微信小程序,就发现小程序和vue的语法有些相似,然后就去看了vue2的文档,随后忙其它的事情就丢下了。 直到22年又开始捡起来vue3,有了组合式api,语法简明很多,然后又不知道忙什么丢下。。。 前段有些空时间,就把vue3的学习整理下,使用vi 阅读全文
posted @ 2023-12-26 14:55 carol2014 阅读(73) 评论(0) 推荐(0)
摘要:这次是被坑了,在 linux apache 运行完好的代码放到 IIS 服务器上居然没有数据,检查发现居然出现了 419 错误,要求 ajax post 请求中应该包含 csrf token 字段。 检查发现:在 laravel 中间件 app/Http/Middleware/VerifyCsrfT 阅读全文
posted @ 2023-12-26 10:34 carol2014 阅读(205) 评论(0) 推荐(0)
摘要:路由 Django 默认项目有根 urls.py,各 app 下分别有自己的 urls.py,既集中又分治,是一种解耦的模式。 from django.urls import include, path urlpatterns = [ path('article/', include('articl 阅读全文
posted @ 2023-12-20 16:28 carol2014 阅读(22) 评论(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 阅读(123) 评论(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 阅读(62) 评论(0) 推荐(0)
摘要:最近要在系统中增加一个桑基图,要求桑基图可以根据选择的分析因子重新绘图。仔细看了下 echarts 的示例,桑基图本身很简单,困难的是如何根据数据资料整理成桑基图的数据格式,并且实现选择分析因子重新绘图。研究了几天的数据资料,特将方法写个 demo 记录下。 <script src="./plugi 阅读全文
posted @ 2023-12-20 11:23 carol2014 阅读(415) 评论(0) 推荐(0)