当前位置: 首页 > news >正文

Python私教张大鹏 Vue3整合AntDesignVue之DatePicker 日期选择框

案例:选择日期

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择周

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" picker="week"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择月

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" picker="month"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择季度

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" picker="quarter"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择年份

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" picker="year"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择日期区间

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择日期时间区间

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" show-time/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择周区间

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" picker="week"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择月区间

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" picker="month"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:选择年区间

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" picker="year"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:日期格式

<script setup>
import {ref} from "vue";const date = ref(null)
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" format="YYYY年MM月DD日"/><a-divider/><a-typography-title>{{ date}}</a-typography-title></div>
</template>

在这里插入图片描述

案例:预设日期

<script setup>
import {ref} from "vue";
import dayjs from "dayjs"const date = ref(null)
const presets = [{label: "昨天",value: dayjs().add(-1, 'd')},{label: "上周",value: dayjs().add(-7, 'd')},{label: "上月",value: dayjs().add(-1, 'month')}
]
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" :presets="presets"/><a-divider/><a-typography-title>{{ date }}</a-typography-title></div>
</template>

在这里插入图片描述

案例:预设日期区间

<script setup>
import {ref} from "vue";
import dayjs from "dayjs"const date = ref(null)
const presets = [{label: "最近一周",value: [dayjs().add(-7, 'd'), dayjs()]},{label: "最近半月",value: [dayjs().add(-15, 'd'), dayjs()]},{label: "最近一月",value: [dayjs().add(-1, 'month'), dayjs()]}
]
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" :presets="presets"/><a-divider/><a-typography-title>{{ date }}</a-typography-title></div>
</template>

在这里插入图片描述

案例:日期选中事件

<script setup>
import {ref} from "vue";const date = ref(null)
const onChange = (date, dateStr) => {console.log(date)console.log(dateStr)
}
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-date-picker v-model:value="date" @change="onChange"/><a-divider/><a-typography-title>{{ date }}</a-typography-title></div>
</template>

在这里插入图片描述

案例:日期区间选中事件

<script setup>
import {ref} from "vue";const date = ref(null)
const onChange = (dates, dateStrs) => {console.log(dates)console.log(dateStrs)
}
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" @change="onChange"/><a-divider/><a-typography-title>{{ date }}</a-typography-title></div>
</template>

在这里插入图片描述

案例:显示中文

<script setup>
import {ref} from "vue";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN"const date = ref(null)
const onChange = (dates, dateStrs) => {console.log(dates)console.log(dateStrs)
}
</script>
<template><div class="p-8 bg-indigo-50 text-center"><a-range-picker v-model:value="date" @change="onChange" :locale="locale"/><a-divider/><a-typography-title>{{ date }}</a-typography-title></div>
</template>

在这里插入图片描述

相关文章:

Python私教张大鹏 Vue3整合AntDesignVue之DatePicker 日期选择框

案例&#xff1a;选择日期 <script setup> import {ref} from "vue";const date ref(null) </script> <template><div class"p-8 bg-indigo-50 text-center"><a-date-picker v-model:value"date"/><a-divide…...

springboot+vue前后端分离项目中使用jwt实现登录认证

文章目录 一、后端代码1.响应工具类2.jwt工具类3.登录用户实体类4.登录接口5.测试接口6.过滤器7.启动类 二、前端代码1.登录页index 页面 三、效果展示 一、后端代码 1.响应工具类 package com.etime.util;import com.etime.vo.ResponseModel; import com.fasterxml.jackson.…...

leetcode hot100 之 编辑距离

给你两个单词 word1 和 word2&#xff0c; 请返回将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作&#xff1a; 插入一个字符删除一个字符替换一个字符 输入&#xff1a;word1 “horse”, word2 “ros” 输出&#xff1a;3 解释&#xff1a…...

杨校老师项目之基于SpringBoot的理发店的预约管理系统

原系统是SSMJSP页面构成&#xff0c;先被修改为SpringBoot JSP页面 自助下载渠道: https://download.csdn.net/download/kese7952/89417001&#xff0c;或 点我下载 理发师信息&#xff1a; 理发师详细信息 公告信息 员工登录&#xff1a; 管理员登录...

SpringAI学习及搭建AI原生应用

文章目录 一、SpringAI是什么二、准备工作1.GPT-API-free2.AiCore3.eylink 三、对话案例实现1.创建项目2.实现简单的对话 四、聊天客户端ChatClient1.角色预设2.流式响应3.call和stream的区别 五、聊天模型提示词提示词模板 六、图像模型(文生图)七、语音模型1.文字转语音(文生…...

CobaltStrike权限传递MSF

一、测试环境 操作系统&#xff1a; 1.VMware17 2.kali 6.1.0-kali5-amd64 3.Win10x64 软件&#xff1a; 1.cs4.0 2.metasploit v6.3.4-dev 二、测试思路 1.cs是一款渗透测试工具&#xff0c;但没有漏洞利用的模块&#xff0c;我们可以在拿到目标主机的权限后&#xff0c;将…...

白嫖 kimi 接口 api

说明:kimi当然是免费使用的人工智能AI,但是要调用api是收费的. 项目&#xff1a; https://github.com/LLM-Red-Team/kimi-free-api 原文地址: https://blog.taoshuge.eu.org/p/272/ railway部署 步骤: 打开Github,新建仓库新建名为Dockerfile文件&#xff08;没有后缀&…...

借助ChatGPT完成课题申报书中框架思路写作指南

大家好&#xff0c;感谢关注。我是七哥&#xff0c;一个在高校里不务正业&#xff0c;折腾学术科研AI实操的学术人。可以和我&#xff08;yida985&#xff09;交流学术写作或ChatGPT等AI领域相关问题&#xff0c;多多交流&#xff0c;相互成就&#xff0c;共同进步 在课题申报…...

SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)

https://www.cnblogs.com/yxcblogs/p/18239433 题解写到博客园了&#xff0c;懒得复制了&#xff0c;直接放个链接吧~...

重温共射放大电路

1、放大概念 小功率信号变成一个大功率信号&#xff0c;需要一个核心器件做这件事&#xff0c;核心器件的能量由电源提供&#xff0c;通过核心器件用小功率的信号去控制大电源&#xff0c;来实现能量的转换和控制&#xff0c;前提是不能失真&#xff0c;可以用一系列正弦波进行…...

[DDR5 Jedec] 读操作 Read Command 精讲

依公知及经验整理&#xff0c;原创保护&#xff0c;禁止转载。 专栏 《深入理解DDR》 Read 读取命令也可以视为列读取命令。当与正确的bank地址和列地址结合使用时&#xff0c;通过激活命令&#xff08;行访问&#xff09;移动到检测放大器中的数据&#xff0c; 现在被推送到数…...

opencv 通过滑动条调整阈值处理、边缘检测、轮廓检测、模糊、色调调整和对比度增强参数 并实时预览效果

使用PySimpleGUI库创建了一个图形用户界面(GUI),用于实时处理来自OpenCV摄像头的图像。它允许用户应用不同的图像处理效果,如阈值处理、边缘检测、轮廓检测、模糊、色调调整和对比度增强。用户可以通过滑动条调整相关参数。 完整代码在文章最后,可以运行已经测试; 代码的…...

防火墙安全管理

大多数企业通过互联网传输关键数据&#xff0c;因此部署适当的网络安全措施是必要的&#xff0c;拥有足够的网络安全措施可以为网络基础设施提供大量的保护&#xff0c;防止黑客、恶意用户、病毒攻击和数据盗窃。 网络安全结合了多层保护来限制恶意用户&#xff0c;并仅允许授…...

MyQueue(队列)

目录 一、队列的定义 二、队列方法的实现 1、定义队列 2、后端插入 3、前端操作 4、判断队列是否为空 5、队列大小 三、队列方法的使用 一、队列的定义 队列是一种特殊的线性表&#xff0c;特殊之处在于它只允许在表的前端&#xff08;front&#xff09;进行删除操作&am…...

【Pytorch】一文向您详细介绍 torch.nn.DataParallel() 的作用和用法

【Pytorch】一文向您详细介绍 torch.nn.DataParallel() 的作用和用法 下滑查看解决方法 &#x1f308; 欢迎莅临我的个人主页 &#x1f448;这里是我静心耕耘深度学习领域、真诚分享知识与智慧的小天地&#xff01;&#x1f387; &#x1f393; 博主简介&#xff1a;985高…...

Windows本地使用SSH连接VM虚拟机

WIN10 VM17.5 Ubuntu:20.04 1.网路设置 1)选择编辑->更改设置 配置完成 2.修改了服务器文件&#xff0c;修改sshd配置&#xff0c;在此文件下/etc/ssh/sshd_config&#xff0c;以下为比较重要的配置 PasswordAuthentication yes PermitRootLogin yes PubkeyAuthenticat…...

RPC(远程过程调用):技术原理、应用场景与发展趋势

摘要&#xff1a; RPC&#xff08;Remote Procedure Call&#xff09;是一种通信协议&#xff0c;用于实现跨网络的进程间通信。它提供了一种简单高效的方式&#xff0c;使得分布式系统中的不同组件能够像调用本地函数一样调用远程函数。本篇博客将介绍RPC的基本概念&#xff0…...

iSCSI和FC存储

iSCSI存储和FC存储的特点和区别 FC存储和iSCSI存储是两种主要的网络存储解决方案&#xff0c;它们各自在性能、成本和适用场景上有着不同的特点。 FC存储是一种基于光纤通道技术的高性能、低延迟的存储解决方案。它使用专用的光纤通道网络连接存储设备和服务器&#xff0c;确…...

MPT(merkle Patricia trie )及理解solidity里的storage

what&#xff1f; MPT树是一种数据结构&#xff0c;用于在以太坊区块链中高效地存储和检索账户状态、交易历史和其他重要数据。MPT树的设计旨在结合Merkle树和Patricia树的优点&#xff0c;以提供高效的数据存储和验证 MPT树由四种类型的节点组成&#xff1a; **扩展节点&…...

【代码随想录算法训练营第三十五天】 | 1005.K次取反后最大化的数组和 134.加油站 135.分发糖果

贪心章节的题目&#xff0c;做不出来看题解的时候&#xff0c;千万别有 “为什么这都没想到” 的感觉&#xff0c;想不出来是正常的&#xff0c;转变心态 “妙啊&#xff0c;又学到了新的思路” &#xff0c;这样能避免消极的心态对做题效率的影响。 134. 加油站 按卡哥的思路…...

Zustand 状态管理库:极简而强大的解决方案

Zustand 是一个轻量级、快速和可扩展的状态管理库&#xff0c;特别适合 React 应用。它以简洁的 API 和高效的性能解决了 Redux 等状态管理方案中的繁琐问题。 核心优势对比 基本使用指南 1. 创建 Store // store.js import create from zustandconst useStore create((set)…...

2021-03-15 iview一些问题

1.iview 在使用tree组件时&#xff0c;发现没有set类的方法&#xff0c;只有get&#xff0c;那么要改变tree值&#xff0c;只能遍历treeData&#xff0c;递归修改treeData的checked&#xff0c;发现无法更改&#xff0c;原因在于check模式下&#xff0c;子元素的勾选状态跟父节…...

2025 后端自学UNIAPP【项目实战:旅游项目】6、我的收藏页面

代码框架视图 1、先添加一个获取收藏景点的列表请求 【在文件my_api.js文件中添加】 // 引入公共的请求封装 import http from ./my_http.js// 登录接口&#xff08;适配服务端返回 Token&#xff09; export const login async (code, avatar) > {const res await http…...

Springcloud:Eureka 高可用集群搭建实战(服务注册与发现的底层原理与避坑指南)

引言&#xff1a;为什么 Eureka 依然是存量系统的核心&#xff1f; 尽管 Nacos 等新注册中心崛起&#xff0c;但金融、电力等保守行业仍有大量系统运行在 Eureka 上。理解其高可用设计与自我保护机制&#xff0c;是保障分布式系统稳定的必修课。本文将手把手带你搭建生产级 Eur…...

如何理解 IP 数据报中的 TTL?

目录 前言理解 前言 面试灵魂一问&#xff1a;说说对 IP 数据报中 TTL 的理解&#xff1f;我们都知道&#xff0c;IP 数据报由首部和数据两部分组成&#xff0c;首部又分为两部分&#xff1a;固定部分和可变部分&#xff0c;共占 20 字节&#xff0c;而即将讨论的 TTL 就位于首…...

短视频矩阵系统文案创作功能开发实践,定制化开发

在短视频行业迅猛发展的当下&#xff0c;企业和个人创作者为了扩大影响力、提升传播效果&#xff0c;纷纷采用短视频矩阵运营策略&#xff0c;同时管理多个平台、多个账号的内容发布。然而&#xff0c;频繁的文案创作需求让运营者疲于应对&#xff0c;如何高效产出高质量文案成…...

使用Spring AI和MCP协议构建图片搜索服务

目录 使用Spring AI和MCP协议构建图片搜索服务 引言 技术栈概览 项目架构设计 架构图 服务端开发 1. 创建Spring Boot项目 2. 实现图片搜索工具 3. 配置传输模式 Stdio模式&#xff08;本地调用&#xff09; SSE模式&#xff08;远程调用&#xff09; 4. 注册工具提…...

华为OD机考-机房布局

import java.util.*;public class DemoTest5 {public static void main(String[] args) {Scanner in new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextLine()) { // 注意 while 处理多个 caseSystem.out.println(solve(in.nextLine()));}}priv…...

scikit-learn机器学习

# 同时添加如下代码, 这样每次环境(kernel)启动的时候只要运行下方代码即可: # Also add the following code, # so that every time the environment (kernel) starts, # just run the following code: import sys sys.path.append(/home/aistudio/external-libraries)机…...

[大语言模型]在个人电脑上部署ollama 并进行管理,最后配置AI程序开发助手.

ollama官网: 下载 https://ollama.com/ 安装 查看可以使用的模型 https://ollama.com/search 例如 https://ollama.com/library/deepseek-r1/tags # deepseek-r1:7bollama pull deepseek-r1:7b改token数量为409622 16384 ollama命令说明 ollama serve #&#xff1a…...