This article describes how to use the table paging component based on Vue. js in detail and describes the features of Vue. js. If you are interested, refer to section 1. Introduction to Vue. js.
1. Main Features of Vue: (1) Simplicity (2) Lightweight (3) fast (4) data-driven
The principle is to place the specified row of the original table, specifying a column clone on it
The implementation code is as follows:
Parent Component Invocation Instance:
The above is a small set to introduce the Vue fixed Head fixed column click on the table can be sorted form components, I hope to help you, if you have any questions
= = myapplist.length-1) {return;} Swapitems (Myapplist, index,0, ' Down ');} To this JS operation Array moved to complete the following used in the Vue project inside2. Vue operation table Move up and bottomProject requirements: Circular list is DD label, DD label to the right there are four small buttons from top to bottom function is: top, move up, move down,
Sample Code for table merge and sample code for vue. js
Preface
Because vue is used and MVVM uses the data-driven idea, we should consider using the Model instead of rendering the data for DOM operations. Of course, the basic CSS is still required. Therefore, this method is effective for all data-driven frameworks, such as Angular and React.
The final implementat
Sample Code for Vue + jquery to implement text shrinking of specified columns in a table, vuejquery
This article describes the sample code for Vue + jquery to implement text shrinking of specified columns in a table. The Code is as follows:
The effect is very simple, but it is really not easy to write, because
Vue + element-ui + ajax implements a table instance, vueelement-ui
Example:
:
The above example of using vue + element-ui + ajax to implement a table is all the content shared by Alibaba Cloud. I hope you can give us a reference and support for the customer's house.
Vue element-ui table rolling loading method, vueelement-ui
Add a global registration event to listen for Rolling events
window.Vue.directive('loadmore', { bind(el, binding) { const selectWrap = el.querySelector('.el-table__body-wrapper') selectWrap.addEventListener('scroll', function() { let sign = 100 const scrollDistance = this.scrollHeight - this.scrollTop - this.clientHeight if (scrollDistance
Sig
In the background system, the table is used for a large number of times, so it is decided to use it as a component.
1. Create a table. vue File
2. Call Components
Vue encapsulates the table component in element
Use vue and element-ui to set the table content paging instance, vueelement-ui
Html code
Because I wrote it in the template, that is, I created a new group and pasted the code.
In the code, small indicates whether to use a small paging style.
Layout indicates the component layout. Child component names are separated by commas (,).
Attribute: total indicates the total number of items.
Event: current-change
Use: Vue, AxiosInterface Requirements: Post method, entry to JSON format, parameter file stream1. Request functionfunction (form) { return// send POST request with Axios method: ' Post ', // Request Address // parameter // indicates the type of data returned by the return server Headers: { ' content-type ': ' Application/json ' }}}2. Export functionsConst PARAMS = {
Recently, I used the table paging function in my project. So I would like to share it with you to help you.
1 View code
Some important parts of the Code are marked with comments. If you have any questions, leave a message.
Vue + iview implement table and paging and interaction with background data
type, also can not write, write to specify the download file format, do not write, what file format, download is what format, according to project needs.
suffix-name MIME name*.3GPP AUDIO/3GPP, VIDEO/3GPP*.AC3 AUDIO/AC3*.ASF allpication/vnd.ms-asf*.au Audio/basic*.css Text/css*.csv Text/csv*.doc Application/msword*.dot Application/msword*.DTD APPLICATION/XML-DTD*.DWG IMAGE/VND.DWG*.DXF IMAGE/VND.DXF*.gif Image/gif*.htm text/html*.html text/html*.JP2 IMAGE/JP2*.jpe Image/jpeg*.jpeg Image/jpe
Dragstartevent (index) {this.dragstartindex = index},// Drag the process---each move an object will go into this method, only the last time to enter this method is the position of the drag end dragenterevent (ev, col) {this.dragendcolumn = col},//drag End--- Delete the target object from the original array and add the target object dragendevent (EV, col) {if (Col.key! = This.dragEndColumn.key) {This.tablesColumns.forEach ( Item, Index) = {if (Item.key = = Col.key) {this.tablesColumns.splice (in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.