DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕
目录
- DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts)
- 📚前言
- 📚页面效果
- 📚指令输入
- 属性定义
- 1. 快捷键绑定数组 `shortcuts`
- 2. 启用状态 `enabled`
- 3. 全局监听 `global`
- 4. 组合键分隔符 `separator`
- 5. 修饰键顺序敏感 `modifierSensitive`
- 事件定义
- 1. `shortcut-triggered` 事件
- 2. `shortcut-failed` 事件
- 其他
- 1. 快捷键验证
- 2. 冲突处理
- 3. 跨平台兼容性
- 4. 文档和示例
- 5. 测试
- 📘组件代码
- 📚代码测试
- 📚添加参数后主要代码
- 📘组件 \src\views\KeyboardShortcutsView.vue
- 📚测试代码正常跑通,附其他基本代码
- 📘编写路由 src\router\index.js
- 📘编写展示入口 src\App.vue
- 📚页面效果
- 📚相关文章
📚📗📕📘📖🕮💡📝🗂️✍️🛠️💻🚀🎉🏗️🌐🖼️🔗📊👉🔖⚠️🌟🔐⬇️·正文开始
⬇️·🎥😊🎓📩😺🌈🤝🤖📜📋🔍✅🧰❓📄📢📈 🙋0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆗*️⃣#️⃣
DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts)
📚前言
在日常工作中,DeepSeek 也为许多用户带来了便利。一位市场营销经理在策划一场新产品推广活动时,利用 DeepSeek 进行市场分析和竞品研究。DeepSeek 通过对大量市场数据和消费者反馈的分析,为他提供了详细的市场趋势报告和竞品优劣势分析。基于这些分析结果,他制定了更有针对性的推广策略,成功提高了新产品的市场知名度和销量。他说:“DeepSeek 帮助我做出了更明智的决策,让我的工作变得更加高效和轻松。
📚页面效果
📚指令输入
已经创建好了一个基于Vue3的组合式API的项目(Composition API),并能正常运行起来,请帮我用 Vue3的组合式API(Composition API) 生成一个 键盘快捷键(Keyboard Shortcuts) 的功能组件,所有代码都保存在components/KeyboardShortcuts 下的文件夹中。功能组件的script标签中只有setup属性,使用普通 JavaScript 实现,不使用TypeScript。
功能要有,如下属性:
属性定义
1. 快捷键绑定数组 shortcuts
- 类型:数组
- 描述:用于定义一组快捷键及其对应的回调函数或动作标识。数组中的每个元素可以是一个对象,包含快捷键组合和对应的处理逻辑。例如,
[{ keys: 'Ctrl + S', action: 'save' }, { keys: 'Ctrl + C', action: 'copy' }]
。
2. 启用状态 enabled
- 类型:布尔值
- 描述:控制快捷键组件是否启用。当设置为
false
时,快捷键将不会触发任何动作,可用于临时禁用快捷键功能。
3. 全局监听 global
- 类型:布尔值
- 描述:指定快捷键是否在全局范围内监听。如果设置为
true
,则无论焦点在哪个元素上,快捷键都会生效;如果设置为false
,则只有当焦点在组件内部时快捷键才会生效。
4. 组合键分隔符 separator
- 类型:字符串
- 描述:用于指定快捷键组合中各个键之间的分隔符,默认为
+
。例如,用户可以自定义为-
,则快捷键定义可以写成Ctrl - S
。
5. 修饰键顺序敏感 modifierSensitive
- 类型:布尔值
- 描述:指定修饰键(如
Ctrl
、Alt
、Shift
)的顺序是否敏感。如果设置为true
,则Ctrl + Shift + A
和Shift + Ctrl + A
被视为不同的快捷键;如果设置为false
,则它们被视为相同的快捷键。
事件定义
1. shortcut-triggered
事件
- 描述:当用户按下定义的快捷键时触发该事件,事件参数包含触发的快捷键组合和对应的动作标识。例如,当用户按下
Ctrl + S
时,会触发该事件,并传递{ keys: 'Ctrl + S', action: 'save' }
作为参数。
2. shortcut-failed
事件
- 描述:当用户按下的键组合未匹配到任何定义的快捷键时触发该事件,事件参数包含用户按下的键组合。可用于记录用户的无效操作或提供提示信息。
其他
1. 快捷键验证
在组件内部对用户定义的快捷键进行验证,确保其格式正确,避免因无效的快捷键定义导致组件出错。例如,检查快捷键组合中是否包含非法字符或不支持的键。
2. 冲突处理
当多个快捷键之间存在冲突时,提供相应的处理机制。可以选择忽略冲突,只触发第一个匹配的快捷键;也可以抛出错误或警告,提示用户存在冲突。
3. 跨平台兼容性
考虑不同操作系统和浏览器对快捷键的支持情况,确保组件在各种环境下都能正常工作。例如,在 Mac 系统中,Ctrl
键通常对应 Command
键,需要进行相应的转换。
4. 文档和示例
提供详细的文档和示例,说明组件的使用方法、属性和事件的含义,方便其他开发者使用该组件。
5. 测试
编写单元测试和集成测试,确保组件的功能正常,快捷键能够正确触发和处理。测试用例应覆盖各种情况,包括不同的快捷键组合、启用和禁用状态等。
你有更好的建议也可以添加,要注明。组件定义好后给出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/
│ │ ├── 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
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── public/ # 公共资源目录
├── index.html # HTML 模板
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依赖包目录
📘组件代码
根据你的需求,我帮你创建了一个功能完善的键盘快捷键组件,以下是实现代码和调用示例:
<!-- components/KeyboardShortcuts/KeyboardShortcuts.vue -->
<template><div ref="root"><slot></slot></div>
</template><script setup>
import { ref, computed, watch, onMounted, onUnmounted } from 'vue'const props = defineProps({shortcuts: {type: Array,required: true,validator: (value) => value.every(item => item.keys && item.action)},enabled: {type: Boolean,default: true},global: {type: Boolean,default: false},separator: {type: String,default: '+'},modifierSensitive: {type: Boolean,default: false}
})const emit = defineEmits(['shortcut-triggered', 'shortcut-failed'])const root = ref(null)
const isMac = /macintosh|mac os x/i.test(navigator.userAgent)
let currentTarget = null
let isListening = falseconst keyAliases = {ctrl: 'control',control: 'control',cmd: 'meta',command: 'meta',meta: 'meta',shift: 'shift',alt: 'alt',option: 'alt',esc: 'escape',space: ' ',up: 'arrowup',down: 'arrowdown',left: 'arrowleft',right: 'arrowright'
}const normalizeKey = (key) => {const lowerKey = key.toLowerCase()return keyAliases[lowerKey] || lowerKey
}const parseKeys = (keysStr) => {return keysStr.split(props.separator).map(k => normalizeKey(k.trim())).map(k => isMac && k === 'control' ? 'meta' : k)
}const normalizeCombo = (keys, isModifierSensitive) => {const modifiers = []const others = []keys.forEach(key => {if (['control', 'meta', 'shift', 'alt'].includes(key)) {modifiers.push(key)} else {others.push(key)}})if (!isModifierSensitive) {modifiers.sort()}return [...modifiers, ...others].join('+')
}const shortcutMap = computed(() => {const map = new Map()props.shortcuts.forEach(shortcut => {try {const keys = parseKeys(shortcut.keys)const combo = normalizeCombo(keys, props.modifierSensitive)if (map.has(combo)) {console.warn(`Shortcut conflict: ${shortcut.keys} conflicts with existing shortcut`)}map.set(combo, shortcut)} catch (e) {console.error(`Invalid shortcut: ${shortcut.keys}`, e)}})return map
})const handleKeyDown = (event) => {if (!props.enabled) returnconst pressedModifiers = []if (event.ctrlKey) pressedModifiers.push('control')if (event.shiftKey) pressedModifiers.push('shift')if (event.altKey) pressedModifiers.push('alt')if (event.metaKey) pressedModifiers.push('meta')const key = normalizeKey(event.key)if (['control', 'shift', 'alt', 'meta'].includes(key)) returnconst pressedKeys = [...pressedModifiers, key]const combo = normalizeCombo(pressedKeys, props.modifierSensitive)const matched = shortcutMap.value.get(combo)if (matched) {event.preventDefault()emit('shortcut-triggered', { keys: matched.keys, action: matched.action })if (typeof matched.action === 'function') {matched.action()}} else {const userCombo = pressedKeys.join(props.separator)emit('shortcut-failed', { keys: userCombo })}
}const updateEventListener = () => {if (isListening) {currentTarget.removeEventListener('keydown', handleKeyDown)isListening = false}if (props.enabled) {currentTarget = props.global ? window : root.valueif (currentTarget) {currentTarget.addEventListener('keydown', handleKeyDown)isListening = true}}
}onMounted(updateEventListener)
onUnmounted(() => {if (isListening) {currentTarget.removeEventListener('keydown', handleKeyDown)}
})watch([() => props.enabled, () => props.global], updateEventListener)
</script>
以下是5个调用示例:
<!-- 示例1: 基本使用 -->
<KeyboardShortcuts:shortcuts="[{ keys: 'Ctrl + S', action: 'save' },{ keys: 'Ctrl + C', action: 'copy' }]"@shortcut-triggered="handleShortcut"
/><!-- 示例2: 带回调函数 -->
<KeyboardShortcuts:shortcuts="[{ keys: 'Ctrl + K', action: () => openSearch() }]"
/><!-- 示例3: 非全局作用域 -->
<KeyboardShortcuts:global="false":shortcuts="[{ keys: 'Enter', action: 'submit' }]"
><input type="text" placeholder="Focus here to use Enter shortcut">
</KeyboardShortcuts><!-- 示例4: 自定义分隔符 -->
<KeyboardShortcuts:separator="'-'":shortcuts="[{ keys: 'Ctrl - Alt - D', action: 'debug' }]"
/><!-- 示例5: 复杂组合 -->
<KeyboardShortcuts:modifier-sensitive="true":shortcuts="[{ keys: 'Shift + Ctrl + Tab', action: 'prevTab' },{ keys: 'Ctrl + Tab', action: 'nextTab' }]"
/><!-- 示例6: 禁用状态 -->
<KeyboardShortcuts:enabled="false":shortcuts="[...]"
/>
组件特性:
- 自动处理Mac系统的Command键映射
- 支持修饰键顺序敏感设置
- 完善的类型验证和错误提示
- 自动处理事件监听的生命周期
- 支持组合键和单键触发
- 详细的调试信息输出
使用时可以根据需要组合不同的属性来实现各种快捷键场景,组件会自动处理浏览器兼容性和平台差异。
📚代码测试
运行正常。代码示例需要添加一些参数。
📚添加参数后主要代码
📘组件 \src\views\KeyboardShortcutsView.vue
<template><div class="keyboard-shortcuts-demo"><h2>键盘快捷键示例</h2><!-- 示例1: 基本使用 --><section class="demo-section"><h3>基本使用</h3><div class="demo-box"><p>尝试按下: <code>Ctrl + S 保存</code> 或 <code>Ctrl + C 复制</code></p><KeyboardShortcuts:shortcuts="[{ keys: 'Ctrl + S', action: 'save' },{ keys: 'Ctrl + C', action: 'copy' }]"@shortcut-triggered="handleShortcut"><div class="action-log">最后执行的操作: {{ lastAction }}</div></KeyboardShortcuts></div></section><!-- 示例2: 带回调函数 --><section class="demo-section"><h3>带回调函数</h3><div class="demo-box"><p>尝试按下: <code>Ctrl + K</code></p><KeyboardShortcuts:shortcuts="[{keys: 'Ctrl + K',action: () => openSearch()}]"><div class="search-box" v-if="isSearchOpen">搜索框已打开<button @click="isSearchOpen = false">关闭</button></div></KeyboardShortcuts></div></section><!-- 示例3: 非全局作用域 --><section class="demo-section"><h3>非全局作用域</h3><div class="demo-box"><p>在输入框内按 <code>Enter</code></p><KeyboardShortcuts:global="false":shortcuts="[{ keys: 'Enter', action: 'submit' }]"@shortcut-triggered="handleSubmit"><inputtype="text"v-model="inputText"placeholder="Focus here to use Enter shortcut"class="demo-input"><div class="action-log">{{ submitMessage }}</div></KeyboardShortcuts></div></section><!-- 示例4: 自定义分隔符 --><section class="demo-section"><h3>自定义分隔符</h3><div class="demo-box"><p>尝试按下: <code>Ctrl-Alt-D</code></p><KeyboardShortcutsseparator="-":shortcuts="[{ keys: 'Ctrl-Alt-D', action: 'debug' }]"@shortcut-triggered="handleDebug"><div class="action-log">{{ debugStatus }}</div></KeyboardShortcuts></div></section><!-- 示例5: 复杂组合 --><section class="demo-section"><h3>复杂组合</h3><div class="demo-box"><p>尝试按下: <code>Shift + Ctrl + Tab</code> 或 <code>Ctrl + Tab</code></p><KeyboardShortcuts:modifier-sensitive="true":shortcuts="[{ keys: 'Shift + Ctrl + Tab', action: 'prevTab' },{ keys: 'Ctrl + Tab', action: 'nextTab' }]"@shortcut-triggered="handleTabSwitch"><div class="tabs-demo">当前标签页: {{ currentTab }}</div></KeyboardShortcuts></div></section></div>
</template><script setup>
import { ref } from 'vue'
import KeyboardShortcuts from '@/components/KeyboardShortcuts/KeyboardShortcuts.vue'// 状态变量
const lastAction = ref('')
const isSearchOpen = ref(false)
const inputText = ref('')
const submitMessage = ref('')
const debugStatus = ref('')
const currentTab = ref(1)// 事件处理函数
const handleShortcut = (event) => {lastAction.value = `执行了 ${event.action} 操作`
}const openSearch = () => {isSearchOpen.value = true
}const handleSubmit = () => {submitMessage.value = `提交的内容: ${inputText.value}`inputText.value = ''
}const handleDebug = () => {debugStatus.value = '调试模式已' + (debugStatus.value.includes('开启') ? '关闭' : '开启')
}const handleTabSwitch = (event) => {if (event.action === 'nextTab') {currentTab.value = currentTab.value >= 3 ? 1 : currentTab.value + 1} else {currentTab.value = currentTab.value <= 1 ? 3 : currentTab.value - 1}
}
</script><style scoped>
.keyboard-shortcuts-demo {padding: 20px;max-width: 800px;margin: 0 auto;
}h2 {color: #2c3e50;text-align: center;margin-bottom: 30px;
}.demo-section {margin-bottom: 30px;padding: 20px;border: 1px solid #ebeef5;border-radius: 8px;background: white;
}h3 {color: #2c3e50;margin-bottom: 15px;
}.demo-box {padding: 15px;background: #f8f9fa;border-radius: 6px;
}code {background: #e9ecef;padding: 2px 6px;border-radius: 4px;font-family: monospace;
}.action-log {margin-top: 10px;padding: 10px;background: #e9ecef;border-radius: 4px;font-size: 14px;
}.demo-input {width: 100%;padding: 8px;border: 1px solid #dcdfe6;border-radius: 4px;margin-top: 10px;
}.search-box {margin-top: 10px;padding: 10px;background: #e9ecef;border-radius: 4px;display: flex;justify-content: space-between;align-items: center;
}.search-box button {padding: 4px 8px;border: none;background: #409eff;color: white;border-radius: 4px;cursor: pointer;
}.tabs-demo {margin-top: 10px;padding: 10px;background: #e9ecef;border-radius: 4px;text-align: center;
}
</style>
📚测试代码正常跑通,附其他基本代码
- 添加路由
- 页面展示入口
📘编写路由 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')}],
})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></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>
📚页面效果
📚相关文章
-
0基础3步部署自己的DeepSeek安装步骤
-
DeepSeek 助力 Vue 开发:打造丝滑的步骤条(Step bar)https://blog.csdn.net/qq_33650655/article/details/145560497
-
DeepSeek 助力 Vue 开发:打造丝滑的进度条(Progress Bar)https://blog.csdn.net/qq_33650655/article/details/145577034
-
自己部署 DeepSeek 助力 Vue 开发:打造丝滑的标签页(Tabs)https://blog.csdn.net/qq_33650655/article/details/145587999
-
自己部署 DeepSeek 助力 Vue 开发:打造丝滑的折叠面板(Accordion)https://blog.csdn.net/qq_33650655/article/details/145590404
-
自己部署 DeepSeek 助力 Vue 开发:打造丝滑的时间线(Timeline )https://blog.csdn.net/qq_33650655/article/details/145597372
-
DeepSeek 助力 Vue 开发:打造丝滑的返回顶部按钮(Back to Top)https://blog.csdn.net/qq_33650655/article/details/145615550
-
DeepSeek 助力 Vue 开发:打造丝滑的通知栏(Notification Bar)https://blog.csdn.net/qq_33650655/article/details/145620055
-
DeepSeek 助力 Vue 开发:打造丝滑的卡片(Card)https://blog.csdn.net/qq_33650655/article/details/145634564
-
DeepSeek 助力 Vue 开发:打造丝滑的无限滚动(Infinite Scroll)https://blog.csdn.net/qq_33650655/article/details/145638452
-
DeepSeek 助力 Vue 开发:打造丝滑的开关切换(Switch)https://blog.csdn.net/qq_33650655/article/details/145644151
-
DeepSeek 助力 Vue 开发:打造丝滑的侧边栏(Sidebar)https://blog.csdn.net/qq_33650655/article/details/145654204
-
DeepSeek 助力 Vue 开发:打造丝滑的面包屑导航(Breadcrumbs)https://blog.csdn.net/qq_33650655/article/details/145656895
-
DeepSeek 助力 Vue 开发:打造丝滑的瀑布流布局(Masonry Layout)https://blog.csdn.net/qq_33650655/article/details/145663699
-
DeepSeek 助力 Vue 开发:打造丝滑的评分组件(Rating)https://blog.csdn.net/qq_33650655/article/details/145664576
-
DeepSeek 助力 Vue 开发:打造丝滑的日期选择器(Date Picker),未使用第三方插件 https://blog.csdn.net/qq_33650655/article/details/145673279
-
DeepSeek 助力 Vue 开发:打造丝滑的颜色选择器(Color Picker)https://blog.csdn.net/qq_33650655/article/details/145689522
-
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
到此这篇文章就介绍到这了,更多精彩内容请关注本人以前的文章或继续浏览下面的文章,创作不易,如果能帮助到大家,希望大家多多支持宝码香车~💕,若转载本文,一定注明本文链接。
更多专栏订阅推荐:
👍 html+css+js 绚丽效果
💕 vue
✈️ Electron
⭐️ js
📝 字符串
✍️ 时间对象(Date())操作
相关文章:

DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏关注哦 💕 目录 Deep…...

【第一节】C++设计模式(创建型模式)-工厂模式
目录 前言 一、面向对象的两类对象创建问题 二、解决问题 三、工厂模式代码示例 四、工厂模式的核心功能 五、工厂模式的应用场景 六、工厂模式的实现与结构 七、工厂模式的优缺点 八、工厂模式的扩展与优化 九、总结 前言 在面向对象系统设计中,开发者常…...
深入理解 SQL 注入漏洞及解决方案
一、引言 在当今数字化时代,数据库作为存储和管理数据的核心组件,其安全性至关重要。SQL 注入是一种常见且极具威胁性的数据库安全漏洞,它可能导致数据泄露、篡改甚至系统被完全控制。本文将深入探讨 SQL 注入漏洞的产生原因、表现形式以及如…...
使用 deepseek实现 go语言,读取文本文件的功能,要求支持 ascii,utf-8 等多种格式自适应
使用 deepseek实现 go语言,读取文本文件的功能,要求支持 ascii,utf-8 等多种格式自适应我要用 chatgpt,也问过,但是比 deepseek 还是差一个级别,具体如下: package mainimport ("bufio&qu…...
7.【线性代数】——求解Ax=0,主列和自由列
七 求解Ax0,主列和自由列 1. 消元、秩、特解特解零空间 2. 简化行阶梯形式 :主元上下都是0,主元简化为1 1. 消元、秩、特解 矩阵消元 [ 1 2 2 2 2 4 6 8 3 6 8 10 ] ⏟ A ⇒ r o w 2 − 2 r o w 1 , r o w 3 − 3 r o w 1 [ 1 2 2 2 0 0 2 4 0 0 2 4 ]…...
vue3结合后端传递过来的文件进行预览功能
业务的需要,前端需要根据后端传递过来的文件流进行预览的功能,前端点击链接直接触发浏览器的窗口的预览功能。 实现方式一: 使用弹窗和iframe的标签的形式进行预览文件,但是iframe可能会出现网站安全性的问题,限制比较…...
【Python爬虫(39)】掌控全局:分布式爬虫的任务管理与监控之道
【Python爬虫】专栏简介:本专栏是 Python 爬虫领域的集大成之作,共 100 章节。从 Python 基础语法、爬虫入门知识讲起,深入探讨反爬虫、多线程、分布式等进阶技术。以大量实例为支撑,覆盖网页、图片、音频等各类数据爬取ÿ…...

Jenkins整合Jmeter实现接口自动化测试
🍅 点击文末小卡片,免费获取软件测试全套资料,资料在手,涨薪更快 一、安装jmeter 下载:http://jmeter.apache.org/download_jmeter.cgi 这里我用了一台Windows安装jmeter用来写接口测试的脚本,启动前修改j…...
Web 自动化测试提速利器:Aqua 的 Web Inspector (检查器)使用详解
Web 自动化测试提速利器:Aqua 的 Web Inspector (检查器)使用详解 前言简介一、安装二、Web Inspector 的使用2.1 获取元素定位器(Locators)2.2 将定位器添加到代码2.3 验证定位器2.4 处理 Frames (框架)总结前言 JetBrains 的 Aqua IDE 提供强大的 Web Inspector 工具,帮…...
大语言模型:从开发到运行的深度解构
一、LLM开发训练的全流程解析 1. 数据工程的炼金术 数据采集:构建涵盖网页文本(Common Crawl)、书籍、论文、代码等领域的超大规模语料库,典型规模可达数十TB。例如GPT-4的训练数据包含超过13万亿token数据清洗:通过…...
【GoLang】【算法模板】2、GoLang 算法模板整理
文章目录 0、前言1、GoLang 算法必会技巧1.1、标准库1.1.1、sort 包1.1.2、slice 包 1.2、数据结构1.2.1、优先队列 2、板子2.1、二分2.1.1、lower_bound、upper_bound 2.2、字符串2.2.1、kmp 0、前言 整理一下 golang 的算法板子,作为备忘录使用。可能有些板子、博…...

合理建模--最短路径
这道题目难就难在如何想到用最短路径来做 主要是这个题目不能用bfs来写,因为距离并不是1 狄克斯特拉算法很久没写了,有些地方生疏了 且这个题目需要记录三个信息,得用tuple 题目地址 int dx[] {0,0,1,-1};int dy[] {1,-1,0,0}; class Solut…...

喜报!博睿数据案例获经观传媒“2024年度数字转型创新案例”!
本文已在“经观”APP中发表,点击下方文章链接查看原文: 2024科技创变纪:创新破局 变量启新 近日,经济观察报“2024年度卓越创新实践案例”榜单评选结果正式公布。博睿数据选送的案例“从零到一:可观测体系建设的探索…...

基于图扑 HT 可视化技术打造智慧地下采矿可视化方案
在前端开发领域,不断涌现的新技术为各行业带来了创新变革的可能。今天,让我们聚焦于图扑软件自研的 HT for Web 产品,看看它如何在前端 2D、3D 渲染方面发力,为智慧地下采矿可视化打造令人惊叹的解决方案,为开发者开启…...
深度学习(2)-深度学习关键网络架构
关键网络架构 深度学习有4种类型的网络架构:密集连接网络、卷积神经网络、循环神经网络和Transformer。每种类型的模型都是针对特定的输入模式,网络架构包含了关于数据结构的假设,即模型搜索的假设空间。某种架构能否解决某个问题࿰…...

【学习笔记】Cadence电子设计全流程(二)原理图库的创建与设计(8-15)
【学习笔记】Cadence电子设计全流程(二)原理图库的创建与设计(下) 2.8 Cadence 软件自带元件库2.9 原理图元器件关联PCB2.10 原理图元器件库的移植2.11 已有原理图输出元器件库2.12 原理图设计中调用元器件库2.13 原理图元器件库关…...

【Linux网络编程】IP协议格式,解包步骤
目录 解析步骤 1.版本字段(大小:4比特位) 2.首部长度(大小:4比特位)(单位:4字节) 🍜细节解释: 3.服务类型(大小:8比特…...

给老系统做个安全检查——Burp SqlMap扫描注入漏洞
背景 在AI技术突飞猛进的今天,类似Cursor之类的工具已经能写出堪比大部分程序员水平的代码了。然而,在我们的代码世界里,仍然有不少"老骥伏枥"的系统在兢兢业业地发光发热。这些祖传系统的代码可能早已过时,架构可能岌…...

Windows 快速搭建C++开发环境,安装C++、CMake、QT、Visual Studio、Setup Factory
安装C 简介 Windows 版的 GCC 有三个选择: CygwinMinGWmingw-w64 Cygwin、MinGW 和 mingw-w64 都是在 Windows 操作系统上运行的工具集,用于在 Windows 环境下进行开发和编译。 Cygwin 是一个在 Windows 上运行的开源项目,旨在提供类Uni…...

开源免费文档翻译工具 可支持pdf、word、excel、ppt
项目介绍 今天给大家推荐一个开源的、超实用的免费文档翻译工具(DeeplxFile),相信很多人都有需要翻译文档的时刻,这款工具就能轻松解决你的需求。 它支持多种文档格式翻译,包括 Word、PDF、PPT、Excel ,使…...
浏览器访问 AWS ECS 上部署的 Docker 容器(监听 80 端口)
✅ 一、ECS 服务配置 Dockerfile 确保监听 80 端口 EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]或 EXPOSE 80 CMD ["python3", "-m", "http.server", "80"]任务定义(Task Definition&…...

(二)TensorRT-LLM | 模型导出(v0.20.0rc3)
0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述,后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作,其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...

全球首个30米分辨率湿地数据集(2000—2022)
数据简介 今天我们分享的数据是全球30米分辨率湿地数据集,包含8种湿地亚类,该数据以0.5X0.5的瓦片存储,我们整理了所有属于中国的瓦片名称与其对应省份,方便大家研究使用。 该数据集作为全球首个30米分辨率、覆盖2000–2022年时间…...

转转集团旗下首家二手多品类循环仓店“超级转转”开业
6月9日,国内领先的循环经济企业转转集团旗下首家二手多品类循环仓店“超级转转”正式开业。 转转集团创始人兼CEO黄炜、转转循环时尚发起人朱珠、转转集团COO兼红布林CEO胡伟琨、王府井集团副总裁祝捷等出席了开业剪彩仪式。 据「TMT星球」了解,“超级…...
镜像里切换为普通用户
如果你登录远程虚拟机默认就是 root 用户,但你不希望用 root 权限运行 ns-3(这是对的,ns3 工具会拒绝 root),你可以按以下方法创建一个 非 root 用户账号 并切换到它运行 ns-3。 一次性解决方案:创建非 roo…...
Python如何给视频添加音频和字幕
在Python中,给视频添加音频和字幕可以使用电影文件处理库MoviePy和字幕处理库Subtitles。下面将详细介绍如何使用这些库来实现视频的音频和字幕添加,包括必要的代码示例和详细解释。 环境准备 在开始之前,需要安装以下Python库:…...
css3笔记 (1) 自用
outline: none 用于移除元素获得焦点时默认的轮廓线 broder:0 用于移除边框 font-size:0 用于设置字体不显示 list-style: none 消除<li> 标签默认样式 margin: xx auto 版心居中 width:100% 通栏 vertical-align 作用于行内元素 / 表格单元格ÿ…...

RNN避坑指南:从数学推导到LSTM/GRU工业级部署实战流程
本文较长,建议点赞收藏,以免遗失。更多AI大模型应用开发学习视频及资料,尽在聚客AI学院。 本文全面剖析RNN核心原理,深入讲解梯度消失/爆炸问题,并通过LSTM/GRU结构实现解决方案,提供时间序列预测和文本生成…...

OPenCV CUDA模块图像处理-----对图像执行 均值漂移滤波(Mean Shift Filtering)函数meanShiftFiltering()
操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 在 GPU 上对图像执行 均值漂移滤波(Mean Shift Filtering),用于图像分割或平滑处理。 该函数将输入图像中的…...
Hive 存储格式深度解析:从 TextFile 到 ORC,如何选对数据存储方案?
在大数据处理领域,Hive 作为 Hadoop 生态中重要的数据仓库工具,其存储格式的选择直接影响数据存储成本、查询效率和计算资源消耗。面对 TextFile、SequenceFile、Parquet、RCFile、ORC 等多种存储格式,很多开发者常常陷入选择困境。本文将从底…...