DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕
目录
- DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
- 📚前言
- 📚页面效果
- 📚指令输入
- 属性定义
- 1. 外观相关
- 2. 位置相关
- 3. 交互相关
- 4. 动画相关
- 事件定义
- 其他
- 📚think
- 📘组件代码
- 📚代码测试
- 📚测试代码正常跑通,附其他基本代码
- 📘编写路由 src\router\index.js
- 📘编写展示入口 src\App.vue
- 📚页面效果
- 📚相关文章
📚📗📕📘📖🕮💡📝🗂️✍️🛠️💻🚀🎉🏗️🌐🖼️🔗📊👉🔖⚠️🌟🔐⬇️·正文开始
⬇️·🎥😊🎓📩😺🌈🤝🤖📜📋🔍✅🧰❓📄📢📈 🙋0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆗*️⃣#️⃣
DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
📚前言
DeepSeek 作为大语言模型领域的杰出代表,凭借其独特的技术优势、广泛的应用场景和卓越的市场表现,在人工智能发展历程中留下了浓墨重彩的一笔。
从技术特点来看,DeepSeek 融合了自然语言处理、机器学习与深度学习等前沿技术,采用了创新的架构和训练方法,如混合专家(MoE)架构和 FP8 混合精度训练技术,在性能、成本等方面展现出了显著的优势。与其他大模型相比,DeepSeek 在多项评测中表现出色,性能可与顶级闭源模型媲美,同时训练成本和推理成本大幅降低,为大语言模型的发展提供了新的思路和方向。
📚页面效果
📚指令输入
已经创建好了一个基于Vue3的组合式API的项目(Composition API),并能正常运行起来,请帮我用 Vue3的组合式API(Composition API) 生成一个 悬浮按钮(Floating Action Button) 的功能组件,所有代码都保存在components/FloatingActionButton 下的文件夹中。功能组件的script标签中只有setup属性,使用普通 JavaScript 实现,不使用TypeScript。
功能要有,如下属性:
属性定义
1. 外观相关
icon
- 说明:设置悬浮按钮上显示的图标,可以是图标库的类名或者 SVG 图标代码。
- 类型:字符串
- 默认值:空字符串
color
- 说明:设置按钮的背景颜色。
- 类型:字符串(CSS 颜色值)
- 默认值:常见的主题色,如
#007bff
textColor
- 说明:设置按钮内文字或图标的颜色。
- 类型:字符串(CSS 颜色值)
- 默认值:
#fff
size
- 说明:设置按钮的大小,如小、中、大。
- 类型:字符串,可选值为
small
、medium
、large
等 - 默认值:
medium
shape
- 说明:设置按钮的形状,如圆形、方形等。
- 类型:字符串,可选值为
circle
、square
等 - 默认值:
circle
2. 位置相关
position
- 说明:设置按钮的悬浮位置,如右下角、左下角等。
- 类型:字符串,可选值为
bottom-right
、bottom-left
、top-right
、top-left
等 - 默认值:
bottom-right
offsetX
- 说明:按钮相对于默认位置在 X 轴上的偏移量。
- 类型:数字
- 默认值:0
offsetY
- 说明:按钮相对于默认位置在 Y 轴上的偏移量。
- 类型:数字
- 默认值:0
3. 交互相关
disabled
- 说明:设置按钮是否禁用。
- 类型:布尔值
- 默认值:
false
tooltip
- 说明:设置鼠标悬停在按钮上时显示的提示信息。
- 类型:字符串
- 默认值:空字符串
4. 动画相关
animate
- 说明:设置按钮是否开启动画效果,如淡入淡出、缩放等。
- 类型:布尔值
- 默认值:
true
animationType
- 说明:设置动画的类型。
- 类型:字符串,可选值为
fade
、scale
等 - 默认值:
fade
事件定义
click
- 说明:当按钮被点击时触发该事件,可用于执行特定的操作,如打开模态框、提交表单等。
- 参数:无
mouseenter
- 说明:当鼠标进入按钮区域时触发该事件,可用于显示提示信息或执行一些动画效果。
- 参数:无
mouseleave
- 说明:当鼠标离开按钮区域时触发该事件,可用于隐藏提示信息或恢复动画效果。
- 参数:无
其他
- 可访问性:为按钮添加
aria-label
属性,确保屏幕阅读器能够正确识别按钮的功能;同时,为按钮添加适当的焦点样式,方便键盘操作。 - 响应式设计:考虑按钮在不同屏幕尺寸下的显示效果,例如在小屏幕上调整按钮的大小和位置。
- 动画优化:合理设置动画的时长和缓动函数,避免动画过于生硬或影响性能。
- 嵌套使用:支持在按钮内部嵌套其他组件,如 Badge 组件,以显示额外的信息。
- 事件代理:如果有多个悬浮按钮,可以考虑使用事件代理来处理点击事件,提高性能。
你有更好的建议也可以添加,要注明。组件定义好后给出5个及以上的调用示例。
下面是现有目录
vueAndDeepseek/
├── src/ # 源代码目录
│ ├── assets/ # 静态资源
│ │ ├── base.css
│ │ ├── main.css
│ │ └── logo.svg
│ ├── components/ # 组件目录
│ │ ├── HelloWorld.vue
│ │ ├── TheWelcome.vue
│ │ ├── WelcomeItem.vue
│ │ ├── Progress/
│ │ │ └── Progress.vue
│ │ ├── Accordion/
│ │ ├── BackToTop/
│ │ ├── Card/
│ │ ├── InfiniteScroll/
│ │ ├── Notification/
│ │ ├── Timeline/
│ │ ├── Switch/
│ │ ├── Tabs/
│ │ ├── Sidebar/
│ │ ├── Breadcrumbs/
│ │ ├── MasonryLayout/
│ │ ├── Rating/
│ │ ├── ColorPicker/
│ │ ├── RightClickMenu/
│ │ ├── RangePicker/
│ │ ├── Navbar/
│ │ ├── FormValidation/
│ │ ├── CopyToClipboard/
│ │ ├── ClickAnimations/
│ │ ├── ThumbnailList/
│ │ ├── KeyboardShortcuts/
│ │ ├── CommentSystem/
│ │ ├── QRCode/
│ │ ├── RadioButton/
│ │ ├── Slider/
│ │ ├── ScrollAnimations/
│ │ ├── TextInput/
│ │ ├── Divider/
│ │ ├── Checkbox/
│ │ ├── TagInput/
│ │ ├── DropdownSelect/
│ │ ├── List/
│ │ ├── Header/
│ │ ├── Footer/
│ │ ├── Pagination/
│ │ ├── FloatingActionButton/
│ │ ├── DatePicker/
│ │ └── icons/
│ ├── router/ # 路由配置
│ │ └── index.js
│ ├── stores/ # Pinia 状态管理
│ │ └── counter.js
│ ├── views/ # 页面组件
│ │ ├── ProgressView.vue
│ │ ├── TabsView.vue
│ │ ├── SwitchView.vue
│ │ ├── TimelineView.vue
│ │ ├── NotificationView.vue
│ │ ├── CardView.vue
│ │ ├── InfiniteScrollView.vue
│ │ ├── BackToTopView.vue
│ │ ├── AccordionView.vue
│ │ ├── SidebarView.vue
│ │ ├── BreadcrumbsView.vue
│ │ ├── MasonryLayoutView.vue
│ │ ├── RatingView.vue
│ │ ├── ColorPickerView.vue
│ │ ├── RightClickMenuView.vue
│ │ ├── RangePickerView.vue
│ │ ├── NavbarView.vue
│ │ ├── FormValidationView.vue
│ │ ├── CopyToClipboardView.vue
│ │ ├── ClickAnimationsView.vue
│ │ ├── ThumbnailListView.vue
│ │ ├── KeyboardShortcutsView.vue
│ │ ├── CommentSystemView.vue
│ │ ├── QRCodeView.vue
│ │ ├── RadioButtonView.vue
│ │ ├── SliderView.vue
│ │ ├── ScrollAnimationsView.vue
│ │ ├── TextInputView.vue
│ │ ├── DividerView.vue
│ │ ├── CheckboxView.vue
│ │ ├── TagInputView.vue
│ │ ├── DropdownSelectView.vue
│ │ ├── ListView.vue
│ │ ├── HeaderView.vue
│ │ ├── FooterView.vue
│ │ ├── PaginationView.vue
│ │ ├── FloatingActionButtonView.vue
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── public/ # 公共资源目录
├── index.html # HTML 模板
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依赖包目录
📚think
📘组件代码
以下是按照您的要求创建的悬浮按钮组件:
<!-- src/components/FloatingActionButton/FloatingActionButton.vue -->
<template><buttonclass="fab":class="[sizeClass,shapeClass,positionClass,animationClass,{ 'fab--disabled': disabled }]":style="{backgroundColor: color,color: textColor,...positionStyles}":disabled="disabled":aria-label="ariaLabel"@click="handleClick"@mouseenter="handleMouseEnter"@mouseleave="handleMouseLeave"><!-- 图标显示 --><div v-if="isSvg" class="fab-icon" v-html="icon"></div><i v-else-if="icon" class="fab-icon" :class="icon"></i><!-- 默认插槽 --><slot></slot><!-- 工具提示 --><span v-if="tooltip" class="fab-tooltip">{{ tooltip }}</span></button>
</template><script setup>
import { computed } from 'vue';const props = defineProps({// 外观相关icon: { type: String, default: '' },color: { type: String, default: '#007bff' },textColor: { type: String, default: '#fff' },size: { type: String, default: 'medium',validator: v => ['small', 'medium', 'large'].includes(v)},shape: {type: String,default: 'circle',validator: v => ['circle', 'square'].includes(v)},// 位置相关position: {type: String,default: 'bottom-right',validator: v => ['bottom-right', 'bottom-left', 'top-right', 'top-left'].includes(v)},offsetX: { type: Number, default: 0 },offsetY: { type: Number, default: 0 },// 交互相关disabled: { type: Boolean, default: false },tooltip: { type: String, default: '' },// 动画相关animate: { type: Boolean, default: true },animationType: {type: String,default: 'fade',validator: v => ['fade', 'scale'].includes(v)}
});const emit = defineEmits(['click', 'mouseenter', 'mouseleave']);// 计算属性
const isSvg = computed(() => props.icon.startsWith('<svg'));
const ariaLabel = computed(() => props.tooltip || 'Floating Action Button');// 样式类计算
const sizeClass = computed(() => `fab--${props.size}`);
const shapeClass = computed(() => `fab--${props.shape}`);
const positionClass = computed(() => `fab--${props.position.replace('-', '_')}`);
const animationClass = computed(() => props.animate ? `fab--animate-${props.animationType}` : ''
);// 位置样式计算
const positionStyles = computed(() => {const [vertical, horizontal] = props.position.split('-');return {[vertical]: `${props.offsetY}px`,[horizontal]: `${props.offsetX}px`};
});// 事件处理
const handleClick = (e) => {if (!props.disabled) emit('click', e);
};
const handleMouseEnter = (e) => emit('mouseenter', e);
const handleMouseLeave = (e) => emit('mouseleave', e);
</script><style scoped>
.fab {position: fixed;display: flex;align-items: center;justify-content: center;border: none;cursor: pointer;transition: all 0.3s ease;box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);z-index: 999;
}/* 尺寸 */
.fab--small {width: 40px;height: 40px;font-size: 16px;
}
.fab--medium {width: 56px;height: 56px;font-size: 24px;
}
.fab--large {width: 64px;height: 64px;font-size: 32px;
}/* 形状 */
.fab--circle { border-radius: 50%; }
.fab--square { border-radius: 8px; }/* 位置 */
.fab--bottom_right { bottom: 0; right: 0; }
.fab--bottom_left { bottom: 0; left: 0; }
.fab--top_right { top: 0; right: 0; }
.fab--top_left { top: 0; left: 0; }/* 动画 */
.fab--animate-fade { opacity: 0.9; }
.fab--animate-fade:hover { opacity: 1; }
.fab--animate-scale { transform: scale(1); }
.fab--animate-scale:hover { transform: scale(1.1); }/* 禁用状态 */
.fab--disabled {opacity: 0.6;cursor: not-allowed;filter: grayscale(0.5);
}/* 工具提示 */
.fab-tooltip {position: absolute;background: rgba(0, 0, 0, 0.8);color: white;padding: 6px 12px;border-radius: 4px;font-size: 12px;white-space: nowrap;pointer-events: none;opacity: 0;transition: opacity 0.2s;
}
.fab:hover .fab-tooltip {opacity: 1;
}
.fab--bottom_right .fab-tooltip { right: 100%; top: 50%; transform: translateY(-50%); margin-right: 8px; }
.fab--bottom_left .fab-tooltip { left: 100%; top: 50%; transform: translateY(-50%); margin-left: 8px; }
.fab--top_right .fab-tooltip { right: 100%; bottom: 50%; transform: translateY(50%); margin-right: 8px; }
.fab--top_left .fab-tooltip { left: 100%; bottom: 50%; transform: translateY(50%); margin-left: 8px; }/* 响应式 */
@media (max-width: 768px) {.fab--medium {width: 48px;height: 48px;font-size: 20px;}
}
</style>
以下是5个调用示例:
<!-- 基本用法 -->
<FloatingActionButtonicon="fas fa-plus"@click="handleAdd"
/><!-- 自定义颜色和位置 -->
<FloatingActionButtonicon="fas fa-share"color="#4CAF50"textColor="#ffffff"position="top-right":offsetX="20":offsetY="20"
/><!-- 方形大号按钮 -->
<FloatingActionButtonicon="fas fa-download"size="large"shape="square"tooltip="下载文件"
/><!-- 禁用状态 -->
<FloatingActionButtonicon="fas fa-gear":disabled="true"animation-type="scale"
/><!-- SVG 图标 -->
<FloatingActionButton:icon="'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\"><path fill=\"currentColor\" d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"/></svg>'"color="#FF4081"position="bottom-left"
/>
改进建议:
- 添加键盘导航支持(通过添加tabindex和keydown事件处理)
- 增加涟漪点击动画效果
- 支持自定义阴影样式
- 添加点击波紋效果
- 支持更多动画类型(如rotate)
- 添加拖拽位置调整功能(通过draggable prop控制)
- 支持响应式位置(在不同屏幕尺寸下使用不同的位置)
您可以根据实际需求选择是否添加这些改进功能。
📚代码测试
运行正常,需要自己添加一个svg。
📚测试代码正常跑通,附其他基本代码
- 添加路由
- 页面展示入口
📘编写路由 src\router\index.js
import { createRouter, createWebHistory } from 'vue-router'
import RightClickMenuView from '../views/RightClickMenuView.vue'
import RangePickerView from '../views/RangePickerView.vue'const router = createRouter({history: createWebHistory(import.meta.env.BASE_URL),routes: [{path: '/',name: 'progress',component: () => import('../views/ProgressView.vue'),},{path: '/tabs',name: 'tabs',// route level code-splitting// this generates a separate chunk (About.[hash].js) for this route// which is lazy-loaded when the route is visited.// 标签页(Tabs)component: () => import('../views/TabsView.vue'),},{path: '/accordion',name: 'accordion',// 折叠面板(Accordion)component: () => import('../views/AccordionView.vue'),},{path: '/timeline',name: 'timeline',// 时间线(Timeline)component: () => import('../views/TimelineView.vue'),},{path: '/backToTop',name: 'backToTop',component: () => import('../views/BackToTopView.vue')},{path: '/notification',name: 'notification',component: () => import('../views/NotificationView.vue')},{path: '/card',name: 'card',component: () => import('../views/CardView.vue')},{path: '/infiniteScroll',name: 'infiniteScroll',component: () => import('../views/InfiniteScrollView.vue')},{path: '/switch',name: 'switch',component: () => import('../views/SwitchView.vue')},{path: '/sidebar',name: 'sidebar',component: () => import('../views/SidebarView.vue')},{path: '/breadcrumbs',name: 'breadcrumbs',component: () => import('../views/BreadcrumbsView.vue')},{path: '/masonryLayout',name: 'masonryLayout',component: () => import('../views/MasonryLayoutView.vue')},{path: '/rating',name: 'rating',component: () => import('../views/RatingView.vue')},{path: '/datePicker',name: 'datePicker',component: () => import('../views/DatePickerView.vue')},{path: '/colorPicker',name: 'colorPicker',component: () => import('../views/ColorPickerView.vue')},{path: '/rightClickMenu',name: 'rightClickMenu',component: RightClickMenuView},{path: '/rangePicker',name: 'rangePicker',component: () => import('../views/RangePickerView.vue')},{path: '/navbar',name: 'navbar',component: () => import('../views/NavbarView.vue')},{path: '/formValidation',name: 'formValidation',component: () => import('../views/FormValidationView.vue')},{path: '/copyToClipboard',name: 'copyToClipboard',component: () => import('../views/CopyToClipboardView.vue')},{path: '/clickAnimations',name: 'clickAnimations',component: () => import('../views/ClickAnimationsView.vue')},{path: '/thumbnailList',name: 'thumbnailList',component: () => import('../views/ThumbnailListView.vue')},{path: '/keyboardShortcuts',name: 'keyboardShortcuts',component: () => import('../views/KeyboardShortcutsView.vue')},{path: '/commentSystem',name: 'commentSystem',component: () => import('../views/CommentSystemView.vue')},{path: '/qRCode',name: 'qRCode',component: () => import('../views/QRCodeView.vue')},{path: '/radioButton',name: 'radioButton',component: () => import('../views/RadioButtonView.vue')},{path: '/slider',name: 'slider',component: () => import('../views/SliderView.vue')},{path: '/scrollAnimations',name: 'scrollAnimations',component: () => import('../views/ScrollAnimationsView.vue')},{path: '/textInputView',name: 'textInputView',component: () => import('../views/TextInputView.vue')},{path: '/divider',name: 'divider',component: () => import('../views/DividerView.vue')},{path: '/checkbox',name: 'checkbox',component: () => import('../views/CheckboxView.vue')},{path: '/tagInput',name: 'tagInput',component: () => import('../views/TagInputView.vue')},{path: '/dropdownSelect',name: 'dropdownSelect',component: () => import('../views/DropdownSelectView.vue')},{path: '/list',name: 'list',component: () => import('../views/ListView.vue')},{path: '/header',name: 'header',component: () => import('../views/HeaderView.vue')},{path: '/footer',name: 'footer',component: () => import('../views/FooterView.vue')},{path: '/pagination',name: 'pagination',component: () => import('../views/PaginationView.vue')},{path: '/floatingActionButton',name: 'floatingActionButton',component: () => import('../views/FloatingActionButtonView.vue')}],
})export default router
📘编写展示入口 src\App.vue
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script><template><header><img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" /><div class="wrapper"><HelloWorld msg="You did it!" /><nav><RouterLink to="/">Progress</RouterLink><RouterLink to="/tabs">Tabs</RouterLink><RouterLink to="/accordion">Accordion</RouterLink><RouterLink to="/timeline">Timeline</RouterLink><RouterLink to="/backToTop">BackToTop</RouterLink><RouterLink to="/notification">Notification</RouterLink><RouterLink to="/card">Card</RouterLink><RouterLink to="/infiniteScroll">InfiniteScroll</RouterLink><RouterLink to="/switch">Switch</RouterLink><RouterLink to="/sidebar">Sidebar</RouterLink><RouterLink to="/breadcrumbs">Breadcrumbs</RouterLink><RouterLink to="/masonryLayout">MasonryLayout</RouterLink><RouterLink to="/rating">Rating</RouterLink><RouterLink to="/datePicker">DatePicker</RouterLink><RouterLink to="/colorPicker">ColorPicker</RouterLink><RouterLink to="/rightClickMenu">RightClickMenu</RouterLink><RouterLink to="/rangePicker">RangePicker</RouterLink><RouterLink to="/navbar">Navbar</RouterLink><RouterLink to="/formValidation">FormValidation</RouterLink><RouterLink to="/copyToClipboard">CopyToClipboard</RouterLink><RouterLink to="/clickAnimations">ClickAnimations</RouterLink><RouterLink to="/thumbnailList">ThumbnailList</RouterLink><RouterLink to="/keyboardShortcuts">KeyboardShortcuts</RouterLink><RouterLink to="/commentSystem">CommentSystem</RouterLink><RouterLink to="/qRCode">QRCode</RouterLink><RouterLink to="/radioButton">RadioButton</RouterLink><RouterLink to="/slider">Slider</RouterLink><RouterLink to="/scrollAnimations">ScrollAnimations</RouterLink><RouterLink to="/textInputView">TextInput</RouterLink><RouterLink to="/divider">Divider</RouterLink><RouterLink to="/checkbox">Checkbox</RouterLink><RouterLink to="/tagInput">TagInput</RouterLink><RouterLink to="/dropdownSelect">DropdownSelect</RouterLink><RouterLink to="/list">List</RouterLink><RouterLink to="/header">Header</RouterLink><RouterLink to="/footer">Footer</RouterLink><RouterLink to="/pagination">Pagination</RouterLink><RouterLink to="/floatingActionButton">FloatingActionButton</RouterLink></nav></div></header><RouterView />
</template><style scoped>
header {line-height: 1.5;max-height: 100vh;
}.logo {display: block;margin: 0 auto 2rem;
}nav {width: 100%;font-size: 12px;text-align: center;margin-top: 2rem;
}nav a.router-link-exact-active {color: var(--color-text);
}nav a.router-link-exact-active:hover {background-color: transparent;
}nav a {display: inline-block;padding: 0 1rem;border-left: 1px solid var(--color-border);
}nav a:first-of-type {border: 0;
}@media (min-width: 1024px) {header {display: flex;place-items: center;padding-right: calc(var(--section-gap) / 2);}.logo {margin: 0 2rem 0 0;}header .wrapper {display: flex;place-items: flex-start;flex-wrap: wrap;}nav {text-align: left;margin-left: -1rem;font-size: 1rem;padding: 1rem 0;margin-top: 1rem;}
}
</style>
📚页面效果
📚相关文章
-
DeepSeek 助力 Vue 开发:打造丝滑的右键菜单(RightClickMenu)https://blog.csdn.net/qq_33650655/article/details/145706658
-
DeepSeek 助力 Vue 开发:打造丝滑的范围选择器(Range Picker)https://blog.csdn.net/qq_33650655/article/details/145713572
-
DeepSeek 助力 Vue 开发:打造丝滑的导航栏(Navbar)https://blog.csdn.net/qq_33650655/article/details/145732421
-
DeepSeek 助力 Vue 开发:打造丝滑的表单验证(Form Validation)https://blog.csdn.net/qq_33650655/article/details/145735582
-
DeepSeek 助力 Vue 开发:打造丝滑的复制到剪贴板(Copy to Clipboard)https://blog.csdn.net/qq_33650655/article/details/145739569
-
DeepSeek 助力 Vue 开发:打造丝滑的点击动画(Click Animations)https://blog.csdn.net/qq_33650655/article/details/145766184
-
DeepSeek 助力 Vue 开发:打造丝滑的缩略图列表(Thumbnail List)https://blog.csdn.net/qq_33650655/article/details/145776679
-
DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts) https://blog.csdn.net/qq_33650655/article/details/145780227
-
DeepSeek 助力 Vue 开发:打造丝滑的评论系统(Comment System)https://blog.csdn.net/qq_33650655/article/details/145781104
-
DeepSeek 助力 Vue 开发:打造丝滑的二维码生成(QR Code)https://blog.csdn.net/qq_33650655/article/details/145797928
-
DeepSeek 助力 Vue 开发:打造丝滑的单选按钮(Radio Button)https://blog.csdn.net/qq_33650655/article/details/145810620
-
DeepSeek 助力 Vue 开发:打造丝滑的滑块(Slider)https://blog.csdn.net/qq_33650655/article/details/145817161
-
DeepSeek 助力 Vue 开发:打造丝滑的滚动动画(Scroll Animations)https://blog.csdn.net/qq_33650655/article/details/145818571
-
DeepSeek 助力 Vue 开发:打造丝滑的文本输入框(Text Input)https://blog.csdn.net/qq_33650655/article/details/145837003
-
DeepSeek 助力 Vue 开发:打造丝滑的分割线(Divider)https://blog.csdn.net/qq_33650655/article/details/145849100
-
DeepSeek 助力 Vue 开发:打造丝滑的 复选框(Checkbox)https://blog.csdn.net/qq_33650655/article/details/145855695
-
DeepSeek 助力 Vue3 开发:打造丝滑的标签输入(Tag Input)https://blog.csdn.net/qq_33650655/article/details/145858574
-
DeepSeek 助力 Vue3 开发:打造丝滑的下拉选择框(Dropdown Select)https://blog.csdn.net/qq_33650655/article/details/145861882
-
DeepSeek 助力 Vue3 开发:打造丝滑的列表(List)https://blog.csdn.net/qq_33650655/article/details/145866384
-
DeepSeek 助力 Vue3 开发:打造丝滑的页眉(Header)https://blog.csdn.net/qq_33650655/article/details/145885122
-
DeepSeek 助力 Vue3 开发:打造丝滑的页脚(Footer)https://blog.csdn.net/qq_33650655/article/details/145886306
-
DeepSeek 助力 Vue3 开发:打造丝滑的分页(Pagination)https://blog.csdn.net/qq_33650655/article/details/145886824
到此这篇文章就介绍到这了,更多精彩内容请关注本人以前的文章或继续浏览下面的文章,创作不易,如果能帮助到大家,希望大家多多支持宝码香车~💕,若转载本文,一定注明本文链接。
更多专栏订阅推荐:
👍 html+css+js 绚丽效果
💕 vue
✈️ Electron
⭐️ js
📝 字符串
✍️ 时间对象(Date())操作
相关文章:
DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏关注哦 💕 目录 Deep…...
ES from size聚合查询10000聚合查询,是每个分片先聚合,再统计。还是所有节点查询1万条后,再聚合
在 Elasticsearch 中,聚合查询 的执行过程是 分布式 的,Elasticsearch 会先在每个分片(shard)上执行本地聚合,然后再在协调节点(coordinating node)上对所有分片的聚合结果进行 全局汇总。具体过…...
fluent-ffmpeg 依赖详解
fluent-ffmpeg 是一个用于在 Node.js 环境中与 FFmpeg 进行交互的强大库,它提供了流畅的 API 来执行各种音视频处理任务,如转码、剪辑、合并等。 一、安装 npm install fluent-ffmpeg二、基本使用 要使用 fluent-ffmpeg,首先需要确保系统中…...
SLAM文献之-DROID-SLAM: Deep Visual SLAM for Monocular, Stereo, and RGB-D Cameras
DROID-SLAM 是一种结合深度学习与传统视觉SLAM技术的先进算法,其核心目标是通过端到端可训练的深度神经网络来实现高精度的相机位姿估计和稠密三维重建。与传统SLAM方法不同,DROID-SLAM采用深度学习网络来估计深度信息,提供更高的精度与鲁棒性…...
一、旋转编码器模块分析与使用
一、旋转编码器说明 该模块配合定时器的encoder使用时,可通过旋转来进行调整记录编码的数值。(通过旋转编码器的数值与字母建立对应关系,即可进行打字编码) 引脚说明: vcc,gnd,供电使用 sw&am…...
【踩坑日志】解决CU118环境下RuntimeError: NCCL error: invalid usage
本博客主要记录了CU118环境下,出现报错信息为RuntimeError: NCCL error: invalid usage的解决方案。我的环境信息如下: cuda版本:11.7torch版本:torch-2.5.1-cu118 定位到核心报错信息为: NCCL WARN NCCL cannot be …...
FREERTOS的三种调度方式
一、调度器的调度方式 调度器的调度方式解释针对的对象抢占式调度1.高优先级的抢占低优先级的任务 2.高优先级的任务不停止,低优先级的任务不能执行 3.被强占的任务会进入就绪态优先级不同的任务时间片调度1.同等优先级任务轮流享用CPU时间 2.没有用完的时间片&…...
338.比特位计数<动态规划>
338. 比特位计数 - 力扣(LeetCode) class Solution { public:vector<int> countBits(int n) {//将所有数初始化为0vector<int>dp(n1,0);for(int i 0; i<n;i){if(i % 2 0){dp[i] dp[i/2];}else{dp[i] dp[i/2]1;}}return dp;} };...
释放你的IDE潜能:Code::Blocks 插件创意开发深度指南
释放你的IDE潜能:Code::Blocks 插件创意开发深度指南 在软件开发的浩瀚世界中,集成开发环境 (IDE) 扮演着至关重要的角色。一款优秀的 IDE 不仅能提升开发效率,更能激发开发者的创造力。Code::Blocks,作为一款开源、跨平台的 C, C++ 和 Fortran IDE,以其轻量级、高度可定…...
行星际激波与高能粒子的相互作用机制及其天体物理意义
第一章 行星际激波的物理本质与形成机制 1.1 激波的普遍定义与分类 激波(Shock Wave)是介质中传播的压缩性不连续面,其本质是介质参数(如密度、速度、压力)的突变。在天体物理中,根据激波传播方向与磁场…...
C# 牵手DeepSeek:打造本地AI超能力
一、引言 在人工智能飞速发展的当下,大语言模型如 DeepSeek 正掀起新一轮的技术变革浪潮,为自然语言处理领域带来了诸多创新应用。随着数据隐私和安全意识的提升,以及对模型部署灵活性的追求,本地部署 DeepSeek 成为众多开发者和…...
不同版本的BLE和WiFi有什么区别?
一、蓝牙技术对比:从 Bluetooth 4.0 到 5.3 的演进与室内定位应用 蓝牙技术自推出以来,经历了多次重大升级,每一代都在传输速率、功耗、覆盖范围和功能上有所改进。本文将从 Bluetooth 4.0 到 5.3,逐一对比各版本的特点࿰…...
LVS+Keepalived高可用高性能负载实战
高可用集群( High Availability Cluster, HA 集群),其中高可用的含义是最大限度地可以使用。从集群 的名字上可以看出,此类集群实现的功能是保障用户的应用程序持久、不间断地提供服务。 当应用程序出现故障或者系统硬件、网络出现…...
网络安全-使用DeepSeek来获取sqlmap的攻击payload
文章目录 概述DeepSeek使用创建示例数据库创建API测试sqlmap部分日志参考 概述 今天来使用DeepSeek做安全测试,看看在有思路的情况下实现的快不快。 DeepSeek使用 我有一个思路,想要测试sqlmap工具如何dump数据库的: 连接mysql数据库&#…...
【MongoDB】在Windows11下安装与使用
官网下载链接:Download MongoDB Community Server 官方参考文档:https://www.mongodb.com/zh-cn/docs/manual/tutorial/install-mongodb-on-windows/#std-label-install-mdb-community-windows 选择custom类型,其他默认 注意,此选…...
vscode输入!+tab没反应??
!+tab直接生成html框架 第一步 ctrlshipp 选择更改语言模式 change language mode, 选择HTML 然后试一下行不行,如果还不行看第二步 第二步 检查一下输入的!是不是英文输入法输入的,一定要是英文输入&…...
【Cadence射频仿真学习笔记】2.4GHz低噪放LNA仿真设计
课程分为3个部分, 一、LNA结构与噪声优化方法 噪声优化的方法是:限定功耗的噪声和功率同时匹配噪声匹配和功率匹配一般不会同时达到, 对于PCSNIM结构的噪声分析,我们只需要了解与哪些参数有关优化思路是:1.信号源阻抗…...
初阶MySQL(两万字全面解析)
文章目录 1.初识MySQL1.1数据库1.2查看数据库1.3创建数据库1.4字符集编码和排序规则1.5修改数据库1.6删除数据库 2.MySQL常用数据类型和表的操作2.(一)常用数据类型1.数值类2.字符串类型3.二进制类型4.日期类型 2.(二)表的操作1查看指定库中所有表2.创建表 3.查看表结构和查看表…...
Python每日一练:学习指南进行汇总
Python,一种“优雅”、“明确”、“简单”的编程语言,凭借其低学习曲线、强大的开源生态系统、卓越的平台可移植性以及面向对象和函数式编程的支持,成为了众多开发者首选。 01 Python 应用领域和就业形势分析 Python,一种“优雅…...
Spring-AI搭建企业专属知识库 一
环境介绍:Spring3.3.2 JDK 21 POM文件 <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation&…...
Python的那些事第三十六篇:基于 Vega 和 Vega-Lite 的数据可视化解决方案,Altair 声明式可视化库
Altair 声明式可视化库:基于 Vega 和 Vega-Lite 的数据可视化解决方案 摘要 在数据科学和分析领域,有效的数据可视化是理解数据、发现模式和传达见解的关键。Python 作为数据科学的主要编程语言之一,提供了多种数据可视化库。其中,Altair 是一个基于 Vega 和 Vega-Lite 的…...
虚拟化园区网络部署指南
《虚拟化园区网络部署指南》属于博主的“园区网”专栏,若想成为HCIE,对于园区网相关的知识需要非常了解,更多关于园区网的内容博主会更新在“园区网”专栏里,请持续关注! 一.前言 华为CloudCampus解决方案基于智简网络…...
系统调用有哪些函数
系统调用是操作系统提供给用户程序的一组“特殊”的函数接口,允许用户程序请求操作系统执行某些低级服务。这些服务通常涉及对硬件的直接操作或访问受保护的内核资源。以下是一些常见的系统调用函数,主要基于Unix/Linux环境: 一、文件与设备…...
Go红队开发—编解码工具
文章目录 开启一个项目编解码工具开发Dongle包Base64编解码摩斯密码URL加解密AES加解密 MD5碰撞工具开发 开启一个项目 这作为补充内容,可忽略直接看下面的编解码: 一开始用就按照下面的步骤即可 1.创建一个文件夹,你自己定义名字(建议只用…...
PyInstaller 打包python 程序 成 可执行文件
pyinstaller --onefile --name my_project --add-data "config/config.json:config" main.py 要将整个 Python 项目打包成一个可执行文件,可以使用 PyInstaller 来完成这个任务。以下是如何将整个项目打包成可执行文件的步骤: 1. 安装 PyIns…...
2继续NTS库学习(读取shapefile)
引用库如下: 读取shapefile代码如下: namespace IfoxDemo {public class Class1{[CommandMethod("xx")]public static void nts二次学习(){Document doc Application.DocumentManager.MdiActiveDocument;var ed doc.Editor;string shpPath …...
Python爬虫
python凭借其简洁的语法和强大的库支持,成为编写爬虫程序的首选语言之一。今天,我将通过一个简单的示例,带你入门Python爬虫,并展示如何爬取网页内容并保存到文本文件中。 一、爬虫的基本概念 爬虫(Web Crawler&#…...
C++蓝桥杯基础篇(六)
片头 嗨~小伙伴们,大家好!今天我们来一起学习蓝桥杯基础篇(六),练习相关的数组习题,准备好了吗?咱们开始咯! 第1题 数组的左方区域 这道题,实质上是找规律,…...
rust学习~tokio的io
await Suspend execution until the result of a Future is ready. 暂停执行,直到一个 Future 的结果就绪。 .awaiting a future will suspend the current function’s execution until the executor has run the future to completion. 对一个 Future 使用 .awa…...
JVM--虚拟机
JVM,即虚拟机,可以简单理解为将字节码文件翻译成机器码的机器。 .class文件-->机器码文件 JVM整体组成部分 1.类加载器 负责从磁盘中加载字节码文件到JVM中 2.运行时数据区 按照不同的数据分区进行存储(方法区,堆,栈,本地方…...
【Unity】把Texture的黑色背景改成透明背景
1. 在Project窗口中选择目标Texture 2. 在Inspector窗口中进行如下设置: Texture Type: Sprite (2D and UI)Alpha Source: Input Texture Alpha (如果原图有Alpha通道) 或 From Gray Scale (如果要用灰度值作为透明度)Alpha Is Transparency: ✓ (勾选) 3. 其他建…...
计算机毕业设计SpringBoot+Vue.js华强北商城二手手机管理系统 (源码+文档+PPT+讲解)
温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 温馨提示:文末有 CSDN 平台官方提供的学长联系方式的名片! 作者简介:Java领…...
利用 Python 爬虫进行跨境电商数据采集
1 引言2 代理IP的优势3 获取代理IP账号4 爬取实战案例---(某电商网站爬取)4.1 网站分析4.2 编写代码4.3 优化代码 5 总结 1 引言 在数字化时代,数据作为核心资源蕴含重要价值,网络爬虫成为企业洞察市场趋势、学术研究探索未知领域…...
Android中使用Robolectric测试点击事件(不需要手机)
文章目录 一、前言二、简单示例三、参考文档 一、前言 Robolectric 是一个由 Google 维护的开源 Android 测试框架,它允许你以 Android 运行时环境运行单元测试。 Robolectric 提供了一个模拟 Android 运行时环境,允许你测试你的代码是否正确地使用 And…...
如何把网络ip改为动态:全面指南
在数字化时代,网络IP地址作为设备在网络中的唯一标识,扮演着至关重要的角色。随着网络环境的不断变化,静态IP地址的局限性逐渐显现,而动态IP地址则因其灵活性和安全性受到越来越多用户的青睐。那么,如何把网络IP改为动…...
文件描述符与重定向
1. open系统调用 在 Linux 中, open() 系统调用用于打开一个文件或设备,并返回一个文件描述符,通过该描述符可以进行文件读写操作。open() 可以用于创建新文件或打开已存在的文件,具体行为取决于传递给它的参数。 需要包含的头文件…...
自然语言处理NLP入门 -- 第六节命名实体识别
1 什么是命名实体识别? 在日常生活中,我们经常会遇到这样的情景:希望从一大段文本中,快速找出所有的人名、地名、组织机构名称、日期、时间等关键信息。举个例子,如果你在阅读一篇关于历史事件的新闻报道时࿰…...
Windows PicPick Professional-v7.3.2-中文版
Windows PicPick Professional-中文版 链接:https://pan.xunlei.com/s/VOKGwGVGWUDl7L8cW4D1A1W4A1?pwdw5qz# - 更新了中文翻译,默认取消检测升级,删除多国语言...
Hue UI展示中文
个人博客地址:Hue UI展示中文 | 一张假钞的真实世界 如果使用开发分支代码如master分支)编译安装,需要自己编译语言文件。例如Hue安装目录为“/opt/hue”,则安装后执行以下命令: $ cd /opt/hue $ make locales 如果…...
【Unity】AI Navigation自动寻路(导航)功能
1.简介以及安装AI Navigation 1.1 简介 AI导航包包含高级组件,允许你在游戏中使用导航网格来整合导航和寻径。有了这个包,你可以在运行时和编辑时构建和使用导航网格,创建动态障碍,并使用链接来允许特定的动作(如跳跃…...
网络安全员证书
软考网络安全员证书:信息安全领域的黄金标准 随着信息技术的飞速发展,网络安全问题日益凸显,网络安全员的需求也日益增加。软考网络安全员证书作为信息安全领域的黄金标准,对于网络安全从业者来说具有重要意义。本文将详细介绍…...
2.你有什么绝活儿?—Java能做什么?
1、Java的绝活儿:要问Java有什么绝活,我觉得它应该算是一位魔法师,会的绝活儿有很多,要说最能拿得出手的当属以下三个。 1.1 平台无关性:Java可以在任何地方施展魔法,无论是Windows、Linux还是Mac…...
使用 ASP.NET Core 创建和下载 zip 文件
对于最近的一个功能,我必须从用 ASP.NET Core 编写的内部网站下载一批文件。在下载文件之前对其进行压缩,结果证明这是一种轻松实现多文件下载的好方法。.NET 提供了所有需要的功能,在本文中,我将向您展示如何实现它。 首先&#…...
数据结构之队列
一、队列的概念 队列是一个有序列表,可以用数组或者是链表来实现的。遵循的是先入先出的原则,就是先存入队列的数据要先取出,后面存的需要后面取出。插入的一端称为队尾,删除的一端称为队头,队列里没有元素就称它为空…...
微信小程序读取写入NFC文本,以及NFC直接启动小程序指定页面
一、微信小程序读取NFC文本(yyy优译小程序实现),网上有很多通过wx.getNFCAdapter方法来监听读取NFC卡信息,但怎么处理读取的message文本比较难找,现用下面方法来实现,同时还解决几个问题,1、在回调方法中this.setData不更新信息,因为this的指向问题,2、在退出页面时,…...
【Godot4.3】自定义简易菜单栏节点ETDMenuBar
概述 Godot中的菜单创建是一个复杂的灾难性工作,往往无从下手,我也是不止一次尝试简化菜单的创建。 从自己去年的发明“简易树形数据”用于简化Tree控件获得灵感,于是尝试编写了用于表示菜单数据的EasyMenuData类,以及对应的纯文…...
win7电脑上最好安装 Python什么版本?
李升伟 整理 在 Windows 7 上安装 Python 时,需考虑系统兼容性和安全性。以下是具体建议: --- ### **推荐版本:Python 3.8.x** 1. **兼容性** Python 3.8 是最后一个官方支持 Windows 7 的版本(需安装系统更新至 **SP1** …...
苍穹外卖-阿里云OSS文件上传
苍穹外卖-阿里云OSS文件上传 一、阿里云OSS简介**获取AccessKey**获取enpoint 二、代码实现1 引入依赖2 定义OSS相关配置2.1 application-dev.yml2.2 application.yml 3 读取OSS配置3.1 AliOssProperties 4 生成OSS工具类对象4.1 AliOssUtil4.2 OssConfiguration2.5 CommonCont…...
一周热点:基于向量的推理,而非文本
背景介绍 大型语言模型(LLMs):大型语言模型(如GPT-2)可以通过生成思维链(CoT)来提高性能。CoT是将回应提示的过程分解为一系列步骤的中间文本标记。然而,大部分CoT文本旨在保持流畅性(例如“a”、“of”、“we know that”),而非推理(例如“a + b = c”)。这导致了…...
Tagr 5 for Mac v5.8.0 [MAS] 音频标签编辑工具 支持M、Intel芯片
Tagr 5应用介绍 Tagr 5 是一款功能强大的音乐标签编辑工具,专为macOS用户设计。它旨在帮助用户高效地管理和编辑音乐文件的标签(Metadata),尤其适合那些有大量音乐文件的用户。通过Tagr 5,用户可以轻松地编辑和更新音…...