@mv-template/dev

0.0.1 • Public • Published

MV Template Page

Installation

yarn add mv-template-page
or
npm i mv-template-page

Example

<template>
  <mv-template
    :title="title"
    :dashboard-ids="dashboardIds"
    :token="configToken"
    :is-dark="isDark"
    :filters.sync="filters"
    :update-filters.sync="updateFilters"
    :code="code"
  />
</template>
<script>
import MvTemplate from 'mv-template-page'

export default {
  components: {
    MvTemplate,
  },
  data() {
    return {
      title: 'Dev Test Page',
      configToken: `Bearer ${localStorage.getItem('accessToken')}`,
      isDark: false,
      dashboardIds: [
        {
          title: 'Summary',
          id: '60dad4302722b900132f807e',
        },
        {
          title: 'Analytics',
          id: '60ebc0914a0a130012db902b',
        },
      ],
      filters: [
        {
          name: 'Filter-1',
          operator: '=',
          property: 'group_exams_gender',
          propertyType: 'string',
          value: 'male',
          widgets: ['60c18c69c65520001422e662'],
          _id: '60c61f3a471c96001211a619',
        },
      ],
      updateFilters: [
        {
          name: 'Filter-1',
          value: 'male',
          operator: '=',
        },
      ],
      code: 'PAGE-1',
    }
  },
}
</script>

Add New Page

  1. Create new folder under 'components' folder using this format 'page-[code]'
  2. Create 'MainComponent.vue' into component folder that you have already created. If you want to create other component for your new page, make sure it registered in this 'MainComponent.vue'
  3. 'MainComponent.vue' must have this props:
    • title
    • token
    • dashboardIds
    • isDark
    • filters
    • updateFilters
  4. Import your 'MainComponent.vue' into 'MVTemplate.vue' and create new code for your new component
  5. Register your new code in MES swagger (temporary) : https://mes.machinevision.global:4600/mes/api/menu

Readme

Keywords

Package Sidebar

Install

npm i @mv-template/dev

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

88.2 MB

Total Files

798

Last publish

Collaborators

  • machine-vision-technology