uni-app——下拉框多选
一、组件components/my-selectCheckbox.vue
<template><view class="uni-stat__select"><span v-if="label" class="uni-label-text">{{label + ':'}}</span><view class="uni-stat-box" :class="{'uni-stat__actived': current}"><view class="uni-select" :style="{height:multiple?'100%':' 35px;'}":class="{'uni-select--disabled':disabled}"><view class="uni-select__input-box" :style="{height:multiple?'100%':'35px;'}" @click="toggleSelector"><view class="" style="display: flex;flex-wrap: wrap;width: 100%;" v-if="multiple&¤t.length>0"><view class="tag-calss"v-for="(item,index) in collapseTags?current.slice(0,collapseTagsNum):current":key="item[dataValue]"><span class="text">{{item[dataKey]}}</span><view class="" @click.stop="delItem(item)"><uni-icons type="clear" style="margin-left: 4px;" color="#c0c4cc" /></view></view><view v-if="current.length>collapseTagsNum&&collapseTags" class="tag-calss"><span class="text">+{{current.length-collapseTagsNum}}</span></view></view><view v-else-if="current&¤t.length>0&&!filterable" class="uni-select__input-text">{{current}}</view><input v-else-if="filterable" class="uni-select__input-text" type="text" style="font-size: 12px;":placeholder="placeholderOld" v-model="current"><view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view><uni-icons v-if="current && clear" type="clear" color="#c0c4cc" size="24" @click="clearVal" /><uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" /></view><view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" /><view class="uni-select__selector" v-if="showSelector"><view class="uni-popper__arrow"></view><scroll-view scroll-y="true" class="uni-select__selector-scroll"><view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0"><span>{{emptyTips}}</span></view><view v-else class="uni-select__selector-item"style="display: flex;justify-content: space-between;align-items: center;"v-for="(item,index) in filterMixinDatacomResData" :key="index" @click="change(item)"><span:class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</span><uni-icons v-if="multiple&¤tArr.includes(item[dataValue])" type="checkmarkempty"color="#007aff" /></view></scroll-view></view></view></view></view>
</template><script>/*** DataChecklist 数据选择器* @description 通过数据渲染的下拉框组件* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select* @property {String} value 默认值* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]* @property {Boolean} clear 是否可以清空已选项* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效* @property {String} label 左侧标题* @property {String} placeholder 输入框的提示文字* @property {Boolean} disabled 是否禁用* @event {Function} change 选中发生变化触发*/export default {name: "my-selectCheckbox",mixins: [uniCloud.mixinDatacom || {}],props: {collapseTagsNum: {type: Number,default: 1},collapseTags: {type: Boolean,default: false},dataKey: {type: [String],default: 'text'},dataValue: {type: [String],default: 'value'},multiple: {type: Boolean,default: false},filterable: {type: Boolean,default: false},localdata: {type: Array,default () {return []}},// #ifndef VUE3value: {type: [String, Number, Array],default: ''},// #endif// #ifdef VUE3modelValue: {type: [String, Number, Array],default: ''},// #endiflabel: {type: String,default: ''},placeholder: {type: String,default: '请选择'},emptyTips: {type: String,default: '无选项'},clear: {type: Boolean,default: true},defItem: {type: Number,default: 0},disabled: {type: Boolean,default: false},// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"format: {type: String,default: ''},},data() {return {showSelector: false,current: [],mixinDatacomResData: [],apps: [],channels: [],cacheKey: "uni-data-select-lastSelectedValue",placeholderOld: "",currentArr: []};},created() {if (this.multiple) {// #ifndef VUE3this.currentArr = this.value || []// #endif// #ifdef VUE3this.currentArr = this.modelValue || []// #endifif (!this.current) {this.current = []}// #ifndef VUE3if (this.value && this.value.length > 0 && this.filterMixinDatacomResData.length > 0) {this.value.forEach(item => {let current = this.filterMixinDatacomResData.find(e =>e[this.dataValue] == item)this.current.push(current)})}// #endif// #ifdef VUE3if (this.modelValue && this.modelValue.length > 0 && this.filterMixinDatacomResData.length > 0) {this.modelValue.forEach(item => {let current = this.filterMixinDatacomResData.find(e =>e[this.dataValue] == item)this.current.push(current)})}// #endif} else {// #ifndef VUE3if (this.value) {this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>e[this.dataValue] == this.value))}// #endif// #ifdef VUE3if (this.modelValue) {this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>e[this.dataValue] == this.modelValue))}// #endif}this.placeholderOld = this.placeholderthis.debounceGet = this.debounce(() => {this.query();}, 300);if (this.collection && !this.localdata.length) {this.debounceGet();}},computed: {filterMixinDatacomResData() {if (this.filterable && this.current) {return this.mixinDatacomResData.filter(e => e[this.dataKey].includes(this.current))} else {return this.mixinDatacomResData}},typePlaceholder() {const text = {'opendb-stat-app-versions': '版本','opendb-app-channels': '渠道','opendb-app-list': '应用'}const common = this.placeholderconst placeholder = text[this.collection]return placeholder ?common + placeholder :common},valueCom() {// #ifdef VUE3return this.modelValue;// #endif// #ifndef VUE3return this.value;// #endif}},watch: {localdata: {immediate: true,handler(val, old) {if (Array.isArray(val) && old !== val) {this.mixinDatacomResData = val}}},valueCom(val, old) {this.initDefVal()},mixinDatacomResData: {immediate: true,handler(val) {if (val.length) {this.initDefVal()}}},// modelValue(val) {// if (this.multiple && val && val.length > 0) {// this.currentArr = val// if (!this.current) {// this.current = []// }// val.forEach(item => {// let current = this.filterMixinDatacomResData.find(e =>// e[this.dataValue] == item// )// this.current.push(current)// })// } else {// if (val) {// this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>// e[this.dataValue] == val// ))// }// }// },// value(val) {// if (this.multiple && val && val.length > 0) {// this.currentArr = val// if (!this.current) {// this.current = []// }// val.forEach(item => {// let current = this.filterMixinDatacomResData.find(e =>// e[this.dataValue] == item// )// this.current.push(current)// })// } else {// if (val) {// this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>// e[this.dataValue] == val// ))// }// }// }},methods: {debounce(fn, time = 100) {let timer = nullreturn function(...args) {if (timer) clearTimeout(timer)timer = setTimeout(() => {fn.apply(this, args)}, time)}},// 执行数据库查询query() {this.mixinDatacomEasyGet();},// 监听查询条件变更事件onMixinDatacomPropsChange() {if (this.collection) {this.debounceGet();}},initDefVal() {let defValue = ''if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {defValue = this.valueCom} else {let strogeValueif (this.collection) {strogeValue = this.getCache()}if (strogeValue || strogeValue === 0) {defValue = strogeValue} else {let defItem = ''if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {defItem = this.mixinDatacomResData[this.defItem - 1][this.dataValue]}defValue = defItem}if (defValue || defValue === 0) {this.emit(defValue)}}if (this.multiple) {this.current = []defValue.forEach(item => {let current = this.filterMixinDatacomResData.find(e =>e[this.dataValue] == item)this.current.push(current)})} else {const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)this.current = def ? this.formatItemName(def) : ''}},/*** @param {[String, Number]} value* 判断用户给的 value 是否同时为禁用状态*/isDisabled(value) {let isDisabled = false;this.mixinDatacomResData.forEach(item => {if (item[this.dataValue] === value) {isDisabled = item.disable}})return isDisabled;},clearVal() {if (this.multiple) {this.current = []this.currentArr = []this.emit([])} else {this.current = ""this.currentArr = []this.emit('')}if (this.collection) {this.removeCache()}this.placeholderOld = this.placeholder},change(item) {if (!item.disable) {this.showSelector = falseif (this.multiple) {if (!this.current) {this.current = []}if (!this.currentArr) {this.currentArr = []}if (this.currentArr.includes(item[this.dataValue])) {let index = this.current.findIndex(e => {return e[this.dataValue] == item[this.dataValue]})this.current.splice(index, 1)this.currentArr.splice(index, 1)this.emit(this.current)} else {this.current.push(item)this.currentArr.push(item[this.dataValue])this.emit(this.current)}} else {this.current = this.formatItemName(item)this.emit(item[this.dataValue])}}},delItem(item) {if (this.currentArr.includes(item[this.dataValue])) {let index = this.current.findIndex(e => {return e[this.dataValue] == item[this.dataValue]})this.current.splice(index, 1)this.currentArr.splice(index, 1)this.emit(this.current)}},emit(val) {this.$emit('change', val)if (this.multiple) {this.$emit('input', this.currentArr)this.$emit('update:modelValue', this.currentArr)} else {this.$emit('input', val)this.$emit('update:modelValue', val)}if (this.collection) {this.setCache(val);}},toggleSelector() {if (this.disabled) {return}if (this.filterable && this.current && this.mixinDatacomResData.findIndex(e => {return e[this.dataKey] == this.current}) < 0) {this.current = ""}this.showSelector = !this.showSelectorif (this.filterable && this.current && this.showSelector) {this.placeholderOld = this.currentthis.current = ""} else if (this.filterable && !this.current && !this.showSelector) {if (this.placeholderOld != this.placeholder) {this.current = this.placeholderOld}}},formatItemName(item) {if (!item) {return ""}let text = item[this.dataKey]let value = item[this.dataValue]let {channel_code} = itemchannel_code = channel_code ? `(${channel_code})` : ''if (this.format) {// 格式化输出let str = "";str = this.format;for (let key in item) {str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);}return str;} else {return this.collection.indexOf('app-list') > 0 ?`${text}(${value})` :(text ?text :`未命名${channel_code}`)}},// 获取当前加载的数据getLoadData() {return this.mixinDatacomResData;},// 获取当前缓存keygetCurrentCacheKey() {return this.collection;},// 获取缓存getCache(name = this.getCurrentCacheKey()) {let cacheData = uni.getStorageSync(this.cacheKey) || {};return cacheData[name];},// 设置缓存setCache(value, name = this.getCurrentCacheKey()) {let cacheData = uni.getStorageSync(this.cacheKey) || {};cacheData[name] = value;uni.setStorageSync(this.cacheKey, cacheData);},// 删除缓存removeCache(name = this.getCurrentCacheKey()) {let cacheData = uni.getStorageSync(this.cacheKey) || {};delete cacheData[name];uni.setStorageSync(this.cacheKey, cacheData);},}}
</script><style lang="scss">$uni-base-color: #6a6a6a !default;$uni-main-color: #333 !default;$uni-secondary-color: #909399 !default;$uni-border-3: #e5e5e5;/* #ifndef APP-NVUE */@media screen and (max-width: 500px) {.hide-on-phone {display: none;}}/* #endif */.uni-stat__select {display: flex;align-items: center;// padding: 15px;cursor: pointer;width: 100%;flex: 1;box-sizing: border-box;}.uni-stat-box {width: 100%;flex: 1;}.uni-stat__actived {width: 100%;flex: 1;// outline: 1px solid #2979ff;}.uni-label-text {font-size: 14px;font-weight: bold;color: $uni-base-color;margin: auto 0;margin-right: 5px;}.uni-select {font-size: 14px;border: 1px solid $uni-border-3;box-sizing: border-box;border-radius: 4px;padding: 0 5px;padding-left: 10px;position: relative;/* #ifndef APP-NVUE */display: flex;user-select: none;/* #endif */flex-direction: row;align-items: center;border-bottom: solid 1px $uni-border-3;width: 100%;flex: 1;height: 35px;min-height: 35px;&--disabled {background-color: #f5f7fa;cursor: not-allowed;}}.uni-select__label {font-size: 16px;// line-height: 22px;min-height: 35px;height: 35px;padding-right: 10px;color: $uni-secondary-color;}.uni-select__input-box {height: 35px;position: relative;/* #ifndef APP-NVUE */display: flex;/* #endif */flex: 1;flex-direction: row;align-items: center;.tag-calss {font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;font-weight: 400;-webkit-font-smoothing: antialiased;-webkit-tap-highlight-color: transparent;font-size: 12px;border: 1px solid #d9ecff;border-radius: 4px;white-space: nowrap;height: 24px;padding: 0 4px 0px 8px;line-height: 22px;box-sizing: border-box;margin: 2px 0 2px 6px;display: flex;max-width: 100%;align-items: center;background-color: #f4f4f5;border-color: #e9e9eb;color: #909399;.text {font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;font-weight: 400;-webkit-font-smoothing: antialiased;-webkit-tap-highlight-color: transparent;font-size: 12px;white-space: nowrap;line-height: 22px;color: #909399;overflow: hidden;text-overflow: ellipsis;}}}.uni-select__input {flex: 1;font-size: 14px;height: 22px;line-height: 22px;}.uni-select__input-plac {font-size: 14px;color: $uni-secondary-color;}.uni-select__selector {/* #ifndef APP-NVUE */box-sizing: border-box;/* #endif */position: absolute;top: calc(100% + 12px);left: 0;width: 100%;background-color: #FFFFFF;border: 1px solid #EBEEF5;border-radius: 6px;box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);z-index: 3;padding: 4px 0;}.uni-select__selector-scroll {/* #ifndef APP-NVUE */max-height: 200px;box-sizing: border-box;/* #endif */}.uni-select__selector-empty,.uni-select__selector-item {/* #ifndef APP-NVUE */display: flex;cursor: pointer;/* #endif */line-height: 35px;font-size: 14px;text-align: center;/* border-bottom: solid 1px $uni-border-3; */padding: 0px 10px;}.uni-select__selector-item:hover {background-color: #f9f9f9;}.uni-select__selector-empty:last-child,.uni-select__selector-item:last-child {/* #ifndef APP-NVUE */border-bottom: none;/* #endif */}.uni-select__selector__disabled {opacity: 0.4;cursor: default;}/* picker 弹出层通用的指示小三角 */.uni-popper__arrow,.uni-popper__arrow::after {position: absolute;display: block;width: 0;height: 0;border-color: transparent;border-style: solid;border-width: 6px;}.uni-popper__arrow {filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));top: -6px;left: 10%;margin-right: 3px;border-top-width: 0;border-bottom-color: #EBEEF5;}.uni-popper__arrow::after {content: " ";top: 1px;margin-left: -6px;border-top-width: 0;border-bottom-color: #fff;}.uni-select__input-text {// width: 280px;width: 100%;color: $uni-main-color;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;}.uni-select__input-placeholder {color: $uni-base-color;font-size: 12px;}.uni-select--mask {position: fixed;top: 0;bottom: 0;right: 0;left: 0;}
</style>
二、页面使用
<template><view><uni-section title="基础多选" type="line"><view class="uni-px-5 uni-pb-5"><mySelectCheckbox v-model="value1" multiple dataKey="label" dataValue="value" :localdata="data" @change="change"></mySelectCheckbox></view></uni-section><uni-section title="基础多选(合并)" type="line"><view class="uni-px-5 uni-pb-5"><mySelectCheckbox v-model="value1" collapse-tags multiple dataKey="label" dataValue="value":localdata="data" @change="change"></mySelectCheckbox></view></uni-section><uni-section title="基础多选(可通过collapse-tags-num设置超过数量省略)" type="line"><view class="uni-px-5 uni-pb-5"><mySelectCheckbox v-model="value1" collapse-tags :collapse-tags-num="3" multiple dataKey="label"dataValue="value" :localdata="data" @change="change"></mySelectCheckbox></view></uni-section></view>
</template>
<script>import mySelectCheckbox from '../../components/my-selectCheckbox.vue'export default {components:{mySelectCheckbox},data() {return {value1: ["选项1"],data: []}},watch: {value1(newval) {console.log('newval', newval);}},created() {setTimeout(() => {this.data = [{value: '选项1',label: '清华大学'}, {value: '选项2',label: '北京大学'}, {value: '选项3',label: '北京航空航天大学'}, {value: '选项4',label: '北京理工大学'}, {value: '选项5',label: '中国人民大学'}, {value: '选项6',label: '北京科技大学'}, {value: '选项7',label: '北京交通大学'}]}, 1000)},methods: {change(e) {console.log('e:', e);}}}
</script><style>.uni-px-5 {padding-left: 10px;padding-right: 10px;}.uni-pb-5 {padding-bottom: 10px;}
</style>
相关文章:

uni-app——下拉框多选
一、组件components/my-selectCheckbox.vue <template><view class"uni-stat__select"><span v-if"label" class"uni-label-text">{{label :}}</span><view class"uni-stat-box" :class"…...

从excel中提取嵌入式图片的解决方法
1 发现问题 我的excel中有浮动图片和嵌入式图片,但是openpyxl的_image对象只提取到了浮动图片,通过阅读其源码发现,这是因为openpyxl只解析了drawing文件导致的,所以确定需要自己解析 2 解决思路 1、解析出media资源 2、解析…...
python socket 网络编程的基本功
python socket逻辑思维整理 UDP发送步骤: 1 、先建立udp套接字 udp_socket socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 2、利用sendto把数据并指定对端IP和端口,本端端口可以不用指定用自动随机的 udp_socket.sendto(“发送的内容”.encode(“…...

【element-ui】form表单初始化页面如何取消自动校验rules
问题描述:elementUI表单提交页面,初始化页面是获取接口数据,给form赋值,但是有时候这些会是空值情况,如果是空值,再给form表单赋值的话,页面初始化时候进行rules校验会不通过,此时前…...

git 公钥密钥 生成与查看
1.什么是公钥 很多服务器都是需要认证的,ssh认证是其中的一种。在客户端生成公钥,把生成的公钥添加到服务器,你以后连接服务器就不用每次都输入用户名和密码了。 很多git服务器都是用ssh认证方式,你需要把你生成的公钥发送给代码仓…...

数据标注对新零售的意义及人工智能在新零售领域的应用?
数据标签对于新零售至关重要,因为它构成了训练和部署人工智能(AI)和机器学习(ML)模型的基础。在新零售的背景下,数据标签涉及对数据进行分类、标记或注释以使其能够被机器理解的过程。然后,这些…...

命令模式-请求发送者与接收者解耦
去小餐馆吃饭的时候,顾客直接跟厨师说想要吃什么菜,然后厨师再开始炒菜。去大点的餐馆吃饭时,我们是跟服务员说想吃什么菜,然后服务员把这信息传到厨房,厨师根据这些订单信息炒菜。为什么大餐馆不省去这个步骤…...

【雕爷学编程】Arduino动手做(186)---WeMos ESP32开发板
37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的&#x…...
3、JSON数据的处理
3.1 介绍 JSON数据 Spark SQL can automatically infer the schema of a JSON dataset and load it as a DataFrame Spark SQL能够自动将JSON数据集以结构化的形式加载为一个DataFrame This conversion can be done using SparkSession.read.json on a JSON file 读取一个JSO…...

8月5日上课内容 nginx的优化和防盗链
全部都是面试题 nginx的优化和防盗链 重点就是优化: 每一个点都是面试题,非常重要,都是面试题 1、隐藏版本号(重点,一定要会) 备份 cp nginx.conf nginx.conf.bak.2023.0805 方法一:修改配…...
网络爬虫请求头中的Referer和User-Agent与代理IP的配合使用
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-8EJgMcgK-1691050515642)(https://cdn.nlark.com/yuque/0/2023/png/1313150/1691048724422-2a76d7b8-3ec3-48b7-9aec-d609d09b16d4.png#averageHue%2385b0a7&clientIdu3856fd20-7701-4&fromui&…...
RabbitMQ 生产者-消息丢失 之 场景分析
生产者-消息丢失 之 场景分析 生产者消息丢失的场景消息无法到达RabbitMQ连接断开信道关闭 RabbitMQ无法将消息入队交换机不存在无匹配队列 消息过期丢失消息丢失场景对比 生产者消息丢失的场景 生产者发送消息的流程如下:首先生产者和RabbitMQ服务器建立连接&…...

Hyper实现git bash在windows环境下多tab窗口显示
1.电脑上安装有git bash 下载链接:https://gitforwindows.org/ 安装Hyper 下载链接:官网 https://hyper.is/ 或者在百度云盘下载: https://pan.baidu.com/s/1BVjzlK0s4SgAbQgsiK1Eow 提取码:0r1f 设置 打开Hyper,依次点左上角-&g…...

Matlab的信号频谱分析——FFT变换
Matlab的信号频谱分析——FFT变换 Matlab的信号频谱分析 FFT是离散傅立叶变换的快速算法,可以将一个时域信号变换到频域。 有些信号在时域上是很难看出什么特征的。但是如果变换到频域之后,就很容易看出特征了。 这就是很多信号分析采用FFT变换的原因…...

如何从 Android 设备恢复已删除的文件?
从 Android 设备恢复已删除的文件很简单,但您需要了解内部恢复和SD 卡恢复之间的区别。 目前销售的大多数 Android 设备都配备了 SD 卡插槽(通常为 microSD),可以轻松添加额外的存储空间。该存储空间可用于存储照片、视频、文档&a…...

servlet生命周期和初始化参数传递
servlet生命周期和初始化参数传递 1、servlet生命周期 只有第一次访问才会初始化,之后访问都只执行service中的。 除非tomcat关闭重新启动: 2、初始化参数传递...

dvwa靶场通关(十一)
第十一关:Reflected Cross Site Scripting (XSS) low 这一关没有任何防护,直接输入弹窗 <script>alert(xss)</script> 打开网页源代码, 从源代码中我们可以看到,前面是输出的第一部分Hello,我们输入的脚…...

【Spring】使用注解存储Bean对象
目录 一、配置扫描路径(使用注解的方式存对象的前提) 二、使用类注解存储Bean对象 1、使用五大类注解存储Bean对象 2、为什么要这么多的类注解? 2.1、五大类注解之间的关系 3、获取Bean对象时的默认命名规则 三、使用方法注解来存储…...

怎么维护好自己的电脑
你的电脑已经成为你工作、学习、娱乐的最佳工具之一,但是如果你不做好电脑维护工作,就可能面临着电脑变慢、蓝屏、崩溃等问题。在这篇文章中,我们将介绍10个电脑维护步骤,让你的电脑更加稳定! 为什么需要电脑维护&…...

vscode中无法使用git解决方案
1 首先查看git安装目录 where git 2 找到bash.exe 的路径 比如:C:/Users/Wangzd/AppData/Local/Programs/Git/bin/bash 3 找到vscode的配置项setting.json 4 添加 "terminal.integrated.shell.windowns": "C:/Users/Wangzd/AppData/Local/Pr…...
[2025CVPR]DeepVideo-R1:基于难度感知回归GRPO的视频强化微调框架详解
突破视频大语言模型推理瓶颈,在多个视频基准上实现SOTA性能 一、核心问题与创新亮点 1.1 GRPO在视频任务中的两大挑战 安全措施依赖问题 GRPO使用min和clip函数限制策略更新幅度,导致: 梯度抑制:当新旧策略差异过大时梯度消失收敛困难:策略无法充分优化# 传统GRPO的梯…...

多模态2025:技术路线“神仙打架”,视频生成冲上云霄
文|魏琳华 编|王一粟 一场大会,聚集了中国多模态大模型的“半壁江山”。 智源大会2025为期两天的论坛中,汇集了学界、创业公司和大厂等三方的热门选手,关于多模态的集中讨论达到了前所未有的热度。其中,…...

树莓派超全系列教程文档--(61)树莓派摄像头高级使用方法
树莓派摄像头高级使用方法 配置通过调谐文件来调整相机行为 使用多个摄像头安装 libcam 和 rpicam-apps依赖关系开发包 文章来源: http://raspberry.dns8844.cn/documentation 原文网址 配置 大多数用例自动工作,无需更改相机配置。但是,一…...
IGP(Interior Gateway Protocol,内部网关协议)
IGP(Interior Gateway Protocol,内部网关协议) 是一种用于在一个自治系统(AS)内部传递路由信息的路由协议,主要用于在一个组织或机构的内部网络中决定数据包的最佳路径。与用于自治系统之间通信的 EGP&…...
系统设计 --- MongoDB亿级数据查询优化策略
系统设计 --- MongoDB亿级数据查询分表策略 背景Solution --- 分表 背景 使用audit log实现Audi Trail功能 Audit Trail范围: 六个月数据量: 每秒5-7条audi log,共计7千万 – 1亿条数据需要实现全文检索按照时间倒序因为license问题,不能使用ELK只能使用…...

[10-3]软件I2C读写MPU6050 江协科技学习笔记(16个知识点)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16...

Psychopy音频的使用
Psychopy音频的使用 本文主要解决以下问题: 指定音频引擎与设备;播放音频文件 本文所使用的环境: Python3.10 numpy2.2.6 psychopy2025.1.1 psychtoolbox3.0.19.14 一、音频配置 Psychopy文档链接为Sound - for audio playback — Psy…...

UR 协作机器人「三剑客」:精密轻量担当(UR7e)、全能协作主力(UR12e)、重型任务专家(UR15)
UR协作机器人正以其卓越性能在现代制造业自动化中扮演重要角色。UR7e、UR12e和UR15通过创新技术和精准设计满足了不同行业的多样化需求。其中,UR15以其速度、精度及人工智能准备能力成为自动化领域的重要突破。UR7e和UR12e则在负载规格和市场定位上不断优化…...

智能分布式爬虫的数据处理流水线优化:基于深度强化学习的数据质量控制
在数字化浪潮席卷全球的今天,数据已成为企业和研究机构的核心资产。智能分布式爬虫作为高效的数据采集工具,在大规模数据获取中发挥着关键作用。然而,传统的数据处理流水线在面对复杂多变的网络环境和海量异构数据时,常出现数据质…...

Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决
Spring Cloud Gateway 中自定义验证码接口返回 404 的排查与解决 问题背景 在一个基于 Spring Cloud Gateway WebFlux 构建的微服务项目中,新增了一个本地验证码接口 /code,使用函数式路由(RouterFunction)和 Hutool 的 Circle…...