Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposing named slots which allows enclosing template to customize eac… #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danielwu68
Copy link

…h field

<template>
  <div>
    <jd-table
      :option                 = "tableOptions"
      :loader                 = "tableLoader"
      :event-from-app         = "eventFromApp"
      :event-from-app-trigger = "eventFromAppTrigger"
      @event-from-jd-table    = "processEventFromApp( $event )"
    >
      <template v-slot:account_id="p">
        <!-- example of exposed data -->
        {{ p.pageRowIndex }} - {{ p.rowIndex }} |
        {{p.value}}
      </template>
      <template v-slot:create_date="p">
        <!-- example of using Vue filter -->
        <span :title="p.value | localDate">{{p.value | localDateShort}}</span>
      </template>
      <template v-slot:first_name="p">
        <!-- example of plan Javascript -->
        <span :title="p.value">{{p.value ? p.value.toUpperCase() : p.value}}</span>
      </template>
    </jd-table>
    <iframe id="excelExportArea" style="display:none"></iframe>
  </div>
</template>

@danielwu68
Copy link
Author

James what do you think about this pull request?

@jamesdruhan
Copy link
Owner

I like it! I actually want to add a few more slots to it. Sorry for the slow response, I've been pretty busy and haven't been able to dedicate much time to this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants