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

DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3: 行选择

前言:哈喽,大家好,今天给大家分享一篇文章!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕

共同探索软件研发!敬请关注【宝码香车】
关注描述

csdngif标识

目录

  • DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3: 行选择
    • 📚前言
    • 📚页面效果
    • 📚指令输入
      • 定义属性
        • 数据相关
        • 样式与布局相关
        • 功能相关
      • 定义事件
      • 其他
    • 📚think
      • 📘组件代码
    • 📚代码测试
    • 📚示例3,整理后主要代码
      • 📘定义组件 \src\views\TableView3.vue
    • 📚测试代码正常跑通,附其他基本代码
      • 📘编写路由 src\router\index.js
      • 📘编写展示入口 src\App.vue
    • 📚页面效果
    • 📚相关文章


📚📗📕📘📖🕮💡📝🗂️✍️🛠️💻🚀🎉🏗️🌐🖼️🔗📊👉🔖⚠️🌟🔐⬇️·正文开始⬇️·🎥😊🎓📩😺🌈🤝🤖📜📋🔍✅🧰❓📄📢📈 🙋0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣🔟🆗*️⃣#️⃣

DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3: 行选择

📚前言

DeepSeek 与各大企业的合作不断深化。2 月 3 日,百度智能云宣布 DeepSeek-R1 和 DeepSeek-V3 模型已在百度智能云千帆平台上架,并推出超低价格方案;联通云宣布已基于星罗平台实现国产及主流算力适配多规格 DeepSeek-R1 模型,扩大了模型市场覆盖范围。2 月 4 日,京东云宣布正式上线 DeepSeek-R1 和 DeepSeek-V3 模型,支持公有云在线部署、专混私有化实例部署两种模式;DeepSeek V3 和 R1 模型完成海光 DCU 国产化适配,并正式上线,推动了国产化适配进程。

📚页面效果

DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3:  行选择

📚指令输入

已经创建好了一个基于Vue3的组合式API的项目(Composition API),并能正常运行起来,请帮我用 Vue3的组合式API(Composition API) 生成一个 表格(Table) 的功能组件,所有代码都保存在components/Table 下的文件夹中。功能组件的script标签中只有setup属性,使用普通 JavaScript 实现,不使用TypeScript。
功能要有,如下属性:

定义属性

数据相关
  1. data
    • 作用:表格展示的数据,是一个数组,每个元素代表一行记录。
    • 类型:Array<Object>
    • 默认值:[]
  2. columns
    • 作用:定义表格的列配置,每个元素包含列标题、数据字段名、对齐方式等信息。
    • 类型:Array<Object>
    • 默认值:[]
    • 示例:[{ title: '姓名', dataIndex: 'name', align: 'left' }]
  3. pagination
    • 作用:是否开启分页功能。
    • 类型:Boolean
    • 默认值:false
  4. pageSize
    • 作用:每页显示的记录数。
    • 类型:Number
    • 默认值:10
  5. currentPage
    • 作用:当前显示的页码,支持双向绑定。
    • 类型:Number
    • 默认值:1
样式与布局相关
  1. stripe
    • 作用:是否显示斑马纹效果。
    • 类型:Boolean
    • 默认值:false
  2. border
    • 作用:是否显示表格边框。
    • 类型:Boolean
    • 默认值:false
  3. size
    • 作用:表格的尺寸,如 smallmediumlarge
    • 类型:String
    • 默认值:'medium'
  4. headerAlign
    • 作用:表头内容的对齐方式,如 leftcenterright
    • 类型:String
    • 默认值:'left'
  5. cellAlign
    • 作用:表格单元格内容的对齐方式,如 leftcenterright
    • 类型:String
    • 默认值:'left'
功能相关
  1. rowSelection
    • 作用:是否开启行选择功能。
    • 类型:Boolean
    • 默认值:false
  2. selectedRows
    • 作用:双向绑定当前选中的行数据,支持 v-model 语法。
    • 类型:Array<Object>
    • 默认值:[]
  3. sortable
    • 作用:是否开启列排序功能。
    • 类型:Boolean
    • 默认值:false
  4. sortedColumn
    • 作用:当前排序的列信息,包括列字段名和排序顺序(ascdesc)。
    • 类型:Object
    • 默认值:{ field: null, order: null }

定义事件

  1. update:currentPage
    • 作用:当页码发生变化时触发,用于实现 currentPage 的双向绑定。
    • 参数:Number,新的页码。
  2. update:selectedRows
    • 作用:当选中的行发生变化时触发,用于实现 selectedRows 的双向绑定。
    • 参数:Array<Object>,新的选中行数据。
  3. update:sortedColumn
    • 作用:当排序的列发生变化时触发,用于实现 sortedColumn 的双向绑定。
    • 参数:Object,新的排序列信息。
  4. rowClick
    • 作用:当点击表格某一行时触发。
    • 参数:Object,被点击行的数据。
  5. sortChange
    • 作用:当列排序发生变化时触发。
    • 参数:{ field, order },排序的列字段名和排序顺序。
  6. paginationChange
    • 作用:当分页参数(如页码、每页记录数)发生变化时触发。
    • 参数:{ currentPage, pageSize },新的页码和每页记录数。

其他

  1. 提供插槽:使用 Vue 的插槽机制,允许用户自定义表头内容、表格单元格内容、分页器样式等,增加组件的灵活性。例如,用户可以自定义某一列的显示格式。
  2. 虚拟列表支持:当数据量很大时,使用虚拟列表技术,只渲染当前可见区域的数据,提高性能。
  3. 搜索与过滤功能:添加搜索框和过滤条件,方便用户快速查找和筛选数据。
  4. 国际化支持:支持不同语言的表头、分页器文字等,方便不同地区的用户使用。
  5. 键盘交互:支持通过键盘操作表格,如使用方向键移动焦点、回车键选中行等,提升用户操作体验。
  6. 样式定制:提供一些样式类名或 CSS 变量,方便用户自定义表格的样式,如颜色、字体、边框等。
  7. 文档和示例:编写详细的文档,说明每个属性和事件的作用,并提供多种使用示例,方便其他开发者使用该组件。例如,展示如何实现分页、排序、行选择等功能。

你有更好的建议也可以添加,要注明。组件定义好后给出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/
│ │ ├── Modal/
│ │ ├── RichTextEditor/
│ │ ├── TimePicker/
│ │ ├── FileUpload/
│ │ ├── Autocomplete/
│ │ ├── MultistepForm/
│ │ ├── SearchBar/
│ │ ├── DynamicFormFields/
│ │ ├── Table/
│ │ ├── 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
│ │ ├── ModalView.vue
│ │ ├── RichTextEditorView.vue
│ │ ├── TimePickerView.vue
│ │ ├── FileUploadView.vue
│ │ ├── AutocompleteView.vue
│ │ ├── MultistepFormView.vue
│ │ ├── SearchBarView.vue
│ │ ├── DynamicFormFieldsView.vue
│ │ ├── TableView.vue
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根组件
│ └── main.js # 应用入口
├── public/ # 公共资源目录
├── index.html # HTML 模板
├── package.json # 项目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依赖包目录

📚think

📘组件代码

我将按照您的要求创建一个功能完善的Table组件,并给出多个使用示例。以下是实现步骤:

  1. 首先创建组件文件:components/Table/Table.vue
<!-- components/Table/Table.vue -->
<template><div class="ds-table" :class="[`table-size-${size}`, { 'table-stripe': stripe, 'table-border': border }]"><!-- 搜索框 --><div v-if="showSearch" class="table-search"><inputv-model="searchKeyword"placeholder="搜索..."@input="handleSearch"class="search-input"/></div><!-- 表格主体 --><div class="table-container"><table><thead><tr><!-- 选择列 --><th v-if="rowSelection" :class="headerAlignClass"class="selection-column"><inputtype="checkbox":checked="allSelected"@change="toggleAllSelection"/></th><!-- 数据列 --><thv-for="col in columns":key="col.dataIndex":class="[headerAlignClass, { sortable: sortable && col.sortable }]"@click="handleSort(col)"><slot :name="`header-${col.dataIndex}`" :column="col">{{ col.title }}<span v-if="sortable && col.sortable" class="sort-icon">{{ sortedColumn.field === col.dataIndex ? (sortedColumn.order === 'asc' ? '↑' : '↓') : '' }}</span></slot></th></tr></thead><tbody><!-- 虚拟列表占位 --><template v-if="virtualScroll"><trv-for="row in visibleData":key="rowKey ? row[rowKey] : row.id":class="{ 'selected-row': isRowSelected(row) }"@click="handleRowClick(row)"><!-- 选择列 --><td v-if="rowSelection" :class="cellAlignClass"><inputtype="checkbox":checked="isRowSelected(row)"@change="toggleRowSelection(row)"/></td><!-- 数据列 --><tdv-for="col in columns":key="col.dataIndex":class="cellAlignClass"><slot :name="`cell-${col.dataIndex}`" :row="row" :value="row[col.dataIndex]">{{ row[col.dataIndex] }}</slot></td></tr></template><!-- 普通列表 --><template v-else><trv-for="(row, index) in processedData":key="rowKey ? row[rowKey] : index":class="{ 'selected-row': isRowSelected(row), 'stripe-row': stripe && index % 2 === 0 }"@click="handleRowClick(row)"><!-- 同上 --></tr></template></tbody></table></div><!-- 分页 --><div v-if="pagination" class="table-pagination"><button :disabled="currentPage === 1"@click="changePage(currentPage - 1)">上一页</button><span>第 {{ currentPage }} 页 / 共 {{ totalPages }} 页</span><button:disabled="currentPage >= totalPages"@click="changePage(currentPage + 1)">下一页</button></div></div>
</template><script setup>
import { ref, computed, watch, toRefs } from 'vue'const props = defineProps({// 数据相关data: {type: Array,default: () => []},columns: {type: Array,default: () => []},pagination: {type: Boolean,default: false},pageSize: {type: Number,default: 10},currentPage: {type: Number,default: 1},// 样式相关stripe: Boolean,border: Boolean,size: {type: String,default: 'medium',validator: v => ['small', 'medium', 'large'].includes(v)},headerAlign: {type: String,default: 'left',validator: v => ['left', 'center', 'right'].includes(v)},cellAlign: {type: String,default: 'left',validator: v => ['left', 'center', 'right'].includes(v)},// 功能相关rowSelection: Boolean,selectedRows: {type: Array,default: () => []},sortable: Boolean,sortedColumn: {type: Object,default: () => ({ field: null, order: null })},// 其他rowKey: String,virtualScroll: Boolean,showSearch: Boolean
})const emit = defineEmits(['update:currentPage','update:selectedRows','update:sortedColumn','rowClick','sortChange','paginationChange'
])const { data, pageSize } = toRefs(props)// 搜索相关
const searchKeyword = ref('')
const filteredData = computed(() => {if (!searchKeyword.value) return props.dataconst keyword = searchKeyword.value.toLowerCase()return props.data.filter(row =>props.columns.some(col => String(row[col.dataIndex]).toLowerCase().includes(keyword))
})// 排序处理
const sortedData = computed(() => {if (!props.sortable || !props.sortedColumn.field) return filteredData.valuereturn [...filteredData.value].sort((a, b) => {const field = props.sortedColumn.fieldconst order = props.sortedColumn.order === 'asc' ? 1 : -1return a[field] > b[field] ? order : -order})
})// 分页处理
const totalPages = computed(() => Math.ceil(sortedData.value.length / props.pageSize))
const processedData = computed(() => {if (!props.pagination) return sortedData.valueconst start = (props.currentPage - 1) * props.pageSizeconst end = start + props.pageSizereturn sortedData.value.slice(start, end)
})// 选择功能
const allSelected = computed(() => props.selectedRows.length === processedData.value.length && processedData.value.length > 0
)function toggleRowSelection(row) {const selected = [...props.selectedRows]const index = selected.findIndex(r => r === row)if (index > -1) {selected.splice(index, 1)} else {selected.push(row)}emit('update:selectedRows', selected)
}function toggleAllSelection(e) {const checked = e.target.checkedemit('update:selectedRows', checked ? [...processedData.value] : [])
}function isRowSelected(row) {return props.selectedRows.includes(row)
}// 分页控制
function changePage(page) {if (page < 1 || page > totalPages.value) returnemit('update:currentPage', page)emit('paginationChange', { currentPage: page, pageSize: props.pageSize })
}// 排序处理
function handleSort(col) {if (!props.sortable || !col.sortable) returnlet order = 'asc'if (props.sortedColumn.field === col.dataIndex) {order = props.sortedColumn.order === 'asc' ? 'desc' : null}const newSort = order ? { field: col.dataIndex, order } : { field: null, order: null }emit('update:sortedColumn', newSort)emit('sortChange', newSort)
}// 事件处理
function handleRowClick(row) {emit('rowClick', row)
}function handleSearch() {if (props.pagination) {emit('update:currentPage', 1)}
}// 样式类
const headerAlignClass = computed(() => `align-${props.headerAlign}`)
const cellAlignClass = computed(() => `align-${props.cellAlign}`)// 虚拟列表相关(简化实现)
const visibleData = computed(() => processedData.value)
</script><style scoped>
.ds-table {--header-bg: #f5f7fa;--border-color: #ebeef5;--hover-bg: #f5f7fa;
}table {width: 100%;border-collapse: collapse;
}th, td {padding: 12px;border-bottom: 1px solid var(--border-color);
}/* 对齐样式 */
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }/* 斑马纹 */
.table-stripe tr:nth-child(even) {background-color: var(--header-bg);
}/* 边框 */
.table-border {border: 1px solid var(--border-color);
}/* 尺寸 */
.table-size-small th, 
.table-size-small td {padding: 8px;
}.table-size-large th,
.table-size-large td {padding: 16px;
}/* 悬停效果 */
tr:hover {background-color: var(--hover-bg);
}.selected-row {background-color: #e6f7ff !important;
}.sort-icon {margin-left: 4px;
}.sortable {cursor: pointer;user-select: none;
}.table-pagination {margin-top: 16px;display: flex;gap: 12px;align-items: center;
}.search-input {margin-bottom: 16px;padding: 8px;width: 200px;
}
</style>

接下来是5个使用示例:

<!-- 示例1: 基础表格 -->
<template><Table:data="users":columns="[{ title: 'ID', dataIndex: 'id' },{ title: '姓名', dataIndex: 'name' },{ title: '年龄', dataIndex: 'age' }]"/>
</template><script setup>
import { ref } from 'vue'
import Table from '@/components/Table/Table.vue'const users = ref([{ id: 1, name: '张三', age: 25 },{ id: 2, name: '李四', age: 30 },{ id: 3, name: '王五', age: 28 }
])
</script><!-- 示例2: 分页和排序 -->
<template><Table:data="dataList":columns="columns":pagination="true":page-size="5"v-model:current-page="currentPage":sortable="true"v-model:sorted-column="sortedCol"@sort-change="handleSort"/>
</template><script setup>
import { ref } from 'vue'const dataList = ref([/* 50条数据 */])
const currentPage = ref(1)
const sortedCol = ref({ field: null, order: null })const columns = [{ title: '日期', dataIndex: 'date', sortable: true },{ title: '销售额', dataIndex: 'amount', sortable: true }
]function handleSort({ field, order }) {console.log('排序变化:', field, order)
}
</script><!-- 示例3: 行选择 -->
<template><Table:data="products":columns="columns":row-selection="true"v-model:selected-rows="selected"@row-click="showDetail"/>
</template><script setup>
import { ref } from 'vue'const products = ref([/* ... */])
const selected = ref([])
const columns = [{ title: '产品名称', dataIndex: 'name' },{ title: '价格', dataIndex: 'price' }
]function showDetail(row) {console.log('查看详情:', row)
}
</script><!-- 示例4: 自定义插槽 -->
<template><Table :data="orders" :columns="columns"><template #header-status="{ column }"><span style="color: blue">{{ column.title }}</span></template><template #cell-status="{ row }"><span :style="{ color: row.status === '完成' ? 'green' : 'red' }">{{ row.status }}</span></template></Table>
</template><script setup>
// 数据定义...
</script><!-- 示例5: 搜索和过滤 -->
<template><Table:data="customers":columns="columns":show-search="true"stripebordersize="small"/>
</template><script setup>
// 数据定义...
</script>

优化建议:

  1. 添加表格空状态提示
  2. 增加加载状态指示器
  3. 支持列宽调整
  4. 添加表头固定功能
  5. 支持导出数据功能
  6. 添加行拖拽排序功能
  7. 支持列固定(冻结列)
  8. 添加树形表格支持
  9. 支持单元格合并
  10. 添加详细的键盘导航支持

每个功能都可以通过组合式API逐步实现,建议根据实际需求优先级逐步添加这些功能。

📚代码测试

页面有一个报错,原因是代码中少了一个结束的括号")"。修正后还不显示,是因为生成的代码中省略了一部分代码在Table组件中。展示的示例要加 :virtualScroll="true"才可以。virtualScroll是完整模式。

📚示例3,整理后主要代码

📘定义组件 \src\views\TableView3.vue

<template><Table:data="products":columns="columns":virtualScroll="true":row-selection="true"v-model:selected-rows="selected"@row-click="showDetail"/>
</template><script setup>
import { ref } from 'vue'
import Table from '@/components/Table/Table.vue'// 模拟产品数据
const products = ref([{ id: 1, name: 'iPhone 15', price: 6999, stock: 100, category: '手机' },{ id: 2, name: 'MacBook Pro', price: 12999, stock: 50, category: '笔记本' },{ id: 3, name: 'iPad Air', price: 4799, stock: 80, category: '平板' },{ id: 4, name: 'AirPods Pro', price: 1999, stock: 200, category: '耳机' },{ id: 5, name: 'Apple Watch', price: 3299, stock: 150, category: '智能手表' },{ id: 6, name: 'iMac', price: 15999, stock: 30, category: '台式机' },{ id: 7, name: 'Magic Keyboard', price: 999, stock: 120, category: '配件' },{ id: 8, name: 'Magic Mouse', price: 699, stock: 180, category: '配件' },{ id: 9, name: 'HomePod', price: 2499, stock: 60, category: '智能音箱' },{ id: 10, name: 'Mac mini', price: 5999, stock: 40, category: '台式机' }
])const selected = ref([])// 扩展列配置,添加更多有用的信息
const columns = [{ title: '产品名称', dataIndex: 'name' },{ title: '价格', dataIndex: 'price', render: (price) => `¥${price.toLocaleString()}` },{ title: '库存', dataIndex: 'stock' },{ title: '分类', dataIndex: 'category' }
]function showDetail(row) {console.log('查看详情:', row)
}
</script><style scoped>
.table-container {padding: 20px;
}
</style>

📚测试代码正常跑通,附其他基本代码

  • 添加路由
  • 页面展示入口

📘编写路由 src\router\index.js

\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')},{path: '/modal',name: 'modal',component: () => import('../views/ModalView.vue')},{path: '/richTextEditor',name: 'richTextEditor',component: () => import('../views/RichTextEditorView.vue')},{path: '/timePickerView',name: 'timePickerView',component: () => import('../views/TimePickerView.vue')},{path: '/multistepForm',name: 'multistepForm',component: () => import('../views/MultistepFormView.vue')},{path: '/table1',name: 'table1',component: () => import('../views/TableView1.vue')},{path: '/table2',name: 'table2',component: () => import('../views/TableView2.vue')},{path: '/table3',name: 'table3',component: () => import('../views/TableView3.vue')},{path: '/table4',name: 'table4',component: () => import('../views/TableView4.vue')},{path: '/table5',name: 'table5',component: () => import('../views/TableView5.vue')}],
})export default router

📘编写展示入口 src\App.vue

 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><RouterLink to="/modal">Modal</RouterLink><RouterLink to="/richTextEditor">RichTextEditor</RouterLink><RouterLink to="/timePickerView">TimePickerView</RouterLink><RouterLink to="/multistepForm">MultistepFormView</RouterLink><RouterLink to="/table1">Table1</RouterLink><RouterLink to="/table2">Table2</RouterLink><RouterLink to="/table3">Table3</RouterLink><RouterLink to="/table4">Table4</RouterLink><RouterLink to="/table5">Table5</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 助力 Vue3 开发:打造丝滑的表格(Table)示例3

📚相关文章

   

———— 相 关 文 章 ————

   

  1. DeepSeek 助力 Vue 开发:打造丝滑的右键菜单(RightClickMenu)https://blog.csdn.net/qq_33650655/article/details/145706658

  2. DeepSeek 助力 Vue 开发:打造丝滑的范围选择器(Range Picker)https://blog.csdn.net/qq_33650655/article/details/145713572

  3. DeepSeek 助力 Vue 开发:打造丝滑的导航栏(Navbar)https://blog.csdn.net/qq_33650655/article/details/145732421

  4. DeepSeek 助力 Vue 开发:打造丝滑的表单验证(Form Validation)https://blog.csdn.net/qq_33650655/article/details/145735582

  5. DeepSeek 助力 Vue 开发:打造丝滑的复制到剪贴板(Copy to Clipboard)https://blog.csdn.net/qq_33650655/article/details/145739569

  6. DeepSeek 助力 Vue 开发:打造丝滑的点击动画(Click Animations)https://blog.csdn.net/qq_33650655/article/details/145766184

  7. DeepSeek 助力 Vue 开发:打造丝滑的缩略图列表(Thumbnail List)https://blog.csdn.net/qq_33650655/article/details/145776679

  8. DeepSeek 助力 Vue 开发:打造丝滑的 键盘快捷键(Keyboard Shortcuts) https://blog.csdn.net/qq_33650655/article/details/145780227

  9. DeepSeek 助力 Vue 开发:打造丝滑的评论系统(Comment System)https://blog.csdn.net/qq_33650655/article/details/145781104

  10. DeepSeek 助力 Vue 开发:打造丝滑的二维码生成(QR Code)https://blog.csdn.net/qq_33650655/article/details/145797928

  11. DeepSeek 助力 Vue 开发:打造丝滑的单选按钮(Radio Button)https://blog.csdn.net/qq_33650655/article/details/145810620

  12. DeepSeek 助力 Vue 开发:打造丝滑的滑块(Slider)https://blog.csdn.net/qq_33650655/article/details/145817161

  13. DeepSeek 助力 Vue 开发:打造丝滑的滚动动画(Scroll Animations)https://blog.csdn.net/qq_33650655/article/details/145818571

  14. DeepSeek 助力 Vue 开发:打造丝滑的文本输入框(Text Input)https://blog.csdn.net/qq_33650655/article/details/145837003

  15. DeepSeek 助力 Vue 开发:打造丝滑的分割线(Divider)https://blog.csdn.net/qq_33650655/article/details/145849100

  16. DeepSeek 助力 Vue 开发:打造丝滑的 复选框(Checkbox)https://blog.csdn.net/qq_33650655/article/details/145855695

  17. DeepSeek 助力 Vue3 开发:打造丝滑的标签输入(Tag Input)https://blog.csdn.net/qq_33650655/article/details/145858574

  18. DeepSeek 助力 Vue3 开发:打造丝滑的下拉选择框(Dropdown Select)https://blog.csdn.net/qq_33650655/article/details/145861882

  19. DeepSeek 助力 Vue3 开发:打造丝滑的列表(List)https://blog.csdn.net/qq_33650655/article/details/145866384

  20. DeepSeek 助力 Vue3 开发:打造丝滑的页眉(Header)https://blog.csdn.net/qq_33650655/article/details/145885122

  21. DeepSeek 助力 Vue3 开发:打造丝滑的页脚(Footer)https://blog.csdn.net/qq_33650655/article/details/145886306

  22. DeepSeek 助力 Vue3 开发:打造丝滑的分页(Pagination)https://blog.csdn.net/qq_33650655/article/details/145886824

  23. DeepSeek 助力 Vue3 开发:打造丝滑的悬浮按钮(Floating Action Button)
    https://blog.csdn.net/qq_33650655/article/details/145888339

  24. DeepSeek 助力 Vue3 开发:打造丝滑的网格布局(Grid Layout)https://blog.csdn.net/qq_33650655/article/details/145893422

  25. DeepSeek 助力 Vue3 开发:打造丝滑的密码输入框(Password Input))https://blog.csdn.net/qq_33650655/article/details/145903079

  26. DeepSeek 助力 Vue3 开发:打造丝滑的弹性布局(Flexbox)https://blog.csdn.net/qq_33650655/article/details/145938677

  27. DeepSeek 助力 Vue3 开发:打造丝滑的模态框(Modal)https://blog.csdn.net/qq_33650655/article/details/145938939

  28. DeepSeek 助力 Vue3 开发:打造丝滑的时间选择器(Time Picker)https://blog.csdn.net/qq_33650655/article/details/145939053

  29. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例1:基础表格 https://blog.csdn.net/qq_33650655/article/details/145939144

  30. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例2: 分页和排序 https://blog.csdn.net/qq_33650655/article/details/146025347

  31. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3: 行选择 https://blog.csdn.net/qq_33650655/article/details/146025478

  32. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例4: 自定义插槽 https://blog.csdn.net/qq_33650655/article/details/146025513

  33. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例5: 搜索和过滤 https://blog.csdn.net/qq_33650655/article/details/146025532

  34. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)之功能优化,添加表格空状态提示 https://blog.csdn.net/qq_33650655/article/details/146042249

  35. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)之功能优化,添加表格空状态提示,带插图的空状态,Table7空状态2 https://blog.csdn.net/qq_33650655/article/details/146046044

  36. DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)之功能优化,基础加载状态,Table8基础加载状态 https://blog.csdn.net/qq_33650655/article/details/146049283
     

到此这篇文章就介绍到这了,更多精彩内容请关注本人以前的文章或继续浏览下面的文章,创作不易,如果能帮助到大家,希望大家多多支持宝码香车~💕,若转载本文,一定注明本文链接。


整理不易,点赞关注宝码香车

更多专栏订阅推荐:
👍 html+css+js 绚丽效果
💕 vue
✈️ Electron
⭐️ js
📝 字符串
✍️ 时间对象(Date())操作

相关文章:

DeepSeek 助力 Vue3 开发:打造丝滑的表格(Table)示例3: 行选择

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;今天给大家分享一篇文章&#xff01;并提供具体代码帮助大家深入理解&#xff0c;彻底掌握&#xff01;创作不易&#xff0c;如果能帮助到大家或者给大家一些灵感和启发&#xff0c;欢迎收藏关注哦 &#x1f495; 目录 Deep…...

pytest结合allure

Allure 一、文档二、指令三、装饰器3.1 allure.step装饰器3.2 allure.description装饰器3.3 allure.title装饰器3.4 allure.link、allure.issue 和 allure.testcase装饰器3.5 allure.epic、allure.feature 和 allure.story装饰器3.6 allure.severity装饰器 一、文档 allure文档…...

C++入门基础

文章目录 C核心特性详解&#xff08;基础增强版&#xff09;一、第一个C程序&#xff1a;Hello World完整代码解析新手常见问题 二、命名空间&#xff08;详解版&#xff09;1. 为什么需要命名空间&#xff1f;2. 命名空间使用场景3. 嵌套命名空间4. 匿名命名空间 三、输入输出…...

《大语言模型的原理发展与应用》:此文为AI自动生成

《大语言模型的原理发展与应用》&#xff1a;此文为AI自动生成 一、引言&#xff1a;大语言模型&#xff0c;AI 时代的 “新引擎” 在当今数字化浪潮中&#xff0c;大语言模型宛如一颗璀璨的明星&#xff0c;照亮了人工智能发展的道路&#xff0c;成为推动各领域变革的核心驱…...

SpringCloud系列教程(十三):Sentinel流量控制

SpringCloud中的注册、发现、网关、服务调用都已经完成了&#xff0c;现在就剩下最后一部分&#xff0c;就是关于网络控制。SpringCloud Alibaba这一套中间件做的非常好&#xff0c;把平时常用的功能都集成进来了&#xff0c;而且非常简单高效。我们下一步就完成最后一块拼图Se…...

[MySQL初阶]MySQL(4)基本查询

标题&#xff1a;[MySQL初阶]MySQL&#xff08;4&#xff09;基本查询 水墨不写bug 文章目录 一. 数据表设计二、对数据表的操作1. Create 操作&#xff08;插入数据&#xff09;查看最近受影响的行数&#xff1a; 2. Retrieve 操作&#xff08;读取数据&#xff09;&#xff0…...

使用Open WebUI下载的模型文件(Model)默认存放在哪里?

&#x1f3e1;作者主页&#xff1a;点击&#xff01; &#x1f916;Ollama部署LLM专栏&#xff1a;点击&#xff01; ⏰️创作时间&#xff1a;2025年2月21日21点21分 &#x1f004;️文章质量&#xff1a;95分 文章目录 使用CMD安装存放位置 默认存放路径 Open WebUI下…...

Maven 私服的搭建与使用(一)

一、引言 在 Java 项目开发中&#xff0c;Maven 作为强大的项目管理和构建工具&#xff0c;极大地提高了开发效率&#xff0c;而 Maven 私服在开发过程中也扮演着至关重要的角色。私服是一种特殊的远程仓库&#xff0c;架设在局域网内&#xff0c;代理广域网上的远程仓库&…...

java每日精进 3.06 【多数据源】

数据库连接池&#xff08;Database Connection Pool&#xff09; 基本信息 是一种用于管理数据库连接的技术。它通过预先创建一定数量的数据库连接&#xff0c;并将其缓存在池中&#xff0c;供多个客户端或应用程序使用&#xff0c;从而减少了每次请求时连接数据库的开销。 …...

Leetcode 3469. Find Minimum Cost to Remove Array Elements

Leetcode 3469. Find Minimum Cost to Remove Array Elements 1. 解题思路2. 代码实现 题目链接&#xff1a;3469. Find Minimum Cost to Remove Array Elements 1. 解题思路 这一题我没啥特别好的思路&#xff0c;就只能动态规划了&#xff0c;倒是也能过&#xff0c;不过总…...

多线程-CompletableFuture

简介 CompletableFuture&#xff1a;异步任务编排工具。java 8中引入的一个类&#xff0c;位于juc包下&#xff0c;是Future的增强版。它可以让用户更好地构建和组合异步任务&#xff0c;避免回调地狱。 在CompletableFuture中&#xff0c;如果用户没有指定执行异步任务时的线…...

常用限流算法解析与实现

‌一、固定窗口计数器法‌ ‌原理‌&#xff1a;在固定时间窗口&#xff08;如1秒&#xff09;内统计请求次数&#xff0c;超过阈值则触发限流。 ‌Java实现‌&#xff1a; public class FixedWindowCounter { private static final long WINDOW_MS 1000; // 1秒窗口 priv…...

Swift系列02-Swift 数据类型系统与内存模型

Swift 是一门现代的、安全的编程语言&#xff0c;其类型系统和内存模型设计对性能和安全性有着重要影响。本文将深入探讨 Swift 的数据类型系统与内存模型&#xff0c;帮助你更好地理解并利用这些特性来优化你的 iOS 应用。本文主要包含&#xff1a; 值类型和引用类型&#xf…...

如何不重启,生效windows环境变量

场景 使用php 进行composer 时&#xff0c;composer 要求php7.2以上&#xff0c;我常用的是7.1&#xff0c;不想来回修改&#xff0c;还是重启电脑 临时修改 打印当前环境变量 echo %PATH%临时修改当前环境变量&#xff08;如果需要指定的值&#xff0c;可将全部复制出来&a…...

Ubuntu20.04本地配置IsaacLab 4.2.0的G1训练环境(二):训练与推理

Ubuntu20.04本地配置IsaacLab4 4.2.0的G1训练环境&#xff08;二&#xff09;&#xff1a;训练与推理 训练推理 写在前面&#xff0c;本文档的实现需要IsaacLab的成功安装&#xff0c;可参考&#xff08;一&#xff09;。 训练 在IsaacLab目录下&#xff0c;isaaclab的conda虚…...

设计模式说明

23种设计模式说明 以下是常见的 23 种设计模式 分类及其核心思想、应用场景和简单代码示例&#xff0c;帮助你在实际开发中灵活运用&#xff1a; 一、创建型模式&#xff08;5种&#xff09; 解决对象创建问题&#xff0c;降低对象耦合。 1. 单例模式&#xff08;Singleton&…...

K8s 1.27.1 实战系列(四)验证集群及应用部署测试

一、验证集群可用性 1、检查节点 kubectl get nodes ------------------------------------------------------ NAME STATUS ROLES AGE VERSION k8s-master Ready control-plane 3h48m v1.27.1 k8s-node1 Ready <none> …...

Artec Leo+Ray II 三维扫描仪成功为VR展数字化30吨重设备-沪敖3D

挑战&#xff1a;在贸易展上展示重达30吨的机械设备&#xff0c;同时克服设备搬运和展示的难题&#xff0c;减轻物流负担。。 解决方案&#xff1a;Artec Leo、Artec Ray II、Artec Studio、Blender、Unity、Microsoft HoloLens、HTC VIVE PRO 效果&#xff1a;在虚拟展厅中&am…...

Redis 各数据类型使用场景详解

1. 字符串&#xff08;String&#xff09; 场景 1&#xff1a;计数器&#xff08;如文章阅读量&#xff09; 问题&#xff1a; 高并发下对同一数值进行增减操作时&#xff0c;需保证原子性&#xff0c;避免竞态条件导致数据不一致。 频繁读写可能成为性能瓶颈。 解决方案&a…...

spark写数据库用连接池找不到driver类

最近遇到一个很离谱的bug&#xff0c;在写spark代码把数据写到mysql的时候考虑到连接的开销&#xff0c;所以用了HikariCP连接池&#xff0c;但是无语的是程序执行死活加载不到mysql的Driver类&#xff0c;但是解压了jar看到mysql-conn包就在lib下面&#xff0c;版本也是5.x的没…...

上传文件到对象存储是选择前端还是后端

对于云上对象存储的上传方式选择&#xff08;前端直传或后端代理上传&#xff09;&#xff0c;需综合考虑安全性、性能、成本、业务需求等因素。 1. 推荐前端直传的场景 适用条件&#xff1a; 大文件上传&#xff08;如视频、大型数据集&#xff09;高并发场景&#xff08;如…...

NanoMQ ds笔记250306

NanoMQ多版本下载地址 https://www.emqx.com/zh/downloads/nanomq NanoMQ官方文档 https://nanomq.io/docs/zh/latest/ NanoMQ 是一个专为物联网边缘计算设计的轻量级、高性能 MQTT 消息代理&#xff08;Message Broker&#xff09;&#xff0c;由中国的开源物联网公司 EMQ 开…...

sqlmap:从基础用法到漏洞利用实战

1. sqlmap基础认知 sqlmap是一款开源的渗透测试工具&#xff0c;能自动检测和利用SQL注入漏洞&#xff0c;支持MySQL、Oracle、PostgreSQL等多种数据库管理系统。其设计旨在简化SQL注入检测流程&#xff0c;助力安全人员在复杂网络环境中快速定位与评估漏洞风险。它通过发送精…...

DFS学习笔记

题目描述 X 国王有一个地宫宝库。是 nm 个格子的矩阵。每个格子放一件宝贝。每个宝贝贴着价值标签。 地宫的入口在左上角&#xff0c;出口在右下角。 小明被带到地宫的入口&#xff0c;国王要求他只能向右或向下行走。 走过某个格子时&#xff0c;如果那个格子中的宝贝价值…...

C++ STL string容器全解析

一、引言 在 C 编程的广阔领域中&#xff0c;字符串处理是一项极为基础且频繁的操作。从简单的文本解析&#xff0c;到复杂的文件读取与处理&#xff0c;字符串几乎无处不在。而 C 中的 string 容器&#xff0c;就像是一把瑞士军刀&#xff0c;为我们处理字符串提供了强大而便…...

React基础之项目创建

项目创建 create-react-app 项目名(小写) 运行 pnpm run start 在React中&#xff0c;使用的语法格式是jsx&#xff0c;也就是js与html相结合的形式 import logo from ./logo.svg; import ./App.css; function App() { return ( <div className"App"> <head…...

迷你世界脚本道具接口:Item

道具接口&#xff1a;Item 彼得兔 更新时间: 2023-04-26 10:26:18 继承自 Actor 具体函数名及描述如下: 序号 函数名 函数描述 1 getItemName(...) 获取道具名称 2 getItemId(...) 获取actor对应的道具ID&#xff0c;如球类等 3 getDropItemNum(...) …...

Unity摄像机跟随物体

功能描述 实现摄像机跟随物体&#xff0c;并使物体始终保持在画面中心位置。 实现步骤 创建脚本&#xff1a;在Unity中创建一个新的C#脚本&#xff0c;命名为CameraFollow。 代码如下&#xff1a; using UnityEngine;public class CameraFollow : MonoBehaviour {public Tran…...

计算机毕业设计SpringBoot+Vue.js青年公寓服务平台(源码+文档+PPT+讲解)

温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 作者简介&#xff1a;Java领…...

vue实现日历签到效果

在工作任务进行时&#xff0c;有一个签到日历的功能需求要实现&#xff0c;经过文档查询和样式优化实现了需求&#xff0c;在此记录一下。 技术背景&#xff1a;vue2vant(样式控件&#xff09; less 一个公共样式文件 html实现部分&#xff1a; <div class"calenderB…...

(十 八)趣学设计模式 之 观察者模式!

目录 一、 啥是观察者模式&#xff1f;二、 为什么要用观察者模式&#xff1f;三、 观察者模式的实现方式四、 观察者模式的优缺点五、 观察者模式的应用场景六、 总结 &#x1f31f;我的其他文章也讲解的比较有趣&#x1f601;&#xff0c;如果喜欢博主的讲解方式&#xff0c;…...

笔记:在Git中.gitmodules文件的功能和作用和如何使用

一、目的&#xff1a;简单介绍下在Git中.gitmodules文件的功能和作用已经 .gitmodules 文件是 Git 子模块&#xff08;submodule&#xff09;功能的一部分&#xff0c;用于管理和配置子模块。子模块允许一个 Git 仓库包含另一个 Git 仓库作为其子目录&#xff0c;这对于管理依赖…...

Swift 常量

Swift 常量 引言 Swift 是一种由苹果公司开发的编程语言,主要用于 iOS、macOS、watchOS 和 tvOS 等平台的应用开发。在 Swift 中,常量是一种不可变的变量,它用于存储固定不变的值。了解和使用常量是 Swift 编程的基础,本文将详细介绍 Swift 常量的概念、类型、声明以及使…...

Ubuntu20.04双系统安装及软件安装(七):Anaconda3

Ubuntu20.04双系统安装及软件安装&#xff08;七&#xff09;&#xff1a;Anaconda3 打开Anaconda官网&#xff0c;在右侧处填写邮箱&#xff08;要真实有效&#xff01;&#xff09;&#xff0c;然后Submit。会出现如图示的Success界面。 进入填写的邮箱&#xff0c;有一封Ana…...

Google AI概览升级,AI模式全新登场!

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…...

【智能体架构:Agent】LangChain智能体类型ReAct、Self-ASK的区别

1. 什么是智能体 将大语言模型作为一个推理引擎。给定一个任务&#xff0c; 智能体自动生成完成任务所需步骤&#xff0c; 执行相应动作&#xff08;例如选择并调用工具&#xff09;&#xff0c; 直到任务完成。 2. 先定义工具&#xff1a;Tools 可以是一个函数或三方 API也…...

nginx 配置403页面(已亲测)

问题&#xff1a;GET请求访问漏洞url即可看到泄露的内网ip 解决方式&#xff1a; 1.配置nginx 不显示真实Ip 2.限制接口只能是POST请求 具体配置&#xff1a; 编写一个403.html 在nginx的配置文件中&#xff0c;配置location参数&#xff1a; location /api/validationCode…...

安卓基础组件Looper - 02 native层面的剖析

文章目录 native使用使用总结创建Looper构造函数创建(不推荐)使用举例源代码 Looper::prepare 获取Looper可忽略初始化Looper主动休眠 pollAll主动唤醒 wake 发送消息 sendMessage轮询消息 native使用 Android Native Looper 机制 - 掘金 (juejin.cn) /system/core/libutils/…...

nodejs关于后端服务开发的探究

前提 在当前的环境中关于web server的主流开发基本上都是java、php之类的&#xff0c;其中java spring系列基本上占了大头&#xff0c;而python之流也在奋起直追&#xff0c;但别忘了nodejs也是可以做这个服务的&#xff0c;只是位置有点尴尬&#xff0c;现在就来探究下nodejs…...

QTday4

1:是进度条通过线程自己动起来 mythread.h #ifndef MYTHREAD_H #define MYTHREAD_H #include <QThread>class mythread : public QThread {Q_OBJECT public:mythread(QObject* parent nullptr); protected:virtual void run() override; private: signals:virtual voi…...

服务器时间同步

方法一 [rootbogon hwh-ansible]# cat time-sync.sh #!/bin/bash # NTP 服务器信息 NTP_SERVER"192.168.42.12" PASSWORD"123456" # 多个 IP 地址 HOSTS("192.168.42.8" "192.168.42.9" "192.168.42.10" "192.168.42…...

蓝桥杯备赛日记【day1】(c++赛道)

一、裁纸刀问题&#xff08;2022、规律、思维、省赛&#xff09; 解法思路&#xff1a; 参考题目给出的例子发现。不管要裁剪多少次。最外围的四次是固定的。然后通过观察发现&#xff0c;我们的行的裁剪次数为&#xff08;m-1&#xff09; 次&#xff0c;而每行都需要裁剪列数…...

DeepSeek大模型 —— 全维度技术解析

DeepSeek大模型 —— 全维度技术解析 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家&#xff01;点我试试&#xff01;&#xff01; 文章目录 DeepSeek大模型 —— 全维度技术解析一、模型架构全景解析1.1…...

嵌入式开发:傅里叶变换(5):基于STM32,实现CMSIS中的DSP库

目录 步骤 1&#xff1a;准备工作 步骤 2&#xff1a;创建 Keil 项目&#xff0c;并配置工程 步骤 3&#xff1a;在MDK工程上添加 CMSIS-DSP 库 步骤 5&#xff1a;编写代码 步骤 6&#xff1a;配置时钟和优化 步骤 7&#xff1a;调试与验证 步骤 8&#xff1a;优化和调…...

Ubuntu 24.04 配置ODBC连接ORACLE 11G数据库

1. 安装必要工具和驱动 1.1 安装unixODBC和依赖库 # apt update # apt install unixodbc unixodbc-dev libaio1 执行失败&#xff0c;报错 libaio1包找不到&#xff0c;先跳过&#xff0c;安装其他两个。 # apt install unixodbc unixodbc-dev 安装成功 1.2 下载Oracle…...

upload-labs靶场 1-21通关

目录 1.Pass-01 前端绕过 分析 解题 2.Pass-02 服务器端检测--修改IMME 分析 解题 3.Pass-03 黑名单绕过 分析 解题 4.Pass-04 .htaccess绕过 分析 解题 5.Pass-05 . .绕过和.user.ini绕过 分析 解题 6.Pass-06 大小写绕过 分析 解题 7.Pass-07 空格绕过 分…...

Docker新手入门(持续更新中)

一、定义 快速构建、运行、管理应用的工具。 Docker可以帮助我们下载应用镜像&#xff0c;创建并运行镜像的容器&#xff0c;从而快速部署应用。 所谓镜像&#xff0c;就是将应用所需的函数库、依赖、配置等应用一起打包得到的。 所谓容器&#xff0c;为每个镜像的应用进程创建…...

c语言笔记 指针篇(上)

1.指针 在计算的存储器中有很多的存储单元&#xff0c;我们的操作系统把这些存储单元以字节为单位进行编号&#xff0c;也就是每个存储单元&#xff08;字节&#xff09;&#xff0c;都有编码。这些编码在我们内存中就称为地址。一个字节有八位&#xff0c;位是存储信息的最小单…...

要查看 SQLite 数据库中的所有表,可以通过查询 SQLite 的系统表 sqlite_master

要查看 SQLite 数据库中的所有表&#xff0c;可以查询 SQLite 的系统表 sqlite_master。 每个 SQLite 数据库都包含一个名为 sqlite_master 的系统表。该表定义了数据库的模式&#xff0c;存储了数据库中所有表、索引、视图和触发器等对象的信息。 通过查询 sqlite_master&am…...

C#释放内存空间的方法

目录 前言释放 C# 对象内存的六种方法1、手动释放内存空间2、使用 Using 语句3、使用 垃圾回收器4、GC.Collect() 方法5、GC.WaitForPendingFinalizers() 方法6、WeakReference 类 注意 前言 当不再需要对象时释放内存空间对于防止内存泄漏和提高应用程序性能至关重要。C# 提供…...