DeepSeek 助力 Vue3 开发:打造丝滑的弹性布局(Flexbox)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕
目录
- DeepSeek 助力 Vue3 开发:打造丝滑的弹性布局(Flexbox)
- 📚前言
- 📚页面效果
- 📚指令输入
- 定义属性
- 容器相关属性
- 子元素相关属性
- 定义事件
- 其他
- 📚think
- 📘组件代码
- 📚代码测试
- 📚测试代码正常跑通,附其他基本代码
- 📘编写路由 src\router\index.js
- 📘编写展示入口 src\App.vue
- 📚页面效果
- 📚相关文章
📚📗📕📘📖🕮💡📝🗂️✍️🛠️💻🚀🎉🏗️🌐🖼️🔗📊👉🔖⚠️🌟🔐⬇️·正文开始
⬇️·🎥😊🎓📩😺🌈🤝🤖📜📋🔍✅🧰❓📄📢📈 🙋0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆗*️⃣#️⃣
DeepSeek 助力 Vue3 开发:打造丝滑的弹性布局(Flexbox)
📚前言
DeepSeek 的发展也面临着一些技术挑战,如算力需求、数据质量和模型优化等问题。为了应对这些挑战,DeepSeek 采取了一系列有效的措施,如创新算法和架构设计、建立严格的数据治理体系、进行多方面的技术革新等,展现出了强大的技术实力和创新能力。
📚页面效果
📚指令输入
已经创建好了一个基于Vue3的组合式API的项目(Composition API),并能正常运行起来,请帮我用 Vue3的组合式API(Composition API) 生成一个 弹性布局(Flexbox) 的功能组件,所有代码都保存在components/Flexbox 下的文件夹中。功能组件的script标签中只有setup属性,使用普通 JavaScript 实现,不使用TypeScript。
功能要有,如下属性:
定义属性
容器相关属性
-
display
- 作用:指定元素是否以弹性容器显示,虽然默认是弹性布局,但可以提供一个属性让用户选择是否开启。
- 类型:
Boolean
- 默认值:
true
- 说明:当设置为
false
时,组件不使用弹性布局。
-
flexDirection
- 作用:定义主轴的方向,即子元素的排列方向。
- 类型:
String
- 可选值:
'row'
、'row-reverse'
、'column'
、'column-reverse'
- 默认值:
'row'
-
flexWrap
- 作用:定义子元素是否换行。
- 类型:
String
- 可选值:
'nowrap'
、'wrap'
、'wrap-reverse'
- 默认值:
'nowrap'
-
flexFlow
- 作用:是
flexDirection
和flexWrap
的缩写属性。 - 类型:
String
- 默认值:
undefined
- 说明:如果设置了
flexFlow
,则flexDirection
和flexWrap
的设置将被忽略。
- 作用:是
-
justifyContent
- 作用:定义子元素在主轴上的对齐方式。
- 类型:
String
- 可选值:
'flex-start'
、'flex-end'
、'center'
、'space-between'
、'space-around'
、'space-evenly'
- 默认值:
'flex-start'
-
alignItems
- 作用:定义子元素在交叉轴上的对齐方式。
- 类型:
String
- 可选值:
'flex-start'
、'flex-end'
、'center'
、'baseline'
、'stretch'
- 默认值:
'stretch'
-
alignContent
- 作用:定义多根轴线的对齐方式,如果子元素只有一根轴线,该属性不起作用。
- 类型:
String
- 可选值:
'flex-start'
、'flex-end'
、'center'
、'space-between'
、'space-around'
、'stretch'
- 默认值:
'stretch'
子元素相关属性
-
gap
- 作用:定义子元素之间的间距。
- 类型:
String
- 默认值:
'0'
-
inline
- 作用:指定弹性容器是否为行内元素。
- 类型:
Boolean
- 默认值:
false
定义事件
-
resize
- 作用:当弹性容器大小改变时触发,可用于在容器大小变化时进行一些额外的处理,比如重新计算子元素的布局。
- 参数:
{ width: number, height: number }
,表示容器的新宽度和高度。
-
childAdded
- 作用:当有新的子元素添加到弹性容器时触发,可用于在子元素添加后进行一些初始化操作。
- 参数:
HTMLElement
,表示新添加的子元素。
-
childRemoved
- 作用:当有子元素从弹性容器中移除时触发,可用于在子元素移除后进行一些清理操作。
- 参数:
HTMLElement
,表示被移除的子元素。
其他
- 提供插槽:使用 Vue 的插槽机制,允许用户将任意内容插入到弹性容器中,增加组件的灵活性。
- 样式隔离:确保组件的样式不会影响到外部的其他元素,同时也不会被外部样式影响,可以使用 CSS 作用域或者 CSS Modules。
- 响应式设计:考虑结合媒体查询或者 Vue 的响应式数据,让弹性布局在不同的屏幕尺寸下有不同的表现。
- 文档和示例:编写详细的文档,说明每个属性和事件的作用,并提供一些使用示例,方便其他开发者使用该组件。
你有更好的建议也可以添加,要注明。组件定义好后给出5个及以上的调用示例,示例中添加完整的数据和事件,确保每个示例是独立的。
下面是现有目录
DeepSeekAndVue/
├── 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/
│ │ ├── PasswordInput/
│ │ ├── GridLayout/
│ │ ├── Flexbox/
│ │ ├── 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
│ │ ├── GridLayoutView.vue
│ │ ├── PasswordInputView.vue
│ │ ├── FlexboxView.vue
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── public/ # 公共资源目录
├── index.html # HTML 模板
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依赖包目录
📚think
📘组件代码
我将为您创建一个功能完整的Flexbox组件,并提供使用示例。以下是组件的实现方案:
<!-- components/Flexbox/FlexContainer.vue -->
<template><divref="containerRef"class="flex-container":style="containerStyles"@slotchange="handleSlotChange"><slot></slot></div>
</template><script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue'const props = defineProps({display: {type: Boolean,default: true},flexDirection: {type: String,default: 'row',validator: (value) => ['row','row-reverse','column','column-reverse'].includes(value)},flexWrap: {type: String,default: 'nowrap',validator: (value) => ['nowrap', 'wrap', 'wrap-reverse'].includes(value)},flexFlow: String,justifyContent: {type: String,default: 'flex-start',validator: (value) => ['flex-start','flex-end','center','space-between','space-around','space-evenly'].includes(value)},alignItems: {type: String,default: 'stretch',validator: (value) => ['flex-start','flex-end','center','baseline','stretch'].includes(value)},alignContent: {type: String,default: 'stretch',validator: (value) => ['flex-start','flex-end','center','space-between','space-around','stretch'].includes(value)},gap: {type: String,default: '0'},inline: {type: Boolean,default: false}
})const emit = defineEmits(['resize', 'childAdded', 'childRemoved'])const containerRef = ref(null)
let resizeObserver = null
let mutationObserver = nullconst containerStyles = computed(() => {const styles = {gap: props.gap,justifyContent: props.justifyContent,alignItems: props.alignItems,alignContent: props.alignContent}if (props.display) {styles.display = props.inline ? 'inline-flex' : 'flex'styles.flexFlow = props.flexFlow ? props.flexFlow : `${props.flexDirection} ${props.flexWrap}`} else {styles.display = props.inline ? 'inline-block' : 'block'}return styles
})const handleResize = (entries) => {for (const entry of entries) {const { width, height } = entry.contentRectemit('resize', { width, height })}
}const handleMutation = (mutations) => {for (const mutation of mutations) {mutation.addedNodes.forEach(node => {if (node.nodeType === Node.ELEMENT_NODE) {emit('childAdded', node)}})mutation.removedNodes.forEach(node => {if (node.nodeType === Node.ELEMENT_NODE) {emit('childRemoved', node)}})}
}onMounted(() => {// 初始化ResizeObserverresizeObserver = new ResizeObserver(handleResize)if (containerRef.value) {resizeObserver.observe(containerRef.value)}// 初始化MutationObservermutationObserver = new MutationObserver(handleMutation)mutationObserver.observe(containerRef.value, {childList: true,subtree: false})
})onUnmounted(() => {resizeObserver?.disconnect()mutationObserver?.disconnect()
})
</script><style scoped>
.flex-container {width: 100%;min-height: 50px;box-sizing: border-box;
}
</style>
以下是5个使用示例:
<!-- 示例1: 基本行布局 -->
<template><FlexContainer><div v-for="n in 3" :key="n" class="box">Item {{ n }}</div></FlexContainer>
</template><script setup>
import FlexContainer from '@/components/Flexbox/FlexContainer.vue'
</script><style>
.box {padding: 20px;background: #eee;margin: 5px;
}
</style><!-- 示例2: 列布局居中 -->
<template><FlexContainer flex-direction="column"justify-content="center"align-items="center"gap="10px"style="height: 300px; border: 1px solid #ccc;"><div v-for="n in 3" :key="n" class="box">Item {{ n }}</div></FlexContainer>
</template><!-- 示例3: 换行布局 -->
<template><FlexContainerflex-wrap="wrap"gap="20px"@resize="handleResize"><div v-for="n in 8" :key="n" style="width: 200px" class="box">Item {{ n }}</div></FlexContainer>
</template><script setup>
const handleResize = (size) => {console.log('Container size changed:', size)
}
</script><!-- 示例4: 响应式布局 -->
<template><FlexContainer:flex-direction="isMobile ? 'column' : 'row'":gap="isMobile ? '10px' : '20px'"><div v-for="n in 4" :key="n" class="box">Item {{ n }}</div></FlexContainer>
</template><script setup>
import { ref, onMounted, onUnmounted } from 'vue'const isMobile = ref(false)const checkMobile = () => {isMobile.value = window.innerWidth < 768
}onMounted(() => {window.addEventListener('resize', checkMobile)checkMobile()
})onUnmounted(() => {window.removeEventListener('resize', checkMobile)
})
</script><!-- 示例5: 事件处理 -->
<template><FlexContainer@child-added="handleChildAdded"@child-removed="handleChildRemoved"@resize="handleResize"style="border: 1px solid #ddd; padding: 10px;"><div v-for="item in items" :key="item" class="box">{{ item }}</div></FlexContainer><button @click="addItem">Add Item</button><button @click="removeItem">Remove Item</button>
</template><script setup>
import { ref } from 'vue'const items = ref(['A', 'B', 'C'])const addItem = () => {items.value.push(String.fromCharCode(65 + items.value.length))
}const removeItem = () => {if (items.value.length > 0) {items.value.pop()}
}const handleChildAdded = (element) => {console.log('Child added:', element)element.style.backgroundColor = '#e3f2fd'
}const handleChildRemoved = (element) => {console.log('Child removed:', element)
}const handleResize = ({ width, height }) => {console.log(`New container size: ${width}x${height}`)
}
</script>
优化建议:
- 性能优化:添加防抖处理resize事件
- 可访问性:添加ARIA属性
- 边界处理:处理无效属性值
- 扩展性:添加子元素order/flex属性支持
- 调试支持:开发模式下显示布局轮廓
组件特点:
- 完整的Flexbox属性支持
- 响应式尺寸监控
- 子元素变化追踪
- 样式隔离
- 类型验证
- 完善的文档支持
- 灵活的事件处理
- 良好的浏览器兼容性
使用时可以根据需要添加自定义样式,组件会自动处理布局逻辑。事件系统可以帮助实现动态布局调整和动画效果。
📚代码测试
运行正常
📚测试代码正常跑通,附其他基本代码
- 添加路由
- 页面展示入口
📘编写路由 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')},{path: '/gridLayout',name: 'gridLayout',component: () => import('../views/GridLayoutView.vue')},{path: '/passwordInput',name: 'passwordInput',component: () => import('../views/PasswordInputView.vue')},{path: '/flexbox',name: 'flexbox',component: () => import('../views/FlexboxView.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><RouterLink to="/gridLayout">GridLayout</RouterLink><RouterLink to="/passwordInput">PasswordInput</RouterLink><RouterLink to="/flexbox">Flexbox</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
-
DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
https://blog.csdn.net/qq_33650655/article/details/145888339 -
DeepSeek 助力 Vue3 开发:打造丝滑的网格布局(Grid Layout)https://blog.csdn.net/qq_33650655/article/details/145893422
-
DeepSeek 助力 Vue3 开发:打造丝滑的密码输入框(Password Input)https://blog.csdn.net/qq_33650655/article/details/145903079
到此这篇文章就介绍到这了,更多精彩内容请关注本人以前的文章或继续浏览下面的文章,创作不易,如果能帮助到大家,希望大家多多支持宝码香车~💕,若转载本文,一定注明本文链接。
更多专栏订阅推荐:
👍 html+css+js 绚丽效果
💕 vue
✈️ Electron
⭐️ js
📝 字符串
✍️ 时间对象(Date())操作
相关文章:

DeepSeek 助力 Vue3 开发:打造丝滑的弹性布局(Flexbox)
前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏关注哦 💕 目录 Deep…...
六、Redis 高级功能详解:BitMap、HyperLogLog、Geo、Stream
Redis 高级功能详解:BitMap、HyperLogLog、Geo、Stream Redis 不仅提供了基础的数据结构(String、List、Set、Hash、Sorted Set),还提供了一些高级数据结构,专门用于特定的应用场景,如位运算统计、去重计数、地理位置存储、流数据处理等。本文将详细介绍这些高级功能的使…...

WSL下使用git克隆失败解决
WSL默认nat模式,别动了防火墙放行,见图1git导入[bash1],ip为你wsl上linxu通过ifconfig获取的本机ip,端口对好某alcsh软件开启tun模式【经过测试,不开也行】应该成了,如果不行,修改.wslconfig为下…...
【Elasticsearch】索引生命周期管理相关的操作(Index Lifecycle Actions)
Elasticsearch 的Index Lifecycle Management(ILM)是一种用于管理索引生命周期的工具,它允许用户根据索引的使用阶段(如热、温、冷、冻结)自动执行一系列操作。以下是详细解释 Elasticsearch 中的索引生命周期操作(Index Lifecycl…...
TS的接口 泛型 自定义类型 在接口中定义一个非必须的属性
TS的接口 泛型 自定义类型 接口 新建一个ts文件,在里面定义一个接口 export interface PersonInter{id:string,name:string,age:number }在vue文件中引入这个ts文件 <script lang"ts" setup name"Person">import {type PersonInter} …...

Collab-Overcooked:专注于多智能体协作的语言模型基准测试平台
2025-02-27,由北京邮电大学和理想汽车公司联合创建。该平台基于《Overcooked-AI》游戏环境,设计了更具挑战性和实用性的交互任务,目的通过自然语言沟通促进多智能体协作。 一、研究背景 近年来,基于大型语言模型的智能体系统在复…...

未来经济范式争夺战:AR眼镜为何成为下一代交互终端的制高点?
未来经济范式争夺战:AR眼镜为何成为下一代交互终端的制高点? 在蒸汽机轰鸣的工业革命时代,煤炭、铁路、电报构建了第一个现代经济范式;互联网时代,电力、光纤、物流网络重构了全球经济版图。当前,我们正站…...

Mybatis实现批量添加
1.设计一张商品表 CREATE TABLE IF NOT EXISTS goods (id BIGINT AUTO_INCREMENT PRIMARY KEY,name VARCHAR(255) NOT NULL );2.编写实体类映射数据库表格 Data public class Goods {private Long id;private String name;// Getters and Setters }3.编写持久层接口以及其对应…...
golang 内存对齐和填充规则
内存对齐和填充规则 对齐要求:每个数据类型的起始地址必须是其大小的倍数。 int8(1字节):不需要对齐。int16(2字节):起始地址必须是2的倍数。int32(4字节):起…...

【YashanDB认证】yashandb23.3.1 个人版单机部署安装实践
YCA报名链接如下: YashanDB|崖山数据库系统YashanDB学习中心-YCA认证详情 目前免费 主要参考文档: 单机(主备)部署 | YashanDB Doc 另外还参考摩天轮文章: YashanDB 23.2.9.101 企业版安装步骤抢先看! - 墨天轮 …...
安全渗透测试的全面解析与实践
引言 随着网络安全威胁的日益增加,企业和组织对自身系统的安全性提出了更高的要求。安全渗透测试(Penetration Testing,简称渗透测试)作为主动发现和修复系统安全漏洞的重要手段,已成为安全防护体系中的关键环节。本文…...
通俗易懂的分类算法之决策树详解
通俗易懂的分类算法之决策树详解 1. 什么是决策树? 决策树是一种像树一样的结构,用来帮助我们对数据进行分类或预测。它的每个节点代表一个问题或判断条件,每个分支代表一个可能的答案,最后的叶子节点就是最终的分类结果。 举个…...
【OpenCV C++】以时间命名存图,自动检查存储目录,若不存在自动创建, 按下空格、回车、Q、S自动存图
文章目录 // 保存图像的函数 void saveImage(const cv::Mat& frame) {// 生成唯一文件名auto now = std::chrono::system_clock::...
post get 给后端传参数
post 方式一 : data: params 作为请求体(Request Body)传递: 你已经展示了这种方式,通过data字段直接传递一个对象或数组。这种方式通常用于传递复杂的数据结构。dowmfrom: function (params) { return request({ u…...
数据仓库的特点
数据仓库的主要特点可以概括为:面向主题、集成性、非易失性、时变性、高性能和可扩展性、支持复杂查询和分析、分层架构以及数据质量管理。 1. 面向主题(Subject-Oriented) 数据仓库是面向主题的,而不是面向事务的。这意味着数据…...

任务9:交换机基础及配置
CSDN 原创主页:不羁https://blog.csdn.net/2303_76492156?typeblog 一、交换机基础 交换机的概念:交换机是一种网络设备,用于连接多台计算机或网络设备,实现数据包在局域网内的快速交换。交换机基于MAC地址来转发数据包&#x…...

ArcGIS操作:07 绘制矢量shp面
1、点击目录 2、右侧显示目录 3、选择要存储的文件夹,新建shp 4、定义名称、要素类型、坐标系 5、点击开始编辑 6、点击创建要素 7、右侧选择图层、创建面 8、开始绘制,双击任意位置结束绘制...
【AI深度学习基础】NumPy完全指南终极篇:核心功能与工程实践(含完整代码)
NumPy系列文章 入门篇进阶篇终极篇 一、引言 在完成NumPy入门篇的基础认知与进阶篇的特性探索后,我们终于迎来这场终极技术深潜。本文不再停留于API使用层面,而是直指NumPy的架构内核与高性能工程实践的本质矛盾。作为Python科学计算领域的基石&#…...

Golang语法特性总结
1.认识Golang代码特性 package main //1.包含main函数的文件就是一个main包--当前程序的包名// import "fmt" // import "time" import("fmt""time" )//3.同时包含多个包 4.强制代码风格:函数的 { 一定和函数名在同一行,否…...
Java并发编程利器CyclicBarrier:从使用到源码深度解析,掌握多线程同步的艺术
引言 在多线程编程中,你是否遇到过这样的需求? 多线程分阶段处理数据,每个阶段完成后等待其他线程 并行计算任务需要多次同步汇总结果 模拟高并发场景下多个线程同时触发操作 CyclicBarrier(循环屏障)正是解决这类问题的神器!与CountDownLatch不同,它支持重复使用和自定…...

利用最小二乘法找圆心和半径
#include <iostream> #include <vector> #include <cmath> #include <Eigen/Dense> // 需安装Eigen库用于矩阵运算 // 定义点结构 struct Point { double x, y; Point(double x_, double y_) : x(x_), y(y_) {} }; // 最小二乘法求圆心和半径 …...
应用升级/灾备测试时使用guarantee 闪回点迅速回退
1.场景 应用要升级,当升级失败时,数据库回退到升级前. 要测试系统,测试完成后,数据库要回退到测试前。 相对于RMAN恢复需要很长时间, 数据库闪回只需要几分钟。 2.技术实现 数据库设置 2个db_recovery参数 创建guarantee闪回点,不需要开启数据库闪回。…...

Unity3D中Gfx.WaitForPresent优化方案
前言 在Unity中,Gfx.WaitForPresent占用CPU过高通常表示主线程在等待GPU完成渲染(即CPU被阻塞),这表明存在GPU瓶颈或垂直同步/帧率设置问题。以下是系统的优化方案: 对惹,这里有一个游戏开发交流小组&…...
【SpringBoot】100、SpringBoot中使用自定义注解+AOP实现参数自动解密
在实际项目中,用户注册、登录、修改密码等操作,都涉及到参数传输安全问题。所以我们需要在前端对账户、密码等敏感信息加密传输,在后端接收到数据后能自动解密。 1、引入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId...
django filter 统计数量 按属性去重
在Django中,如果你想要根据某个属性对查询集进行去重并统计数量,你可以使用values()方法配合annotate()方法来实现。这里有两种常见的方法来完成这个需求: 方法1:使用annotate()和Count 假设你有一个模型Item,并且你想…...

学校招生小程序源码介绍
基于ThinkPHPFastAdminUniApp开发的学校招生小程序源码,专为学校招生场景量身打造,功能实用且操作便捷。 从技术架构来看,ThinkPHP提供稳定可靠的后台服务,FastAdmin加速开发流程,UniApp则保障小程序在多端有良好的兼…...

UR 协作机器人「三剑客」:精密轻量担当(UR7e)、全能协作主力(UR12e)、重型任务专家(UR15)
UR协作机器人正以其卓越性能在现代制造业自动化中扮演重要角色。UR7e、UR12e和UR15通过创新技术和精准设计满足了不同行业的多样化需求。其中,UR15以其速度、精度及人工智能准备能力成为自动化领域的重要突破。UR7e和UR12e则在负载规格和市场定位上不断优化…...
Web 架构之 CDN 加速原理与落地实践
文章目录 一、思维导图二、正文内容(一)CDN 基础概念1. 定义2. 组成部分 (二)CDN 加速原理1. 请求路由2. 内容缓存3. 内容更新 (三)CDN 落地实践1. 选择 CDN 服务商2. 配置 CDN3. 集成到 Web 架构 …...
【Go语言基础【12】】指针:声明、取地址、解引用
文章目录 零、概述:指针 vs. 引用(类比其他语言)一、指针基础概念二、指针声明与初始化三、指针操作符1. &:取地址(拿到内存地址)2. *:解引用(拿到值) 四、空指针&am…...
MySQL JOIN 表过多的优化思路
当 MySQL 查询涉及大量表 JOIN 时,性能会显著下降。以下是优化思路和简易实现方法: 一、核心优化思路 减少 JOIN 数量 数据冗余:添加必要的冗余字段(如订单表直接存储用户名)合并表:将频繁关联的小表合并成…...