vue-transfer-pagination
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

how to use

<template>
  <div class="transfer-views">
    <vue-transfer-pagination
      v-model="tables"
      :data="allDataSourceTables"
      target-order="push"
      :filter-method="filterMethod"
      :titles="['11', '22']"
      filterable
      filter-placeholder="33"
    />
  </div>
</template>
<script lang="ts">
import VueTransferPagination from "vue-transfer-pagination";
import { defineComponent, ref } from "@vue/composition-api";
import { TransferData } from "element-ui/types/transfer";
// import VueTransferPagination from "@/components/vue-transfer-pagination/index";
// Vue.use(VueTransferPagination)
export default defineComponent({
  components: {
    VueTransferPagination,
  },
  setup() {
    const tables = ref([]);
    const allDataSourceTables = ref<TransferData[]>([]);
    while (allDataSourceTables.value.length < 1000) {
      const index = allDataSourceTables.value.length;
      allDataSourceTables.value.push({
        label: index + "",
        key: index,
        disabled: false,
      });
    }
    const filterMethod = (query: string, item: TransferData) => {
      return item.label.includes(query);
    };
    return {
      tables,
      allDataSourceTables,
      filterMethod,
    };
  },
});
</script>
<style lang="scss">
.transfer-views {
  width: 1300px;
}
</style>

Package Sidebar

Install

npm i vue-transfer-pagination

Weekly Downloads

4

Version

1.0.3

License

ISC

Unpacked Size

12.8 MB

Total Files

12

Last publish

Collaborators

  • kkkkh