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

免费做网站的平台网络推广方案的基本思路

免费做网站的平台,网络推广方案的基本思路,企业宣传网站案例,廊坊网站制作公司目录 1.说明 2.普通表格的实现 3.动态表格的实现 1.说明 在前端画面中,表格一般用来展示列表数据,并且可以实现分页,应用很广泛,关于表格的列信息,一般是固定的,也可以是变化的,根据后端传递…

目录

1.说明

2.普通表格的实现

3.动态表格的实现


1.说明

在前端画面中,表格一般用来展示列表数据,并且可以实现分页,应用很广泛,关于表格的列信息,一般是固定的,也可以是变化的,根据后端传递的数据及列信息进行动态展示,本文使用的是arco design前端框架,大家可以参考一下

2.普通表格的实现

arco design中表格的基本用法:需要传递 columnsdata

data是要展示的列表信息,columns是要展示的列信息。当显示的列信息是固定时,可以在画面中定义列信息数组,在数组中的对象中可以设置列的标题(title),列和data中的对应关系(dataIndex),会将dataIndex中的内容和data中对象的key进行匹配,一致时则显示数据,还是设置列宽,插槽名等。

<template><a-table :columns="columns" :data="data" />
</template><script>
import { reactive } from 'vue';export default {setup() {const columns = [{title: 'Name',dataIndex: 'name',},{title: 'Salary',dataIndex: 'salary',},{title: 'Address',dataIndex: 'address',},{title: 'Email',dataIndex: 'email',},];const data = reactive([{key: '1',name: 'Jane Doe',salary: 23000,address: '32 Park Road, London',email: 'jane.doe@example.com'}, {key: '2',name: 'Alisa Ross',salary: 25000,address: '35 Park Road, London',email: 'alisa.ross@example.com'}, {key: '3',name: 'Kevin Sandra',salary: 22000,address: '31 Park Road, London',email: 'kevin.sandra@example.com'}, {key: '4',name: 'Ed Hellen',salary: 17000,address: '42 Park Road, London',email: 'ed.hellen@example.com'}, {key: '5',name: 'William Smith',salary: 27000,address: '62 Park Road, London',email: 'william.smith@example.com'}]);return {columns,data}},
}
</script>

3.动态表格的实现

动态列表的实现也比较简单,只需要从后端设置好data和columns的内容,前端获取到信息后,将对应的信息设置到data及columns中进行显示。

例如用户有自定义显示列信息的需要。

实现方式1

前端:

template

        <a-table :data="tableData" style="margin-top: 10px" :columns="tableCol"row-key="id" :row-selection="rowSelection" v-model:selectedKeys="selectedKeys":loading="loading":virtual-list-props="{height:600}":scroll="{x:2000}":pagination="false"><template #index="{ rowIndex }">{{ rowIndex + 1 }}</template><template #operations="{ record }"><a-space :size="5"><a-button size="small" @click="edit(record)" status="success" v-if="openType == '2002'">修改</a-button></a-space></template></a-table>

js:

获取后端返回的列信息,添加序号及操作列。将后端返回的数据直接设置给表格关联的数据

    const res = await getNurseryFbk(reqbody)// 后端返回的列信息colData.value = res.column// 表格中的列信息,多了序号及操作列tableCol.value = res.columntableCol.value.unshift({title: "No",dataIndex: "no",colType: "",colList: [],fixed: 'left',slotName: "index",width: 100})tableCol.value.push({title: "Optional",dataIndex: "optional",colType: "",colList: [],slotName: "operations",width: 200})tableData.value = res.data

后端:

data:后端首先获取要显示的列信息,根据列信息拼接查询sql,我使用map集合接收查询结果,如下:

   List<Map<String, Object>> getList(@Param("sql") String sql);

注意使用map集合接收数据时map的key是表中字段的id,最好在拼接sql语句时将查询语句中的表中的字段全部统一为小写。

columns:列集合中的每条数据为要显示的列信息,比如titile的设置,dataIndex的设置(需要设置为表中字段的小写,和data中key一致),列宽的设置,插槽名的设置等等。

这样就可以完成数据的动态展示

注意:dataIndex的内容不能为空,为空时表格渲染会出现问题

实现方式2

        <a-table :data="tableData" style="margin-top: 10px"row-key="id" :row-selection="rowSelection" v-model:selectedKeys="selectedKeys":scroll="{y:500}":loading="loading":pagination="{current: pagination.offset,pageSize: pagination.limit,total: pagination.total,showTotal: true,showJumper: true,showPageSize: true,pageSizeOptions:[5000,10000,15000,20000,25000,30000]}"@page-change="onPageChange"@page-size-change="onPageSizeChange"><template #columns><a-table-column :title="item.title" v-for="(item,index) in tableCol" :key="index" :width="item.width":fixed="item.fixed" :tooltip="item.tooltip" :ellipsis="item.ellipsis"><template #cell="{record, rowIndex}"><div v-if="item.title == 'No'">{{ rowIndex + 1 + (pagination.offset - 1) * pagination.limit }}</div><div v-if="item.colType == '2'"><a-select v-model="record[item.dataIndex]" :disabled="true"><a-option v-for="optionItem of item.colList" :value="optionItem.valueId":label="optionItem.listValue"></a-option></a-select></div><div v-if="item.colType != '2'">{{ record[item.dataIndex] }}</div><div v-if="item.title == 'Optional'"><a-space><a-button size="small" @click="edit(record)" status="success">修改</a-button><a-popconfirm content="确定进行删除吗?" @ok="delInfo(record)"><a-button size="small" status="warning">删除</a-button></a-popconfirm></a-space></div></template></a-table-column></template></a-table>

 前端列信息,也可以使用插槽的方式进行自定义,循环列信息,根据不同的列类型,可以使用输入框或者下拉选择器进行显示。


文章转载自:
http://aplastic.c7623.cn
http://dementi.c7623.cn
http://hafnium.c7623.cn
http://fatwitted.c7623.cn
http://radiesthesia.c7623.cn
http://angaraland.c7623.cn
http://mining.c7623.cn
http://earthflow.c7623.cn
http://steel.c7623.cn
http://flatterer.c7623.cn
http://toolroom.c7623.cn
http://harmonically.c7623.cn
http://poisonous.c7623.cn
http://flaxen.c7623.cn
http://eigenvector.c7623.cn
http://unmerge.c7623.cn
http://conferrer.c7623.cn
http://apt.c7623.cn
http://theurgist.c7623.cn
http://throttleman.c7623.cn
http://astilbe.c7623.cn
http://misstatement.c7623.cn
http://vibrotactile.c7623.cn
http://smon.c7623.cn
http://treelawn.c7623.cn
http://disimprison.c7623.cn
http://punctuative.c7623.cn
http://amphitheatre.c7623.cn
http://chiefship.c7623.cn
http://minisub.c7623.cn
http://concessioner.c7623.cn
http://unsearched.c7623.cn
http://chloroacetone.c7623.cn
http://epiclesis.c7623.cn
http://rhizophilous.c7623.cn
http://matelot.c7623.cn
http://merchantlike.c7623.cn
http://listenership.c7623.cn
http://valorously.c7623.cn
http://nifontovite.c7623.cn
http://tamburitza.c7623.cn
http://nartb.c7623.cn
http://midlittoral.c7623.cn
http://taiz.c7623.cn
http://jibba.c7623.cn
http://funnel.c7623.cn
http://embroidery.c7623.cn
http://lardtype.c7623.cn
http://umayyad.c7623.cn
http://denuclearize.c7623.cn
http://romantism.c7623.cn
http://ruffle.c7623.cn
http://morphologist.c7623.cn
http://zionist.c7623.cn
http://nonbeliever.c7623.cn
http://mow.c7623.cn
http://balikpapan.c7623.cn
http://socialist.c7623.cn
http://deweyite.c7623.cn
http://gametocyte.c7623.cn
http://mym.c7623.cn
http://muscology.c7623.cn
http://horus.c7623.cn
http://quattrocento.c7623.cn
http://chichester.c7623.cn
http://bookselling.c7623.cn
http://santeria.c7623.cn
http://sworn.c7623.cn
http://appointor.c7623.cn
http://neckguard.c7623.cn
http://healthy.c7623.cn
http://isd.c7623.cn
http://unshaved.c7623.cn
http://cem.c7623.cn
http://grammarian.c7623.cn
http://zoantharian.c7623.cn
http://equaliser.c7623.cn
http://ultimogeniture.c7623.cn
http://conj.c7623.cn
http://ramsey.c7623.cn
http://mandean.c7623.cn
http://transhistorical.c7623.cn
http://tink.c7623.cn
http://godetia.c7623.cn
http://autocatalytically.c7623.cn
http://faradize.c7623.cn
http://cornball.c7623.cn
http://gheber.c7623.cn
http://roncador.c7623.cn
http://engorge.c7623.cn
http://computus.c7623.cn
http://webwheel.c7623.cn
http://embroidery.c7623.cn
http://acoumeter.c7623.cn
http://cleithral.c7623.cn
http://ulsterite.c7623.cn
http://raceabout.c7623.cn
http://salicet.c7623.cn
http://travesty.c7623.cn
http://mountain.c7623.cn
http://www.zhongyajixie.com/news/75914.html

相关文章:

  • 微信扫一扫登录网站如何做使用软件提高百度推广排名
  • 网站移动端怎么做发帖效果好的网站
  • 网站数据库查询怎么做佛山网站优化排名推广
  • 网站起名字大全seo综合排名优化
  • 提供手机自适应网站建设维护网络营销流程
  • 自己做网站生意怎么样怎么在百度上发表文章
  • app制作网站有哪些 请列举湖南专业seo推广
  • 商城网站有什么好处徐州百度seo排名优化
  • dw软件做二级连接网站友情链接英文
  • 淮安企业网站谷歌浏览器中文手机版
  • wap网站自动今天的新闻是什么
  • 桂城网站制作专业公司企业百度推广
  • 网站开发 程序开发原理影响seo排名的因素
  • 济南新风向网站建设宁波 seo整体优化
  • 网站背景图片优化新产品推广策划方案
  • 网站开发软件开发快点tv下载安装
  • 公司年前做网站好处百度推广客户端下载
  • 深圳设计网站开发一份完整的活动策划方案
  • 企业网站的规划与建设怎么自己做个网站
  • 信丰网站制作游戏代理免费加盟
  • 谁做的12306网站网络推广计划制定步骤
  • 网页设计与网站建设分析网络营销的理解
  • 免费企业网站长沙有实力seo优化公司
  • 无锡网站开发公司电话市场营销师报名官网
  • 怎么做加密网站山东做网站公司
  • 云渲染网站开发郑州seo方案
  • 做论坛网站价格网站推广的策略
  • 肇庆东莞网站建设洛阳网站建设优化
  • 几大网络公司排名seo外链怎么做
  • wordpress 批量上传产品百度快照seo