Comments (3)
请问有结论了吗
from v-selectpage.
服务端数据模式下,插件有且只需要以下的数据格式:
{
totalRow: 100,
list:[
{...},
{...},
{...}
]
}
如果服务端返回的数据中,已经包含这些内容,则不需要处理。
但大数情况下,返回的数据结构/数据字段名称并不一定是以上的格式,于是可以使用 result-format
参数将数据格式为插件需要的数据结构
所以,按照你所发的服务端返回的数据格式,你需要返回:
return {
totalRow: data.list.total,
list: data.list.records
};
from v-selectpage.
服务端数据模式下,插件有且只需要以下的数据格式:
{ totalRow: 100, list:[ {...}, {...}, {...} ] }如果服务端返回的数据中,已经包含这些内容,则不需要处理。
但大数情况下,返回的数据结构/数据字段名称并不一定是以上的格式,于是可以使用result-format
参数将数据格式为插件需要的数据结构所以,按照你所发的服务端返回的数据格式,你需要返回:
return { totalRow: data.list.total, list: data.list.records };
好的,非常感谢
from v-selectpage.
Related Issues (20)
- 组件问题很多 默认选中无法实现 指定值必须为number 异步加载数据初始化触发两次 HOT 2
- 服务端模式完全不进行数据拉取,dataLoad函数没有反应 HOT 3
- v-selectpage 打包后的问题 HOT 5
- 下载了v-selectpage 后本地跑图标会出不来 HOT 2
- 怎么设置成行内元素? HOT 2
- 多选下清除picked后自动展示出下拉框 HOT 6
- 服务端数据模式 数据初始化异常 HOT 2
- 组件能否自定义一个方法?
- ant-design-of-vue Modal使用v-selectPage多选模式 HOT 1
- 在第3页更新数据,更新成功后,分页和数据都显示在第三页,如何回到第一页
- v-model is not updating the value HOT 1
- Vue3支持吗? HOT 4
- You may have an infinite update loop in watcher with expression "picked"
- Remove all items in selector mode HOT 3
- SelectPageTable 多选模式下,选择多个后删除,下拉框样式只会是初始的位置,不会跟随着数据变化,而调整位置 HOT 1
- 咨询 选项字体过长问题 HOT 1
- how to add a new language HOT 1
- selected v-model as single item
- Unstyled mode support
- fetch-data 能否不在页面加载的时候就触发?有些参数是联动的,此时还没有 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-selectpage.