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

网站前台怎么做做网站能自己找服务器吗

网站前台怎么做,做网站能自己找服务器吗,内蒙古建设安全监督网站,沈阳网站建设seo优化Vue3 Element-Plus 使用 Table 插槽时数据未及时更新 问题重现解决方法最终效果 问题重现 这里我已经通过二级分类 id 查询到一级分类和二级分类#xff0c;但是使用插槽和 v-for 渲染出来还是之前的分类 id#xff0c;但是一点击表格或者保存代码他又能正常刷新出来。 … Vue3 Element-Plus 使用 Table 插槽时数据未及时更新 问题重现解决方法最终效果 问题重现 这里我已经通过二级分类 id 查询到一级分类和二级分类但是使用插槽和 v-for 渲染出来还是之前的分类 id但是一点击表格或者保存代码他又能正常刷新出来。 templateel-table :heighttableHeight :datatableList border stripeel-table-column propgoodsDesc label商品简介 aligncenter/el-table-columnel-table-column propcategoryId label分类 aligncentertemplate #defaultscope styledisplay: flex;el-tag stylemargin-left: 10px; typesuccess effectdark v-for(item, index) in scope.row.categoryId :keyindex{{ item }}/el-tag/template/el-table-column/el-table /templatescript setup langts import { onMounted, ref } from vue; // 表格数据 const tableList ref([]); // 列表查询 const getList async () {let res await getGoodsListApi(searchParm, 0);if (res res.code 200) {// 获取出图片和视频列表res.data.records.forEach((goods: any) {// 分割 image 属性得到图片和视频链接数组// 通过二级分类标签获取整个分类类别let res getGoodsTypeBySonIdApi(goods.categoryId);res.then((value) {goods.categoryId value.data;});const imageArray goods.image.split(,);// 判断每个链接的类型并添加对应的属性imageArray.forEach((url: String) {if (url.endsWith(.png) || url.endsWith(.jpg) || url.endsWith(.jpeg)) {// 图片链接if (!goods.images) {goods.images [];}goods.images.push(url);} else if (url.endsWith(.mp4) || url.endsWith(.avi) || url.endsWith(.mov)) {// 视频链接if (!goods.videos) {goods.videos [];}goods.videos.push(url);}});// 删除原始的 image 属性delete goods.image;});tableList.value res.data.records;searchParm.total res.data.total;} } onMounted(() {tableHeight.value window.innerHeight - 200;getList(); }) 处理后的数据示例 [{goodsId: 3,userId: 7,orderId: null,categoryId: [数码,电脑],type: 0,goodsName: null,goodsDesc: 这是二条测试数据,goodsOldPrice: 200,goodsNewPrice: 100,isNew: null,tradingType: 邮寄,findType: QQ,findValue: 13036497562,wxNum: 0,status: 1,sellStatus: null,createTime: 2024-04-14,sellTime: null,address: 北京市东城区东华门街道锡拉胡同北京利生体育商厦, 39.916405, 116.410243,deleteStatus: 0,userById: 0,images: [],videos: []},{goodsId: 1,userId: 7,orderId: null,categoryId: [数码,电脑],type: 0,goodsName: null,goodsDesc: 这是一条测试数据,goodsOldPrice: 200,goodsNewPrice: 100,isNew: null,tradingType: 面交,findType: 手机号,findValue: 13036497562,wxNum: 0,status: 1,sellStatus: null,createTime: 2024-04-14,sellTime: null,address: 北京市东城区东华门街道锡拉胡同北京利生体育商厦, 39.916405, 116.410243,deleteStatus: null,userById: 0,images: [],videos: []} ]解决方法 通过二级分类标签获取整个分类类别 不与 获取出图片和视频列表操作 同时进行 // 列表查询 const getList async () {let res await getGoodsListApi(searchParm, 0);if (res res.code 200) {// 获取出图片和视频列表res.data.records.forEach((goods: any) {// 分割 image 属性得到图片和视频链接数组const imageArray goods.image.split(,);// 判断每个链接的类型并添加对应的属性imageArray.forEach((url: String) {if (url.endsWith(.png) || url.endsWith(.jpg) || url.endsWith(.jpeg)) {// 图片链接if (!goods.images) {goods.images [];}goods.images.push(url);} else if (url.endsWith(.mp4) || url.endsWith(.avi) || url.endsWith(.mov)) {// 视频链接if (!goods.videos) {goods.videos [];}goods.videos.push(url);}});// 删除原始的 image 属性delete goods.image;});tableList.value res.data.records;searchParm.total res.data.total;getAllType();} }// 通过二级分类标签获取整个分类类别 const getAllType () {tableList.value.forEach((goods: any) {// 通过二级分类标签获取整个分类类别let res getGoodsTypeBySonIdApi(goods.categoryId);res.then((value) {goods.categoryId value.data; });}) }最终效果
http://www.hkea.cn/news/14408188/

相关文章:

  • 整站优化价格河北建设工程信息网换成什么网址了
  • 做网站推广工作赚钱吗wordpress使用文档
  • 为什么辽宁省城乡建设厅网站打不开网站源码制作
  • 做网站广告语网站开通宣传怎么写
  • 企业网站icp备案与网站建设关系密切的知识点
  • 我想注册网站怎么做泉州网站建设费用
  • 高流量网站设计在线广告设计与制作
  • 做搜狗网站优化首wordpress页面显示错乱
  • 江苏个人网站备案要求建设网站 目标
  • 重庆建设人才网站建设一个网站的流程
  • ru如何制作网站wordpress中英文标题
  • 营销网站结构西安小程序搭建
  • 营口市住房建设保障办官方网站企业网站建设 cms
  • 廊坊建设网站智慧餐厅管理系统
  • 某网站seo诊断分析赣州企业网站建设
  • 做网站要学的知识wordpress邮件发文章
  • 哈尔滨网站关键字优化选择建设网站公司要注意什么
  • 外贸网站如何推广优化白云区pc端网站建设
  • 网站设计评级网络游戏排行榜2020
  • 做网站的公司现在还 赚钱吗wordpress安装与使用说明
  • 成都 高端网站建设网站推广的目的是什么
  • 微信公众号私自建设电影网站秦皇岛市属于哪个省份
  • 网站如何做百度实名认证宜春建设局网站
  • 用凡科做的网站怎么下载个人社保缴费基数怎么算
  • 怎么制作个人作品网站小程序商城的好处
  • 咖啡网站设计模板wordpress大前端下载
  • 广州公司网站软件开发工程师发展前景
  • 网站建设必须在服务器网站开发项目架构
  • 万网网站空间服务范围网站优化标题
  • 做的比较好旅游网站建筑企业公司