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

容县网站开发上海装修网站大全

容县网站开发,上海装修网站大全,成华区响应式网站建设,省规划建设发展局网站首页组件用于创建和编辑复杂的条件规则#xff0c;支持添加、删除条件和子条件#xff0c;以及选择不同的条件类型。 可实现json数据和页面显示的转换。 代码实现 #xff1a; index.vue: templatediv classallany-containerdiv classco…组件用于创建和编辑复杂的条件规则支持添加、删除条件和子条件以及选择不同的条件类型。 可实现json数据和页面显示的转换。 代码实现 index.vue: templatediv classallany-containerdiv classcontrol-barel-select v-modelpipe.condition stylewidth: 200px; margin-right: 16px; :disableddisabledel-option label满足以下所有条件 valueall/el-option label满足以下任一条件 valueany/el-option label不包含以下条件 valuenot//el-selectel-button v-if!disabled typeprimary clickaddCondition(condition)添加条件/el-buttonel-button v-if!disabled typesuccess clickaddCondition(all_any)添加子条件/el-buttonel-button v-if !disabled typedanger :iconDelete circle clickdelSelf//divdiv classconditions-wrapper!-- 侧边显示条 --div :classconditions-wrapper-${pipe.condition}/divdiv classconditions-wrapper--conditionsdiv v-for(child, idx) in pipe.children :keyidx classconditions-wrapper--conditionbiz-rule-all-any v-ifchild.type all_any :pipechild :attrOptionsattrOptions:disableddisabled delRulehandleDelRule(idx,child)/biz-rule-condition v-else-ifchild.type condition :pipechild :attrOptionsattrOptions:disableddisabled delRulehandleDelCondition(idx,child)//div/div/div/div /templatescript setup import {ref, watch} from vue; import BizRuleCondition from ./BizRuleCondition.vue; import {Delete} from element-plus/icons-vue; import {deepClone} from /utils.js;defineOptions({name: BizRuleAllAny })const emit defineEmits([delRule]);const props defineProps({pipe: {type: Object,default: () ({type: all_any,condition: all,children: [],})},attrOptions: {type: Array,default: () {return []}},disabled: {type: Boolean,default: false} }); const pipe ref(props.pipe);function addCondition(type) {if (type all_any) {pipe.value.children.push({type: all_any,condition: all,children: [],});} else if (type condition) {pipe.value.children.push({type: condition,name: ,operator: eq,value: ,val_type: string,});} }function delSelf() {emit(delRule) }// 删除条件组 const handleDelRule (idx,child) {pipe.value.children.splice(idx, 1); }// 删除条件组中的子数据 const handleDelCondition (idx,child) {pipe.value.children.splice(idx, 1); }/scriptstyle scoped langscss.allany-container {.control-bar {display: flex;flex-direction: row;}.conditions-wrapper {display: flex;flex-direction: row;}.conditions-wrapper-all {width: 4px;margin: 5px 20px 0;border-radius: 5px;transition: background-color 400ms;background-color: #67C23A;:hover {background-color: #529b2e;}}.conditions-wrapper-any {width: 4px;margin: 5px 20px 0;border-radius: 5px;transition: background-color 400ms;background-color: #E6A23C;:hover {background-color: #b88230;}}.conditions-wrapper-not {width: 4px;margin: 5px 20px 0;border-radius: 5px;transition: background-color 400ms;background-color: rgb(245, 245, 245);:hover {background-color: rgb(144, 147, 153);}}.conditions-wrapper--conditions {display: flex;flex-direction: column;}.conditions-wrapper--condition {padding-top: 15px;} }/styleBizRuleCondition.vue: templatediv classbizrulecondition-containerel-select v-modelpipe.name placeholder字段名称 stylewidth: 150px; margin-right: 16px; clearable :disableddisabledel-option v-foritem in attrOptions :keyitem.value :labelitem.label :valueitem.value//el-selectel-select v-modelpipe.operator stylewidth: 90px; margin-right: 16px; :disableddisabledel-option label valueeq/el-option label! valueneq/el-option label valuelt/el-option label valuegt/el-option label valuelte/el-option label valuegte/el-option labelin valuein/el-option labelnot in valuenot_in//el-selectel-badge:valuepipe.val_type string ? 字符串 : 数字:typepipe.val_type string ? info : successclick.nativeswitchVarType($event, pipe)stylemargin-right: 50px;:disableddisabledel-inputv-modelpipe.valueplaceholder字段值stylewidth: 150px;clearable:disableddisabled//el-badgeel-button typedanger :iconDelete circle clickdelSelf :disableddisabled//div /templatescript setup import {ref, defineProps, watch} from vue; import {Delete} from element-plus/icons-vue; import {deepClone} from /utils.js;const emit defineEmits([delRule]);const props defineProps({pipe: Object,attrOptions:Array,disabled:Boolean }); const pipe ref({});watch(() props.pipe, (newData) {if (!newData) returnpipe.value deepClone(newData) }, {deep: true,immediate: true })function switchVarType(e, kv) {if (String(e.target.tagName).toUpperCase() SUP) {kv.val_type kv.val_type number ? string : number;} }function delSelf() {emit(delRule) } /scriptstyle langscss scoped .bizrulecondition-container {display: flex;flex-direction: row;.el-badge__content {transition: 400ms;user-select: none;}.el-badge__content:hover {cursor: pointer;} } /styleBizRuleAdapter.js: templatediv classbizrulecondition-containerel-select v-modelpipe.name placeholder字段名称 stylewidth: 150px; margin-right: 16px; clearable :disableddisabledel-option v-foritem in attrOptions :keyitem.value :labelitem.label :valueitem.value//el-selectel-select v-modelpipe.operator stylewidth: 90px; margin-right: 16px; :disableddisabledel-option label valueeq/el-option label! valueneq/el-option label valuelt/el-option label valuegt/el-option label valuelte/el-option label valuegte/el-option labelin valuein/el-option labelnot in valuenot_in//el-selectel-badge:valuepipe.val_type string ? 字符串 : 数字:typepipe.val_type string ? info : successclick.nativeswitchVarType($event, pipe)stylemargin-right: 50px;:disableddisabledel-inputv-modelpipe.valueplaceholder字段值stylewidth: 150px;clearable:disableddisabled//el-badgeel-button typedanger :iconDelete circle clickdelSelf :disableddisabled//div /templatescript setup import {ref, defineProps, watch} from vue; import {Delete} from element-plus/icons-vue; import {deepClone} from /utils.js;const emit defineEmits([delRule]);const props defineProps({pipe: Object,attrOptions:Array,disabled:Boolean }); const pipe ref({});watch(() props.pipe, (newData) {if (!newData) returnpipe.value deepClone(newData) }, {deep: true,immediate: true })function switchVarType(e, kv) {if (String(e.target.tagName).toUpperCase() SUP) {kv.val_type kv.val_type number ? string : number;} }function delSelf() {emit(delRule) } /scriptstyle langscss scoped .bizrulecondition-container {display: flex;flex-direction: row;.el-badge__content {transition: 400ms;user-select: none;}.el-badge__content:hover {cursor: pointer;} } /style
http://www.yayakq.cn/news/1429/

相关文章:

  • 微企免费网站建设微信h5的制作方法
  • 免得做网站智能建设网站
  • 循化网站建设公司济宁建设工程信息网站
  • 网站建设及 维护电子产品外贸交易平台
  • 微网站免费开发平台手机优化助手怎么删除
  • 北京网站建设公司司文创产品设计作品欣赏
  • 网站撤销备案个人怎么注册公司需要多少钱
  • 网站专题页面设计欣赏wordpress网站如何app
  • 自己做的视频可以传别的网站去吗广州商务网站建设电话
  • 提供网站建设服务菜谱分享网站开发开题报告
  • 怎么制作网站布局erp软件开发
  • 外国做袜子的网站ueditor wordpress 4.5
  • HTML怎么做网站目录青岛做网站价格
  • 哪个市文化和旅游网站做的好大网站
  • 查询网站中国摄影展览网首页
  • 外贸网站建设 广州企业网站的域名是该企业的
  • 响水哪家专业做网站怎样查网站的注册地点
  • 企业做网站公司怎么样天琥设计培训学校官网
  • 芒市网站建设公司青岛有没有做网站的
  • 做网站文字编辑累吗用源码做自己的网站
  • 网站建设风景课程设计报告深圳网站设计比较好的公司有哪些
  • 网站页面优化分析网站代理浏览器一
  • 企业网站建站系统网站宣传需要多少钱
  • 做h5页面网站有哪些域名多少钱一年
  • 深圳中高端网站建设怎么样网站建设服务器 几核
  • 腾讯云域名备案需要提供网站建设方案书怎么建立一个公众号
  • 网站建设公司哪家好智搜宝微信公众号被收费299
  • 可信赖的扬中网站建设江苏缘生源建设工程有限公司网站
  • 没有虚拟主机怎么建网站专业优定软件网站建设
  • 怎么做公司销售网站wordpress添加幻灯片