0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

DrillDown Pt.1

Last updated at Posted at 2022-02-12

Overview

  • pages
    • it should use dialog when use drilldown
    • it can access DrillDown data when dialog have been closed
  • components
    • DrillDown
      • it have multiple slot
      • it get options and initial value from parent Class
      • it is selected in order
      • it get the next item from api each time one item is selected
    • Dialog
      • it should return Promise when open itself (pending)
      • it should resolve/reject Promise when close itself (notification)

Implementation

Index

  1. pages/DrillDownSearch.vue
  • Create pages/DrillDownSearch.vue
  • Put button for dialog
  1. components/Dialog.vue
  • Create components/Dialog.vue
  • Set slot
  • Set Promise for opne/close
  • Use Dialog in DrillDownSearch.vue
  1. components/DrillDown.vue
  • Create files
    • components/DrillDown.vue
    • mock/api/drillDown/dummy.json
    • mock/api/drillDown/GET.js
    • store/drillDown.js
  • Set form data to DrillDown.vue in DrillDownSearch.vue
  • Prepare dummy data
  • Prepare get function (just return dummy data)
  • Prepare action function (just fetch dummy data)
  • Use action in DrillDown.vue mounted
  • Return options according to post data
  • Store fetch data
  • Set initial option and value
  • Watch items and Update item according to new value
  1. tests
  • Create files
    • tests/pages/DrillDownSearch.spec.js
    • tests/components/Dialog.spec.js
    • tests/components/DrillDown.spec.js
  • Describe DrillDownSearch page
    • It should use dialog when use drilldown
    • It can access DrillDown data when dialog have been closed
  • Describe Dialog component
    • It should return Promise when open itself (pending)
    • It should resolve/reject Promise when close itself (notification)
  • Describe DrillDown component
    • It have multiple slot
    • It get options and initial value from parent Clas
    • It is selected in order
    • It get the next item from api each time one item is selected

Next DrillDown Pt.2

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?