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

Performance improvement: Vueファイルのダイナミックインポート対応 #408

Merged
merged 1 commit into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@

<script>
import ScaleLoader from 'vue-spinner/src/ScaleLoader.vue'
import DataView from '@/components/DataView.vue'
import DataViewBasicInfoPanel from '@/components/DataViewBasicInfoPanel.vue'
const DataView = () => import('@/components/DataView.vue')
const DataViewBasicInfoPanel = () =>
import('@/components/DataViewBasicInfoPanel.vue')

export default {
components: { DataView, DataViewBasicInfoPanel, ScaleLoader },
Expand Down
2 changes: 1 addition & 1 deletion components/MetroBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</style>

<script>
import DataView from '@/components/DataView.vue'
const DataView = () => import('@/components/DataView.vue')

export default {
components: { DataView },
Expand Down
2 changes: 1 addition & 1 deletion components/SideNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@

<script>
import ListItem from '@/components/ListItem'
import LanguageSelector from '@/components/LanguageSelector.vue'
import LogoAnimation from '@/components/Logo-Animation'
import LogoAnimationSp from '@/components/Logo-Animation-sp.vue'
const LanguageSelector = () => import('@/components/LanguageSelector.vue')

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion components/SvgCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</style>

<script>
import DataView from '@/components/DataView.vue'
const DataView = () => import('@/components/DataView.vue')

export default {
components: { DataView },
Expand Down
9 changes: 5 additions & 4 deletions components/TimeBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@

<script>
import ScaleLoader from 'vue-spinner/src/ScaleLoader.vue'
import DataView from '@/components/DataView.vue'
import DataSelector from '@/components/DataSelector.vue'
import DataViewBasicInfoPanel from '@/components/DataViewBasicInfoPanel.vue'
import DateSelectSlider from '@/components/DateSelectSlider.vue'
const DataView = () => import('@/components/DataView.vue')
const DataSelector = () => import('@/components/DataSelector.vue')
const DataViewBasicInfoPanel = () =>
import('@/components/DataViewBasicInfoPanel.vue')
const DateSelectSlider = () => import('@/components/DateSelectSlider.vue')

export default {
components: {
Expand Down
7 changes: 4 additions & 3 deletions components/TimeStackedBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
</template>

<script>
import DataView from '@/components/DataView.vue'
import DataSelector from '@/components/DataSelector.vue'
import DataViewBasicInfoPanel from '@/components/DataViewBasicInfoPanel.vue'
const DataView = () => import('@/components/DataView.vue')
const DataSelector = () => import('@/components/DataSelector.vue')
const DataViewBasicInfoPanel = () =>
import('@/components/DataViewBasicInfoPanel.vue')

function cumulative(array) {
const cumulativeArray = []
Expand Down
2 changes: 1 addition & 1 deletion components/cards/ContactsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatGraph from '@/utils/formatGraph.ts'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')

export default {
name: 'ContactsCard',
Expand Down
2 changes: 1 addition & 1 deletion components/cards/CurrentPatientsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatCurrentPatientsGraph from '@/utils/formatCurrentPatientsGraph'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')
export default {
name: 'CurrentPatientsCard',
components: {
Expand Down
2 changes: 1 addition & 1 deletion components/cards/DischargesCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatDischargesSummaryGraph from '@/utils/formatDischargesSummaryGraph'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')

export default {
name: 'DischargesCard',
Expand Down
2 changes: 1 addition & 1 deletion components/cards/InspectionsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatInspectionsGraph from '@/utils/formatInspectionsGraph'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')
export default {
name: 'InspectionsCard',
components: {
Expand Down
2 changes: 1 addition & 1 deletion components/cards/PatientsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
</template>

<script>
import DataTable from '@/components/DataTable.vue'
import formatTable from '@/utils/formatTable'
import convertToDateFromData from '@/utils/convertToDateFromData'
import formatPatientsSummaryGraph from '@/utils/formatPatientsSummaryGraph'
const DataTable = () => import('@/components/DataTable.vue')

export default {
name: 'PatientsCard',
Expand Down
2 changes: 1 addition & 1 deletion components/cards/PatientsSummaryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatPatientsSummaryGraph from '@/utils/formatPatientsSummaryGraph'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')

export default {
name: 'PatientsSummaryCard',
Expand Down
2 changes: 1 addition & 1 deletion components/cards/QuerentsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</template>

<script>
import TimeBarChart from '@/components/TimeBarChart.vue'
import formatGraph from '@/utils/formatGraph'
import convertToDateFromData from '@/utils/convertToDateFromData'
const TimeBarChart = () => import('@/components/TimeBarChart.vue')

export default {
name: 'QuerentsCard',
Expand Down
2 changes: 1 addition & 1 deletion pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
<script lang="ts">
import Vue from 'vue'
import { MetaInfo } from 'vue-meta'
import TextCard from '@/components/TextCard.vue'
const TextCard = () => import('@/components/TextCard.vue')

export default Vue.extend({
components: {
Expand Down
2 changes: 1 addition & 1 deletion pages/flow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@

<script>
import CovidIcon from '@/static/covid.svg'
import DesktopFlowSvg from '@/components/DesktopFlowSvg.vue'
const DesktopFlowSvg = () => import('@/components/DesktopFlowSvg.vue')
export default {
components: { CovidIcon, DesktopFlowSvg },
head() {
Expand Down
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
</template>

<script>
import PageHeader from '@/components/PageHeader.vue'
import WhatsNew from '@/components/WhatsNew.vue'
import convertToDateFromData from '@/utils/convertToDateFromData.ts'
import DischargesCard from '@/components/cards/DischargesCard.vue'
import PatientsSummaryCard from '@/components/cards/PatientsSummaryCard.vue'
Expand All @@ -42,6 +40,8 @@ import ContactsCard from '@/components/cards/ContactsCard.vue'
import QuerentsCard from '@/components/cards/QuerentsCard.vue'
import CurrentPatientsCard from '@/components/cards/CurrentPatientsCard.vue'
import InspectionsCard from '@/components/cards/InspectionsCard.vue'
const PageHeader = () => import('@/components/PageHeader.vue')
const WhatsNew = () => import('@/components/WhatsNew.vue')

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion pages/parent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</template>

<script>
import TextCard from '@/components/TextCard.vue'
const TextCard = () => import('@/components/TextCard.vue')
export default {
components: {
TextCard
Expand Down
2 changes: 1 addition & 1 deletion pages/worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</template>

<script>
import TextCard from '@/components/TextCard.vue'
const TextCard = () => import('@/components/TextCard.vue')
export default {
components: {
TextCard
Expand Down