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

网站开发服务协议wordpress开发用什么软件

网站开发服务协议,wordpress开发用什么软件,在线制作印章diy印章,金马国旅网站建设分析对表单自由排序#xff0c;决定哪些列显示隐藏#xff0c;能保存设置过的操作 效果图 使用页#xff0c;操作列dataIndex要设置为action#xff0c;forKey必需是唯一的 用的vue2版的antdesign vue写的样式#xff0c;想用其它的ui框架可以自行修改样式 customTable …对表单自由排序决定哪些列显示隐藏能保存设置过的操作 效果图 使用页操作列dataIndex要设置为actionforKey必需是唯一的 用的vue2版的antdesign vue写的样式想用其它的ui框架可以自行修改样式 customTable :tableHeadListtableHead customTableUpdecustomTableUpde forKeydataIndex/customTableimport customTable from ./components/customTable.vue //引入 const tableHead [{title: 序号,dataIndex: index,scopedSlots: { customRender: index },width: 60,align: center},{title: 产品图片,dataIndex: pic,scopedSlots: { customRender: pic },ellipsis: true,align: center},{title: 产品名称,dataIndex: goodsName,ellipsis: true,align: center},{title: 原价,dataIndex: oriPrice,ellipsis: true,width: 80,align: center},{title: 现价,dataIndex: price,ellipsis: true,width: 80,align: center},{title: 产品分类,dataIndex: goodsCategoryName,ellipsis: true,align: center},{title: 状态,dataIndex: publishStatusName,scopedSlots: { customRender: publishStatusName },ellipsis: true,align: center},{title: 操作,dataIndex:action,// fixed: right,scopedSlots: { customRender: action },width: 140,align: center} ]; export default {components: { customTable },data() {return {tableHeadList:[],//表单使用的头部数据}},methods:{//更新表格头部customTableUpde(e){this.tableHeadList e;},}customTable组件 templatediva-popover title v-modelcustomVisible triggerclick placementtopRighta-icon typesetting stylefont-size:20px; clickwaiClick /template slotcontentdiv classcustomBigBoxdiv :idcustomId :refcustomId v-ifheadListheadList.length0 classcustomBoxdiv v-for(item,index) in headList :keyitem[forKey] div classcustomEach v-ifitem.dataIndex ! operationa-checkboxchangecustomCheckChange($event,index) stylewidth: 20px;height: 20px;margin-right:4px;:checkeditem.ischeckedv-modelitem.ischecked /a-checkboxdiv classcustomText{{item.title}}/diva-tooltip placementtop title固定到左侧a-icon typevertical-right classcustomFixed clickaddFixed(left,index) :style{margin-left:4px,color: (item[fixedName]item[fixedName]left)?#1890ff:#777} //a-tooltipa-tooltip placementtop title固定到右侧a-icon typevertical-left classcustomFixed clickaddFixed(right,index) :style{margin-left:10px,color: (item[fixedName]item[fixedName]right)?#1890ff:#777} //a-tooltip/div/div/divdiv classcustomNodata v-else暂无数据/div/divdiv classcustomActiona-button clickreset stylemargin-right: 16px;重置/a-buttona-button typeprimary clicksave保存/a-button/div/template/a-popover/div /templatescript//拖拽插件,官网https://sortablejs.com/import Sortable from sortablejsexport default{data(){return {customVisible:false,headList:[],//数据el:null,//列表元素}},props:{//组件idcustomId:{type:String,default:customCustomTable},//指定的key字段forKey:{type:String,default:dataIndex},//表头数据tableHeadList:{type:Array,default:[]},//表头数据缓存IDcustomCacheId:{type:String,default:customCustomTable},//左右固定属性名fixedName:{type:String,default:fixed},//操作列对应的名字operation:{type:String,default:action}},mounted(){ let data JSON.parse(JSON.stringify(this.tableHeadList));this.dealList(data);this.$nextTick(() {this.initDrag()this.watchList()})},methods:{//重置reset(){window.localStorage.removeItem(this.customCacheId)let data JSON.parse(JSON.stringify(this.tableHeadList))this.dealList(data)this.$message.success(重置成功)this.customVisible false;},//保存save(){//加个排序this.headList.map((res,index) {res.issort index1;})window.localStorage.setItem(this.customCacheId,JSON.stringify(this.headList))console.log(保存,this.headList)this.$message.success(保存成功)this.customVisible false;},//处理初始化数据dealList(e){const that this;let old window.localStorage.getItem(this.customCacheId);if(old){//有旧数据新旧合并保留旧数据的操作let newlist [];let oldlist JSON.parse(old);console.log(拿取,oldlist)e.map(res {let resul oldlist.filter(ve ve[that.forKey] res[that.forKey]);if(resulresul.length0){let currentobj res;currentobj.issort resul[0].issort;currentobj.ischecked resul[0].ischecked;currentobj[that.fixedName] resul[0][that.fixedName];newlist.push(currentobj)}else{res.issort 9999;res.ischecked true;if(!res[that.fixedName]){res[that.fixedName] ;}newlist.push(res)}})//排序let sortlist newlist.sort((a,b) {let value1 a[issort];let value2 b[issort];return value1 - value2;})this.headList sortlist;}else{e.map(res {res.issort 9999;res.ischecked true;if(!res[that.fixedName]){res[that.fixedName] ;}})this.headList e;}this.outputData()},//重新初始化拖拽waiClick(){if(!this.el){setTimeout(() {this.$nextTick(() {this.initDrag()})},100)}},//初始化拖拽initDrag(){const that this;const el document.getElementById(this.customId);if(el){this.el el;// 创建拖拽实例new Sortable(el, {group:this.customIdgroup,animation: 150,sort: true,onEnd: (e) {//拖拽回调that.dealDragList(e.newIndex,e.oldIndex)}});}},//监听数据变化watchList(){this.unwatch this.$watch(tableHeadList,function(newlist,oldlist){let data JSON.parse(JSON.stringify(newlist));this.dealList(data)},{deep:true //深度监听})},//处理拖拽后的数据dealDragList(newIndex,oldIndex){if(newIndex oldIndex)return;let data JSON.parse(JSON.stringify(this.headList));const currentRow data[oldIndex];data.splice(oldIndex, 1);//删除原位置数据data.splice(newIndex, 0, currentRow); this.headList data;this.outputData()},//选择customCheckChange(e,index){this.headList[index].ischecked e.target.checked;this.outputData()},//固定项addFixed(e,index){if(e left){if(!this.headList[index][this.fixedName] || this.headList[index][this.fixedName] right){this.headList[index][this.fixedName] left;}else{this.headList[index][this.fixedName] ;}}else{if(!this.headList[index][this.fixedName] || this.headList[index][this.fixedName] left){this.headList[index][this.fixedName] right;}else{this.headList[index][this.fixedName] ;}}this.outputData()},//输出数据outputData(e){let data JSON.parse(JSON.stringify(this.headList));//将符合要求的返回let newdata data.filter(res res.ischecked);this.$emit(customTableUpde,newdata)console.log(新返回的数组,data)},},beforeDestroy(){//移除监听if(this.unwatch){this.unwatch()}}} /scriptstyle scoped .customBigBox{width:270px; } .customBox{width:100%;height: 280px;overflow-y: scroll;background-color: #fff;border-radius: 6px;padding-right: 5px;box-sizing: border-box; } .customEach{width: 100%;height: 34px;user-select: none;list-style-type: none;color: #333;padding-left: 10px;font-size: 14px;display: flex;justify-content: space-between;align-items: center;background-color: #fff; } .customText{flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; } .customText:hover{color: #1890ff; } .customFixed{font-size: 16px; } .customFixed:hover{color: #1890ff; } .customAction{width: 100%;height: 60px;display: flex;justify-content: flex-end;align-items: center;padding: 5px 14px;box-sizing: border-box; } .customNodata{width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;font-size: 14px;color: #999; } /style
http://www.pierceye.com/news/69605/

相关文章:

  • 浙江省建设厅网站证件西安网站建设案例
  • 广州旅游团购网站建设北京工程工程建设交易信息网站
  • 模板网站的优缺点辽宁招标网
  • 建设项目环保竣工验收备案网站网站建设公司活动
  • 好的app设计网站有哪些人力资源管理师
  • iis7.0配置网站广东石油化工建设集团公司网站
  • 长春建网站公司如何做小程序推广
  • 服务类网站建设网络维护工作
  • 网站设置为默认主页全中文软件开发工具
  • gif网站素材互联网怎么学
  • 公司网站内容相近网站怎么做防御
  • 浦项建设公司员工网站茂名做网站公司
  • 茂名营销型网站建设东莞网站网络公司
  • 网站网页设计公司有哪些网站建设与维护税率
  • 乌市地区建设工程门户网站软环境建设办公室网站
  • 能打开网站的浏览器网站开发建模工具
  • 广东外贸网站建设wordpress页面定制器
  • 淘宝做网站中国机械采购网
  • 成都h5建站hao123网址下载到桌面
  • 查看网站开发做网站还要维护吗
  • 建立一个个人网站少女免费观看片tv
  • 英文网站推广公司宁波建网站一站式服务
  • app电商网站尚仁网站建设
  • 做网站要买什么类型云空间专业的专业的网页制作公司
  • 免费设计网站素材网站开发及app开发公司
  • 7天精通网站建设实录简介242企业邮箱服务
  • 北京燕华工程建设有限公司网站网站建设中 即将上线html5源代码
  • 什么网站做产品销售做的好网站建设较好的公司
  • wordpress用什么主题电商网站商品页的优化目标是什么?
  • 北京的网站建设收费标准展会展厅设计制作公司