vue3实现自定义select下拉框内容之城市区域篇
分享-2023年资深前端进阶:前端登顶之巅-最全面的前端知识点梳理总结
*分享一个使用比较久的🪜
需求分析:
1、实现一个区域下拉选项与现有ui组件库不同,支持多选、单选需求
2、支持选中区域后-全选中当前区域下的所有城市信息
3、只能选中当前一个区域的内的城市其余城市禁用
扩展思路:
1、封装公共组件或者封装在组件库内
2、出入参相关api透明好理解
3、支持单选或者多选,支持只选择当前区域下的城市或者全面区域下的城市
4、在原有的element plus下进行扩展延伸满足需求
5、缺陷:未做maxLength-标签最大展示的api;这个按需自己修改一下就行
1、第一种模式:显示区域信息

2、第二种模式:只展示城市内容

1、相关开发代码篇
创建文件:custom-select.vue文件;复制copy当下代码;
使用方式:
1、外部入参例如城市:dataSource=[{ label: 华北,value: '华东', children: [{ label: '山东',value: 'shandong'}]],树形结构
2、标签引用:<custom-select :disabled="true" :multilevel="true" height="32" v-model="checkGroup" :dataSource="cityList"></custom-select>
3、相关api说明文档在文章底部
<template><divtabindex="1"ref="customSelectRef"@click="handleClickDiv"@mouseenter="handelMouseEnter"@mouseleave="handleMouseLeave":style="{ width: modelLabel && modelValue?.length ? '166px' : '100px', height: (height + 'px') || '25px' }":class="['custom-select_contaniner-i', isShowDropdown && 'custom-select_background']"><div><span v-if="modelLabel" class="custom-tag"><span>{{ modelLabel }}</span><iclass="custom_tag_delete"@mouseenter="handelIconMouseEnter"@mouseleave="handleIconMouseLeave"@click.stop="handleDeleteIcon"><svgv-if="!ishShowIconDeleteText"t="1678090923023"class="icon"viewBox="0 0 1024 1024"version="1.1"xmlns="http://www.w3.org/2000/svg"p-id="6709"width="11"height="11"><pathd="M263.802377 224.219482a7.964444 7.964444 0 0 1 11.263425 0l236.934198 236.934198 236.934198-236.934198a7.964444 7.964444 0 0 1 11.263425 0l39.582895 39.582895a7.964444 7.964444 0 0 1 0 11.263425l-236.934198 236.934198 236.934198 236.934198a7.964444 7.964444 0 0 1 0 11.263425l-39.582895 39.582895a7.964444 7.964444 0 0 1-11.263425 0l-236.934198-236.934198-236.934198 236.934198a7.964444 7.964444 0 0 1-11.263425 0l-39.582895-39.582895a7.964444 7.964444 0 0 1 0-11.263425l236.934198-236.934198-236.934198-236.934198a7.964444 7.964444 0 0 1 0-11.263425l39.582895-39.582895z"fill="#8a8a8a"p-id="6710"/></svg><svgv-elset="1678091410677"class="icon"viewBox="0 0 1024 1024"version="1.1"xmlns="http://www.w3.org/2000/svg"p-id="6936"width="22"height="22"><pathd="M479.072 512l-98.72-98.72c-9.152-9.152-9.088-23.84 0-32.928 9.152-9.152 23.84-9.088 32.928 0l98.72 98.72 98.72-98.72c9.152-9.152 23.84-9.088 32.928 0 9.152 9.152 9.088 23.84 0 32.928l-98.72 98.72 98.72 98.72c9.152 9.152 9.088 23.84 0 32.928-9.152 9.152-23.84 9.088-32.928 0l-98.72-98.72-98.72 98.72c-9.152 9.152-23.84 9.088-32.928 0-9.152-9.152-9.088-23.84 0-32.928l98.72-98.72zM512 837.824c179.936 0 325.824-145.888 325.824-325.824s-145.888-325.824-325.824-325.824c-179.936 0-325.824 145.888-325.824 325.824s145.888 325.824 325.824 325.824z"fill="#B7B8B9"p-id="6937"/></svg></i></span><span v-if="modelLabel && modelValue?.length > 1" class="custom-tag">+ {{ modelValue.length - 1 }}</span><span v-if="!modelLabel" class="cus_placeholder">{{ placeholder }}</span></div><i class="arrow-top-icon" v-if="!isShowIconRemove || !modelLabel" :class="[!isShowDropdown && 'arrow-top-icon-active']"><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><pathfill="currentColor"d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"/></svg></i><i class="remove-icon" v-if="isShowIconRemove && modelLabel" @click.stop="handleRemove"><svgt="1678084213981"class="icon"viewBox="0 0 1024 1024"version="1.1"xmlns="http://www.w3.org/2000/svg"p-id="4480"width="11"height="11"><pathd="M512 32c265.097 0 480 214.903 480 480S777.097 992 512 992 32 777.097 32 512 246.903 32 512 32z m0 64C282.25 96 96 282.25 96 512s186.25 416 416 416 416-186.25 416-416S741.75 96 512 96z m169.706 246.294c12.496 12.497 12.496 32.758 0 45.255L557.256 512l124.45 124.452c12.496 12.497 12.496 32.758 0 45.255-12.497 12.496-32.758 12.496-45.255 0L512 557.254 387.549 681.706c-12.497 12.496-32.758 12.496-45.255 0-12.496-12.497-12.496-32.758 0-45.255l124.452-124.452-124.452-124.45c-12.496-12.497-12.496-32.758 0-45.255 12.497-12.496 32.758-12.496 45.255 0l124.452 124.45 124.45-124.45c12.497-12.496 32.758-12.496 45.255 0z"fill="#8a8a8a"p-id="4481"/></svg></i></div><transition><divv-if="isShowDropdown"ref="cusSelectDropdown"class="cus_select_background":style="{ minWidth: popperOffestWidth + 'px', zIndex: 99999 }"><div v-if="multilevel" style="padding: 5px 20px;"><div :key="key" v-for="(opt, key) in cusDataListChecked" class="multilevel_box"><el-checkboxstyle="width: 60px;"v-model="opt.checkAll"@change="handleCheckAllChange($event, opt)":indeterminate="opt.isIndeterminate":disabled="disabled && checkList.length ? !opt.checkList.length : false">{{ opt.label }}</el-checkbox><el-checkbox-group v-model="opt.checkList"v-if="opt.children"@change="handleCheckedCitiesChange($event, opt)"style="display: inline-block; padding-left: 20px" ><el-checkbox :label="item.value" style="width: 60px":key="index + Math.random()" v-for="(item, index) in opt.children" :disabled="disabled && checkList.length ? !opt.checkList.length : false">{{ item.label }}</el-checkbox></el-checkbox-group></div></div><div class="cus_select_contaniner" v-else><div class="cus_select_left">中国</div><div class="cus_select_right"><el-checkbox-group v-model="checkList" @change="handelCheckGroup"style="display: inline-block; padding-left: 20px" ><el-checkbox :key="index" :label="item.value" style="width: 60px"v-for="(item, index) in dataSource" >{{ item.label }}</el-checkbox></el-checkbox-group></div></div><span class="el-popper__arrow" data-popper-arrow="" style="position: absolute; left: 140px;"></span></div></transition>
</template>
<script setup lang="ts">
import { createPopper } from '@popperjs/core'
import { ref, onMounted, nextTick, watch, onUnmounted, toRaw, onBeforeMount, computed } from 'vue'const props = withDefaults(defineProps<{height?: string | numberdataSource: anymodelValue?: anyplaceholder?: stringmultilevel?: booleandisabled?: boolean}>(),{height: 25,disabled: false,multilevel: false,dataSource: [],modelValue: [],placeholder: '请选择'}
)const emit = defineEmits(['update:modelValue'])const customSelectRef = ref()const cusSelectDropdown = ref()const cusDataListChecked = ref<any[]>([])const checkList = ref<string[]>([])const popperOffestWidth = ref<number>(0)const isShowDropdown = ref<boolean>(false)const modelLabel = ref<string>('')const isShowIconRemove = ref<boolean>(false)const ishShowIconDeleteText = ref<boolean>(false)const handleClickDiv = () => {isShowDropdown.value = !isShowDropdown.value
}const handelCheckGroup = (value) => {const obj = props.dataSource.filter((item) => item.value === value[0])[0]modelLabel.value = obj?.labelemit('update:modelValue', value)
}const handelMouseEnter = () => {isShowIconRemove.value = true
}const handleMouseLeave = () => {isShowIconRemove.value = false
}const handleRemove = () => {modelLabel.value = ''checkList.value = []if (isShowDropdown.value) {isShowDropdown.value = false}if (props.multilevel) {cusDataListChecked.value = addCheckProperties(props.dataSource)}emit('update:modelValue', [])
}const handleDeleteIcon = () => {isShowDropdown.value = falsecheckList.value.splice(0, 1)if (props.multilevel) return cusDataListChecked.value = findTreeChecked(cusDataListChecked.value)const info = toRaw(checkList.value)[0]const obj = props.dataSource.filter((item) => item.value === info)[0]modelLabel.value = obj?.label || ''
}const handelIconMouseEnter = () => {ishShowIconDeleteText.value = true
}const handleIconMouseLeave = () => {ishShowIconDeleteText.value = false
}// 点击某个DOM元素之外的方法
const handlerDocClick = (event) => {const isSelf = customSelectRef.value?.contains(event.target) || cusSelectDropdown.value?.contains(event.target)if (!isSelf) {isShowDropdown.value = false}
}/*** 展示区域省份的逻辑* */
const handleCheckAllChange = (bool: any, option) => {const allCity = option.children ? option.children.map(item => item.value) : [option.value]bool ? option.checkList = allCity : option.checkList = []option.isIndeterminate = falsecheckList.value = option.checkListconst newLabelArr = option.children ? option.children.filter(item => checkList.value.includes(item.value)) : checkList.value?.length ? [{ label: '默认' }] : []modelLabel.value = newLabelArr?.[0]?.label || ''emit('update:modelValue', checkList.value)
}const handleCheckedCitiesChange = (value: any[], option) => {const checkedCount = value.lengthconst allCity = option.children ? option.children.map(item => item.value) : [option.value]option.checkAll = checkedCount === allCity.lengthoption.isIndeterminate = checkedCount > 0 && checkedCount < allCity.lengthcheckList.value = option.checkListconst newLabelArr = option.children ? option.children.filter(item => checkList.value.includes(item.value)) : checkList.value?.length ? [{ label: '默认' }] : []modelLabel.value = newLabelArr?.[0]?.label || ''emit('update:modelValue', checkList.value)
}const addCheckProperties = (treeData) => {let result = []result = JSON.parse(JSON.stringify(treeData))result.forEach(node => {const child = node.children;node.checkAll = false;node.isIndeterminate = false;node.checkList = [];if (child && child.length > 0) {addCheckProperties(child);}});return result
}const findTreeChecked = (treeData) => {let newLabelconst val = toRaw(checkList.value)const defaultBool = val.some(item => item.includes('default'))treeData.forEach(node => {if (node.children?.length) {const child = node.children;const bool = child.some(opt => val.includes(opt.value))!newLabel ? newLabel = child.filter(item => val.includes(item.value))[0] : void nullif (bool) {node.checkAll = val.length === child?.length;node.isIndeterminate = val.length > 0 && val.length < child?.length;node.checkList = val;} else {node.isIndeterminate = false}}})treeData[0].isIndeterminate = false;treeData[0].checkAll = defaultBool ? true : false;treeData[0].checkList = defaultBool ? ['default'] : [];modelLabel.value = defaultBool ? '默认' : newLabel?.label || ''return treeData
}watch([customSelectRef, cusSelectDropdown],() => {if (customSelectRef.value && cusSelectDropdown.value) {createPopper(customSelectRef.value, cusSelectDropdown.value, {placement: 'bottom',modifiers: [{name: 'offset',options: {offset: [80, 8]}}]})}},{deep: true,immediate: true}
)watch(props.modelValue,(newval) => {if (!newval || !newval.length) returncheckList.value = props.modelValueif (props.multilevel) returnconst obj = props.dataSource.filter((item) => item.value === newval[0])[0]modelLabel.value = obj?.label},{deep: true,immediate: true}
)onBeforeMount(() => {if (props.multilevel) {cusDataListChecked.value = addCheckProperties(props.dataSource)}
})onMounted(async () => {await nextTick()popperOffestWidth.value = customSelectRef.value.offsetWidthdocument.addEventListener('click', handlerDocClick, true)if (props.multilevel && props.modelValue.length) { cusDataListChecked.value = findTreeChecked(cusDataListChecked.value)}
})onUnmounted(() => {document.removeEventListener('click', handlerDocClick, true)
})
</script><script lang="ts">
export default { name: 'CustomSelect' }
</script><style lang="scss" scoped>
.v-enter-active,
.v-leave-active {transition: opacity 0.5s ease;
}.v-enter-from,
.v-leave-to {opacity: 0;
}.custom-select_contaniner-i {width: 100%;height: 25px;padding: 7px 9px;padding-left: 5px;border-radius: 4px;line-height: 1;cursor: pointer;position: relative;user-select: none;word-wrap: break-word;word-break: break-all;font-size: 13px;flex-grow: 1;display: inline-flex;align-items: center;box-sizing: border-box;justify-content: space-between;color: var(--el-input-text-color, var(--el-text-color-regular));background-color: var(--el-input-bg-color, var(--el-fill-color-blank));box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
}.custom-tag {color: var(--el-color-info);display: inline-flex;justify-content: center;align-items: center;height: 18px;padding: 0 9px;line-height: 1;border-radius: 4px;white-space: nowrap;font-size: 12px;background-color: var(--el-fill-color);
}.custom_tag_delete {width: 18px;margin-left: 5px;font-size: 0px;border-radius: 50%;display: flex;justify-content: center;align-items: center;cursor: pointer;color: var(--el-color-info);
}.custom-tag:first-child {margin-right: 6px;padding-right: 4px;
}.arrow-top-icon {width: 14px;transform: rotateX(-180deg);color: var(--el-text-color-placeholder);
}.remove-icon {margin-top: 2px;color: var(--el-text-color-placeholder);
}.arrow-top-icon-active {transform: rotateX(0deg);
}.custom-select:hover {box-shadow: 0 0 0 1px var(--el-border-color-hover) inset;
}.custom-select:focus {outline: none;box-shadow: 0 0 0 1px var(--el-color-primary) inset;
}.custom-select_background {box-shadow: 0 0 0 1px var(--el-color-primary) inset;
}::-webkit-scrollbar {width: 4px;height: 4px;background-color: transparent;
}/*滚动条的轨道*/
::-webkit-scrollbar-track {background-color: transparent;
}/*滚动条的滑块按钮*/
::-webkit-scrollbar-thumb {border-radius: 8px;background-color: rgba(0, 0, 0, 0.1);box-shadow: inset 0 0 2px rgba(#000000, 0.04);
}/*滚动条的上下两端的按钮*/
::-webkit-scrollbar-button {height: 0;background-color: transparent;
}.cus_select_contaniner {padding: 5px 10px;display: flex;
}.cus_select_left {width: 60px;margin-top: 5px;
}.cus_select_right {flex: 1;width: 480px;
}.cus_select_background {min-height: 200px;box-sizing: border-box;border-radius: 4px;font-size: var(--el-font-size-base);color: var(--el-text-color-regular);background: var(--el-bg-color-overlay);border: 1px solid var(--el-border-color-light);.multilevel_box {display: flex; padding: 5px; border-bottom: 1px solid #e4e7ed;}.multilevel_box:last-child {border-bottom: none;}
}.cus_placeholder {color: var(--el-text-color-placeholder);
}.el-popper__arrow {top: -5px;
}.el-popper__arrow {position: absolute;width: 10px;height: 10px;z-index: -1;
}.el-popper__arrow::before {border: 1px solid var(--el-border-color-light);background: var(--el-bg-color-overlay);right: 0;border-bottom-color: transparent!important;border-right-color: transparent!important;
}
</style>
2、组件-相关api说明
| 参数 | 说明 | 类型 | 默认值 | 必填项 |
|---|---|---|---|---|
| height | 输入框的高度 | String/Number | 25 | 否 |
| dataSource | [{}]-label,value;树形结构 | Array[] | [] | 是 |
| modelValue | 当前选中项内容 | Array | [] | 否 |
| placeholder | 输入框内容 | String | 请输入 | 否 |
| multilevel | 是否开启跨层级模式 | Boolean | false | 否 |
| disabled | 是否开启跨层级禁用 | Boolean | false | 否 |
相关文章:
vue3实现自定义select下拉框内容之城市区域篇
分享-2023年资深前端进阶:前端登顶之巅-最全面的前端知识点梳理总结 *分享一个使用比较久的🪜 需求分析: 1、实现一个区域下拉选项与现有ui组件库不同,支持多选、单选需求 2、支持选中区域后-全选中当前区域下的所有城市信息 3、…...
性能测评:腾讯云轻量应用服务器_CPU内存带宽流量
腾讯云轻量应用服务器性能如何?轻量服务器CPU内存带宽配置高,CPU采用什么型号主频多少?轻量应用服务器会不会比云服务器CVM性能差?腾讯云服务器网详解CPU型号主频、内存、公网带宽和系统盘存储多维对比,相对于CVM云服务…...
python中的迭代器和生成器
一、迭代器 支持迭代的容器,如列表(list)、元组(tuple)、字典(dict)、集合(set)这些序列式容器。 自定义迭代器的类中必须实现以下2个方法: __next__(self)…...
Python-OpenCV中的图像处理-图像阀值
Python-OpenCV中的图像处理-图像阀值 图像阈值单阈值自适应阈值Otsus二值化 图像阈值 单阈值 与名字一样,这种方法非常简单。但像素值高于阈值时,我们给这个像素赋予一个新值(可能是白色),否则我们给它赋予另外一种颜…...
VB+SQL酒店客房管理设计与实现
摘要 二十一世纪是信息技术的时代,计算机已经应用到了各行各业中。采用计算机信息管理技术,可以有效的降低企业的管理成本,提高企业内部的工作效率。 本文从天天宾馆客房客房管理的一般流程出发,设计了一套天天宾馆客房管理信息系统,它可以管理天天宾馆客房中所有的客房的…...
【Linux】从0到1实现一个进度条小程序
个人主页:🍝在肯德基吃麻辣烫 我的gitee:gitee仓库 分享一句喜欢的话:热烈的火焰,冰封在最沉默的火山深处 文章目录 前言一、理解回车 \r 和换行 \n二、初步认识缓冲区1. 认识第一个函数:sleep2.观察缓冲区…...
江南大学轴承数据故障诊断(利用一维CNN进行故障诊断,代码和数据放在压缩包,无需修改任何东西,解压缩后直接运行,有详细注释)
1.江南大学轴承数据集介绍 采样频率:50khz,采样时间:10s 转速:600 800 1000/rpm 内圈:ib 外圈:ob 滚动体:tb 正常:N 以600转速下的内圈故障数据为例展示: 开始数据…...
【网络基础实战之路】基于BGP协议连接三个AS区域的实战详解
系列文章传送门: 【网络基础实战之路】设计网络划分的实战详解 【网络基础实战之路】一文弄懂TCP的三次握手与四次断开 【网络基础实战之路】基于MGRE多点协议的实战详解 【网络基础实战之路】基于OSPF协议建立两个MGRE网络的实验详解 【网络基础实战之路】基于…...
基于Python爬虫+词云图+情感分析对某东上完美日记的用户评论分析
🤵♂️ 个人主页:艾派森的个人主页 ✍🏻作者简介:Python学习者 🐋 希望大家多多支持,我们一起进步!😄 如果文章对你有帮助的话, 欢迎评论 💬点赞Ǵ…...
Day 26 C++ list容器(链表)
文章目录 list基本概念定义结构双向迭代器优点缺点List和vector区别存储结构内存管理迭代器稳定性随机访问效率 list构造函数——创建list容器函数原型示例 list 赋值和交换函数原型 list 大小操作函数原型示例 list 插入和删除函数原型示例 list 数据存取函数原型注意示例 lis…...
【深度学习注意力机制系列】—— SKNet注意力机制(附pytorch实现)
SKNet(Selective Kernel Network)是一种用于图像分类和目标检测任务的深度神经网络架构,其核心创新是引入了选择性的多尺度卷积核(Selective Kernel)以及一种新颖的注意力机制,从而在不增加网络复杂性的情况…...
Markdown语法和表情
Markdown语法和表情 1. 标题2. 段落3. 加粗和斜体4.分隔线5.删除线6.下划线7.引用8.列表9.链接10. 图片11. 代码12.Markdown 表格其他1.支持的 HTML 元素2.转义3.公式 Markdown表情参考 Markdown 是一种轻量级的标记语言,用于简洁地编写文本并转换为HTML。它的语法简…...
CSDN编纂目录索引跳转设置
CSDN编纂目录索引跳转设置 文章目录 题目第一小节第二小节第三小节结论 题目 第一小节 第二小节 第三小节 结论...
cpu的架构
明天继续搞一下cache,还有后面的, 下面是cpu框架图 开始解释cpu 1.控制器 控制器又称为控制单元(Control Unit,简称CU),下面是控制器的组成 1.指令寄存器IR:是用来存放当前正在执行的的一条指令。当一条指令需要被执行时,先按…...
FastAPI和Flask:构建RESTful API的比较分析
Python 是一种功能强大的编程语言,广泛应用于 Web 开发领域。FastAPI 和 Flask 是 Python Web 开发中最受欢迎的两个框架。本文将对 FastAPI 和 Flask 进行综合对比,探讨它们在语法和表达能力、生态系统和社区支持、性能和扩展性、开发工具和调试支持、安…...
用康虎云报表打印二维码
用康虎云报表打印二维码 1 安装: 下载地址: https://www.khcloud.net/cfprint_download, 选择Odoo免代码报表模块和自定义SQL报表模块 下载下来后解压缩,一共有四个模块 cf_report_designer # 报表设计模块 cf_sale_print_ext # 演示模块 cf_sql_report cfprint …...
网盘直链下载助手
一、插件介绍 1.介绍 这是一款免费开源获取网盘文件真实下载地址的油猴脚本,基于 PCSAPI,支持 Windows,Mac,Linux 等多平台,支持 IDM,XDown,Aria2 等多线程下载工具,支持 JSON-RPC…...
【EI复现】售电市场环境下电力用户选择售电公司行为研究(Matlab代码实现)
💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…...
并发——何谓悲观锁与乐观锁
乐观锁对应于生活中乐观的人总是想着事情往好的方向发展,悲观锁对应于生活中悲观的人总是想着事情往坏的方向发展。这两种人各有优缺点,不能不以场景而定说一种人好于另外一种人。 悲观锁 总是假设最坏的情况,每次去拿数据的时候都认为别人会…...
【C++】模板
1.模板的概念 2.函数模板基本语法 3.未完待续。。。 https://www.bilibili.com/video/BV1et411b73Z?p169&spm_id_frompageDriver&vd_sourcefb8dcae0aee3f1aab700c21099045395...
(LeetCode 每日一题) 3442. 奇偶频次间的最大差值 I (哈希、字符串)
题目:3442. 奇偶频次间的最大差值 I 思路 :哈希,时间复杂度0(n)。 用哈希表来记录每个字符串中字符的分布情况,哈希表这里用数组即可实现。 C版本: class Solution { public:int maxDifference(string s) {int a[26]…...
Vue记事本应用实现教程
文章目录 1. 项目介绍2. 开发环境准备3. 设计应用界面4. 创建Vue实例和数据模型5. 实现记事本功能5.1 添加新记事项5.2 删除记事项5.3 清空所有记事 6. 添加样式7. 功能扩展:显示创建时间8. 功能扩展:记事项搜索9. 完整代码10. Vue知识点解析10.1 数据绑…...
Rust 异步编程
Rust 异步编程 引言 Rust 是一种系统编程语言,以其高性能、安全性以及零成本抽象而著称。在多核处理器成为主流的今天,异步编程成为了一种提高应用性能、优化资源利用的有效手段。本文将深入探讨 Rust 异步编程的核心概念、常用库以及最佳实践。 异步编程基础 什么是异步…...
DeepSeek 技术赋能无人农场协同作业:用 AI 重构农田管理 “神经网”
目录 一、引言二、DeepSeek 技术大揭秘2.1 核心架构解析2.2 关键技术剖析 三、智能农业无人农场协同作业现状3.1 发展现状概述3.2 协同作业模式介绍 四、DeepSeek 的 “农场奇妙游”4.1 数据处理与分析4.2 作物生长监测与预测4.3 病虫害防治4.4 农机协同作业调度 五、实际案例大…...
AI,如何重构理解、匹配与决策?
AI 时代,我们如何理解消费? 作者|王彬 封面|Unplash 人们通过信息理解世界。 曾几何时,PC 与移动互联网重塑了人们的购物路径:信息变得唾手可得,商品决策变得高度依赖内容。 但 AI 时代的来…...
蓝桥杯 冶炼金属
原题目链接 🔧 冶炼金属转换率推测题解 📜 原题描述 小蓝有一个神奇的炉子用于将普通金属 O O O 冶炼成为一种特殊金属 X X X。这个炉子有一个属性叫转换率 V V V,是一个正整数,表示每 V V V 个普通金属 O O O 可以冶炼出 …...
#Uniapp篇:chrome调试unapp适配
chrome调试设备----使用Android模拟机开发调试移动端页面 Chrome://inspect/#devices MuMu模拟器Edge浏览器:Android原生APP嵌入的H5页面元素定位 chrome://inspect/#devices uniapp单位适配 根路径下 postcss.config.js 需要装这些插件 “postcss”: “^8.5.…...
动态 Web 开发技术入门篇
一、HTTP 协议核心 1.1 HTTP 基础 协议全称 :HyperText Transfer Protocol(超文本传输协议) 默认端口 :HTTP 使用 80 端口,HTTPS 使用 443 端口。 请求方法 : GET :用于获取资源,…...
免费数学几何作图web平台
光锐软件免费数学工具,maths,数学制图,数学作图,几何作图,几何,AR开发,AR教育,增强现实,软件公司,XR,MR,VR,虚拟仿真,虚拟现实,混合现实,教育科技产品,职业模拟培训,高保真VR场景,结构互动课件,元宇宙http://xaglare.c…...
GO协程(Goroutine)问题总结
在使用Go语言来编写代码时,遇到的一些问题总结一下 [参考文档]:https://www.topgoer.com/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/goroutine.html 1. main()函数默认的Goroutine 场景再现: 今天在看到这个教程的时候,在自己的电…...
