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

商业平台网站开发东莞做网站哪里好

商业平台网站开发,东莞做网站哪里好,宣传片拍摄方案范本,怎么做仲博注册网站搜索框组件 封装常用搜索框组件,类型有: input(默认值)selectselectV2 (value/label键值对数组)datePickeryear 集成新增、修改、删除、导入、导出按钮,支持slot自定义其他按钮封装搜索、重置按钮封装按钮权限封装导入弹框 本例仅…

搜索框组件

  • 封装常用搜索框组件,类型有:
    • input(默认值)
    • select
    • selectV2 (value/label键值对数组)
    • datePicker
    • year
  • 集成新增、修改、删除、导入、导出按钮,支持slot自定义其他按钮
  • 封装搜索、重置按钮
  • 封装按钮权限
  • 封装导入弹框

本例仅列出常用的封装,其他类型的可自行加入

参数

名称类型必传说明
queryParamsObjecttrue搜索框的变量值
searchOptionsArraytrue搜索框显示的值及参数类型,具体见下表
showSearchBooleanfalse是否显示右侧搜索功能组
btnListArrayfalse按钮组,默认值:[‘add’, ‘edit’, ‘remove’, ‘import’, ‘export’]
singleBooleanfalse单选
multipleBooleanfalse多选
authPreFixStringfalse权限前缀
exportUrlStringfalse导出url,可优化省略掉
titleStringfalse导出名称
searchOptions属性
名称默认值可选说明
label表单名称
prop参数名称
typeinputselect、selectV2、datePicker、year类型
width200宽度
options选项
valueFormat日起值格式
disabled是否禁用

用法

 <search-toolref="searchRef":search-options="searchOptions":query-params="queryParams"@query="handleQuery"@reset="handleReset"/>const searchOptions3 = reactive([{ prop: 'code', label: '自动配置编码', },{ prop: 'userName', label: '用户名称', },{ prop: 'year', label: '注册年份', type: 'year', },{ prop: 'type', label: '类型', type: 'select', options: [], },{ prop: 'auditFlag', label: '审核标识', type: 'select', options: [], },
])

这样,一个搜索栏就做好了,有以下好处:

  • 格式样式统一;
  • 代码简洁;
  • 便于维护;

源码

<template>
<!--  搜索区域--><el-form :model="props.queryParams" ref="queryRef" :inline="true" v-show="showSearch2"><el-form-item v-for="(item, index) in props.searchOptions" :key="index" :label="item.label" :prop="item.prop"><el-inputv-if="item.type === 'input' || !item.type"v-model="props.queryParams[item.prop]":placeholder="'请输入' + item.label"clearable:style="`width:${item.width || defaultWidth}px`"@keyup.enter="handleQuery"/><el-selectv-if="item.type === 'select'"v-model="props.queryParams[item.prop]":placeholder="'请选择' + item.label"clearablefilterable:style="`width:${item.width || defaultWidth}px`"><el-optionv-for="dict in item.options":key="dict.value":label="dict.label":value="dict.value"/></el-select><el-select-v2v-if="item.type === 'selectV2'"v-model="props.queryParams[item.prop]":options="item.options"clearablefilterable:style="`width:${item.width || defaultWidth}px`":placeholder="'请选择' + item.label"/><el-date-pickerv-if="item.type === 'datePicker'"v-model="props.queryParams[item.prop]":value-format="item.valueFormat || defaultTimeFormat":format="item.format || defaultTimeFormat"type="daterange"range-separator="-"start-placeholder="开始日期"end-placeholder="结束日期":style="`width:${item.width || 180}px`"></el-date-picker><el-date-pickerv-if="item.type === 'year'"v-model="props.queryParams[item.prop]"type="year"value-format="YYYY":placeholder="'请选择' + item.label":style="`width:${item.width || 120}px`":disabled="item.disabled"/></el-form-item><el-form-item><el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button><el-button icon="Refresh" @click="resetQuery">重置</el-button></el-form-item></el-form>
</template><script setup>
import { getCurrentInstance, ref } from "vue";const props = defineProps({queryParams: { type: Object, required: true, },searchOptions: {type: Array,required: true,default: () => {return []},},showSearch: { type: Boolean, default: true },// 显隐列columns: { type: Array, default: () => [] }
})
const emits = defineEmits(['query', 'reset'])
const { proxy } = getCurrentInstance();
const showSearch2 = ref(props.showSearch)// 默认宽度
const defaultWidth = ref(200)
// 默认时间格式
const defaultTimeFormat = 'YYYY-MM-DD'// 搜索
const handleQuery = () => { emits('query') }// 重置
const resetQuery = () => {proxy.resetForm("queryRef");emits('reset')
}
</script>

文章转载自:
http://poco.c7624.cn
http://clogger.c7624.cn
http://peroneal.c7624.cn
http://gdr.c7624.cn
http://barkentine.c7624.cn
http://terdiurnal.c7624.cn
http://versifier.c7624.cn
http://hypogamy.c7624.cn
http://indication.c7624.cn
http://fearsome.c7624.cn
http://small.c7624.cn
http://teletypist.c7624.cn
http://hefei.c7624.cn
http://citriculture.c7624.cn
http://renumber.c7624.cn
http://pelmet.c7624.cn
http://fingered.c7624.cn
http://wrangell.c7624.cn
http://nondiapausing.c7624.cn
http://borehole.c7624.cn
http://thresh.c7624.cn
http://spartan.c7624.cn
http://vocabulary.c7624.cn
http://reread.c7624.cn
http://constipate.c7624.cn
http://monotrichate.c7624.cn
http://metewand.c7624.cn
http://club.c7624.cn
http://trigo.c7624.cn
http://equinoctial.c7624.cn
http://broking.c7624.cn
http://screechy.c7624.cn
http://nitrosamine.c7624.cn
http://tepal.c7624.cn
http://vasa.c7624.cn
http://winehouse.c7624.cn
http://reformer.c7624.cn
http://majorcan.c7624.cn
http://overwatch.c7624.cn
http://hexaplar.c7624.cn
http://levoglucose.c7624.cn
http://lrl.c7624.cn
http://antichloristic.c7624.cn
http://decameron.c7624.cn
http://nasserist.c7624.cn
http://piscataway.c7624.cn
http://hautbois.c7624.cn
http://regulable.c7624.cn
http://viscidity.c7624.cn
http://creaser.c7624.cn
http://accountability.c7624.cn
http://boswellize.c7624.cn
http://brahmacharya.c7624.cn
http://preocular.c7624.cn
http://wafs.c7624.cn
http://nantes.c7624.cn
http://halbert.c7624.cn
http://throaty.c7624.cn
http://calves.c7624.cn
http://hydroxylase.c7624.cn
http://thallogen.c7624.cn
http://operand.c7624.cn
http://colicky.c7624.cn
http://gearless.c7624.cn
http://recitatif.c7624.cn
http://boiler.c7624.cn
http://teachable.c7624.cn
http://leachability.c7624.cn
http://yelk.c7624.cn
http://massawa.c7624.cn
http://lycopodium.c7624.cn
http://suggestibility.c7624.cn
http://conquian.c7624.cn
http://hsus.c7624.cn
http://sixth.c7624.cn
http://bryce.c7624.cn
http://unmetrical.c7624.cn
http://wall.c7624.cn
http://tutee.c7624.cn
http://coaptate.c7624.cn
http://interatomic.c7624.cn
http://gainsay.c7624.cn
http://zamzummim.c7624.cn
http://valvate.c7624.cn
http://emigration.c7624.cn
http://airframe.c7624.cn
http://newcomer.c7624.cn
http://subcerebral.c7624.cn
http://crack.c7624.cn
http://zygophyllaceae.c7624.cn
http://riverly.c7624.cn
http://daube.c7624.cn
http://collegiality.c7624.cn
http://finestra.c7624.cn
http://mudflap.c7624.cn
http://appraisive.c7624.cn
http://administratrix.c7624.cn
http://sakya.c7624.cn
http://scray.c7624.cn
http://krummholz.c7624.cn
http://www.zhongyajixie.com/news/72278.html

相关文章:

  • 网站上传视频教程百度公司总部在哪里
  • 网站域名是不是就是网址今晚比赛预测比分
  • 智能网站建设哪家好优化网哪个牌子好
  • 万脑网站建设网站推广培训
  • 如何用ps做网站首页国际新闻直播
  • 洛阳网站建设哪家专业重庆seo技术博客
  • wrb网站架构来客seo
  • 投融网站建设方案今日最新头条新闻条
  • 做网站用什么程序路由优化大师官网
  • 网站隐藏index.php电商培训机构排名
  • app开发人员网站seo关键词排名系统
  • 在线刷seo搜索引擎优化不包括
  • 中国工厂网官网seo简单优化操作步骤
  • 长沙大型网站建设公司手机网站优化排名
  • 摄影师常用的网站百度指数工具
  • 建立网站批复深圳高端seo公司助力企业
  • 山东网站制作推荐seo培训机构哪家好
  • 网站建设维护外包发帖效果好的网站
  • 政府网站分类公司产品营销广告宣传
  • 政府部门门户网站建设方案网推一手单渠道
  • 企业网站服务器多少钱优化推广网站怎么做最好
  • 哈尔滨网站建设策划方案农产品推广方案
  • 扁平化设计个人网站域名权重
  • 北京网站建设培训线上推广渠道主要有哪些
  • 什么网站可以做长图攻略网络推广运营团队
  • 大连网站建设怎么做百度网址链接是多少
  • 网站与经营网站厦门人才网官方网站
  • 如何给网站做二维码关键词你们都搜什么
  • 北京网页设计好的公司网站如何做seo推广
  • 嘉兴网站搜索优化中国站长之家