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

网站服务器网页布局类型

网站服务器,网页布局类型,找人做网站去哪里找,免费网站空间 - 百度uniapp页面一般都会有像以下的列表页面#xff0c;封装通用组件#xff0c;提高开发效率#xff1b; #xff08;基于uView前端框架#xff09; 首先#xff0c;通过设计图来分析一下页面展示和数据结构定义 w-table组件参数说明 参数说明类型可选值默认值toggle列表是…uniapp页面一般都会有像以下的列表页面封装通用组件提高开发效率 基于uView前端框架 首先通过设计图来分析一下页面展示和数据结构定义 w-table组件参数说明 参数说明类型可选值默认值toggle列表是否带更多和收起功能toggle值为true时配合prop-list中定义的show字段使用show值为true时收起情况下默认展示的列false则默认不展示点击更多展开时展示toggle值为false时prop-list中定义的show值无效表示全部默认展示不需要展开收缩功能booleantrue|falsetrueprop-list定义的字段和列标题数组对应PC端封装表格组件内容格式一致例[{label:‘废物名称’,prop:‘name’},{label:‘数字识别码’,prop:‘code’}]array–[]table-data后台返回数据数组array–[] prop-list具体参数说明 参数说明类型可选值默认值label列的标题名称如图废物名称string––prop字段名array–[]show列表收起时默认展示toggle为true时生效stringtrue|falsefalseformatItem整体列插槽例如上图俩个状态按钮列不展示左边标题名称则需要整体插槽实现booleantrue|falsefalseformatValue值插槽例如返回值需要加单位格式化等情况formatItem为true时此属性不生效booleantrue|falsefalse propList数据格式 propList:[{label:废物名称,prop:title,show:true},{label:数字识别码,prop:name,show:true},{label:危废标识,prop:tag,show:true},{label:废物代码,prop:code,show:true},{label:废物重量,prop:weight,formatValue:true,show:true},//格式化值{label:废物形态,prop:name},{label:主要成分,prop:name},{label:有害成分,prop:name},{label:危险特性,prop:name},{label:注意事项,prop:name},{label:产生/收集单位,prop:comp},{label:联系人,prop:userName},{label:联系方式,prop:phone},{label:产生日期,prop:date},{label:备注,prop:remark},{label:状态,prop:status,formatItem:true,show:true},//格式化列默认展示{label:二维码,prop:qrcode,formatItem:true,show:false}//格式化列默认不展示 ]tableData数据格式 tableData:[{title:HWCS20230908003,time:2023-09-18 14:00,name:废物名称,code:1234567890123456789000030420230915101,tag:7b9e9d22ca714365a1f6a6b338fc8fa3,code1:900-041-49,weight:30,unit:kg,wasteStatus:1,reportStatus:0, }]具体代码 基础用法 w-table :table-datatableData :prop-listpropList :toggletrue/w-table有格式化值和列的情况 w-table :table-datatableData :prop-listpropList :toggletruetemplate slotheader slot-scopescopeview classwidth w-flex row row-between borderB padding16view classflex1 w-flex rowtext classfs24 c-blue fwBold marginR10 flex-none {{scope.index 10 ?0(scope.index1):scope.index1}} /texttext classflex1 text-overflow c-text fs16{{scope.row.title}}/text/viewtext classmarginLR10 flex-none{{scope.row.time}}/text/view/templatetemplate slotweight slot-scopescopespan{{scope.row.weight}}{{scope.row.unit}}/span/templatetemplate slotstatus slot-scopescopeview classw-flex row row-between paddingLR30 paddingTB10u-tag text待入库 modeplain/view v-ifscope.row.status 0 class stylecolor:#FF7D00u-icon nameclock/u-icontext classmarginL10未上报/text/viewview v-else class stylecolor:#00B42Au-icon namecheckbox-mark/u-icontext classmarginL10已上报/text/view/view/template!-- 二维码 --template slotqrcode slot-scopescopeview classw-flex img classwidth160 height160 src/static/img/qrcode.png alt/view/template/w-tablew-table组件源码 templateview classwidth w-tableviewv-iftableData.length 0classw-flex col item-list marginB20 marginLR20 radius8 relativev-for(item, index) in tableData:keyindexslot nameheader :rowitem :indexindex/slotview classwidth w-flex col paddingT15!-- u-read-more classwidth :toggletrue closeText更多 :showHeightshowHeight color#4E5969 --u-cell-grouptemplate v-for(cellItem,i) in propListtemplate v-if!cellItem.formatItem!-- 默认展示 show为true时 或者 不需要折叠时执行展示列 --view classdefault-show v-ifcellItem.show || !toggleu-cell-item :titlecellItem.label :keyi :arrowfalseslot v-iftypeof cellItem.formatValue boolean ? cellItem.formatValue : false:rowitem :namecellItem.prop :indexindex/slottext v-else{{$util.formatTextEmpty(item[cellItem.prop])}}/text/u-cell-item/view!-- 默认不展示 --view classdefault-notshow v-if!cellItem.show item.isShowu-cell-item :titlecellItem.label :keyi :arrowfalseslot v-iftypeof cellItem.formatValue boolean ? cellItem.formatValue : false:rowitem :namecellItem.prop :indexindex/slottext v-else{{$util.formatTextEmpty(item[cellItem.prop])}}/text/u-cell-item/view/templatetemplate v-ifcellItem.formatItem!-- 整体插槽列默认展示 --slot v-ifcellItem.show :namecellItem.prop :rowitem :indexindex/slot!-- 整体插槽列默认不展示 并且 列表展开时展示 --slot v-if!cellItem.show item.isShow :namecellItem.prop :rowitem :indexindex/slot/template/templateview v-showtoggle classwidth padding20 textCenterspan v-show!item.isShow clicktoggleCell(index,true)更多u-icon namearrow-down classmarginL5/u-icon/spanspan v-showitem.isShow clicktoggleCell(index,false)收起u-icon namearrow-up classmarginL5/u-icon/span/view/u-cell-group!-- /u-read-more --/view/view/view /templatescriptexport default{props:{tableData:{default:[],type:Array,},propList:{default:[],type:Array,},showHeight:{default:500,type:Number,},toggle:{default:true,type:Boolean,}},data(){return{}},mounted(){if(this.toggle){// 可以展开收起时给表格默认增加isShow属性this.tableData.forEach(item{this.$set(item,isShow,!this.toggle)})}else{// 不需要收缩功能时每一列数据默认是true即展示// 也就是toggle为false时propList设置show属性无效均为truethis.propList.forEach(item{this.$set(item,show,!this.toggle)})}},methods:{toggleCell(i,value){this.$set(this.tableData[i],isShow,value)}}} /scriptstyle langscss scoped::v-deep.u-cell{align-items: flex-start;}::v-deep.u-cell-box{text-indent: initial;}::v-deep.w-table .u-content__showmore-wrap{background-image:none !important;}::v-deep.w-table .u-cell_title{width: 90px !important;flex: none;font-size: 13px !important;}::v-deep.w-table .u-cell__value{text-align: left !important;overflow-wrap: break-word;} /style
http://www.pierceye.com/news/517076/

相关文章:

  • 建立自我追求无我什么意思广州网站优化推广
  • 公司介绍网站怎么做的苏州网页制作招聘
  • 天长网站建设黄骅市长
  • 深圳网站维护页面设计WordPress在线留言插件
  • 网站改版的几个建议夜夜夜在线观看
  • 网站开发和 app开发的区别百度推广管家
  • 门窗网站制作宣传语建设一个商城式网站可以吗
  • 网站优化推广公司北京软件开发公司滕迎江
  • 网站建立的连接不安全怎么解决网站如何做数据库
  • 营销型制作网站公司重庆蒲公英网站建设公司
  • 官方网站找工作公众号中国航发网上采购平台
  • 大连网站制作仟亿科技个人网站建站步骤
  • 网站php文件上传成都网站搜索排名优化哪家好
  • 南京做网站费用做网站的服务器配置
  • 外贸用什么平台自建站较好门户网站盈利
  • 外包兼职做图的网站做视频网站用哪个模板
  • 全球购物网站大全百度网盟推广官方网站
  • 计算机网站维护建设深圳外网站建设
  • 贵州公明建设投资咨询有限公司官方网站小说网站开发对影成三人小说
  • 软件分享网站不一样的婚恋网站怎么做
  • 如何维护给做网站的客户公司变更名称和经营范围
  • 网站建设维护php建站最好的公司排名
  • 济南1951年建站wordpress 描述
  • 政务网站建设信息嵊州网站制作
  • 我的网站突然找不到网页了seo是啥意思
  • 黑河做网站的公司平面设计现在怎么样
  • 银川网站建站中国建设银行人力资源网站
  • 建设部考试中心网站用自己的ip怎么查看dw8建设的网站
  • 九江网站建设九江商标设计网页
  • 网站建设资格预审公告附近广告设计与制作门店电话