Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Commit

Permalink
chore: switch dayjs and lodash to esm compatible deps
Browse files Browse the repository at this point in the history
  • Loading branch information
b2nil committed Dec 4, 2020
1 parent b88d600 commit ca8192a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/components/calendar/body/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Swiper, SwiperItem, View } from '@tarojs/components'
import { BaseEventOrig, ITouch, ITouchEvent } from '@tarojs/components/types/common'
import { AtCalendarBodyListGroup, AtCalendarBodyProps, Calendar, AtCalendarBodyState } from 'types/calendar'
import Taro from '@tarojs/taro'
import dayjs from 'dayjs'
import dayjs from 'dayjs/esm/index'
import { delayQuerySelector } from '../../../utils/common'
import generateCalendarGroup from '../common/helper'
import AtCalendarDateList from '../ui/date-list/index'
Expand Down
14 changes: 7 additions & 7 deletions src/components/calendar/common/helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dayjs, { Dayjs } from 'dayjs'
import _flow from 'lodash/flow'
import dayjs, { Dayjs } from 'dayjs/esm/index'
import _flow from 'lodash-es/flow'
import { Calendar } from 'types/calendar'
import * as constant from './constant'
import plugins from './plugins'
Expand All @@ -26,11 +26,11 @@ function getFullItem(
export default function generateCalendarGroup(
options: Calendar.GroupOptions
): (
generateDate: number,
selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean
) => Calendar.ListInfo<Calendar.Item> {
return function(
generateDate: number,
selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean
) => Calendar.ListInfo<Calendar.Item> {
return function (
generateDate: number,
selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean
Expand Down
4 changes: 2 additions & 2 deletions src/components/calendar/common/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dayjs from 'dayjs'
import _isEmpty from 'lodash/isEmpty'
import dayjs from 'dayjs/esm/index'
import _isEmpty from 'lodash-es/isEmpty'
import { Calendar } from 'types/calendar'

interface PluginArg {
Expand Down
2 changes: 1 addition & 1 deletion src/components/calendar/controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { h, defineComponent, computed, PropType } from "vue"
import { Picker, Text, View } from '@tarojs/components'
import { Calendar, AtCalendarControllerProps } from 'types/calendar'
import { CommonEvent } from '@tarojs/components/types/common'
import dayjs from 'dayjs'
import dayjs from 'dayjs/esm/index'

const AtCalendarController = defineComponent({
name: "AtCalendarController",
Expand Down
2 changes: 1 addition & 1 deletion src/components/calendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h, defineComponent, reactive, toRefs, watch, nextTick, mergeProps, PropType } from "vue"
import dayjs, { Dayjs } from 'dayjs'
import dayjs, { Dayjs } from 'dayjs/esm/index'

import { View } from '@tarojs/components'
import { CommonEvent } from '@tarojs/components/types/common'
Expand Down
2 changes: 1 addition & 1 deletion src/components/grid/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h, defineComponent, computed, mergeProps, PropType } from "vue"
import _chunk from 'lodash/chunk'
import _chunk from 'lodash-es/chunk'
import { Image, View, Text } from '@tarojs/components'
import { CommonEvent } from '@tarojs/components/types'
import { AtGridProps, AtGridItem } from 'types/grid'
Expand Down
2 changes: 1 addition & 1 deletion src/components/input-number/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { h, defineComponent, computed, mergeProps, PropType } from "vue"
import _toString from 'lodash/toString'
import _toString from 'lodash-es/toString'
import { pxTransform } from "../../utils/common"

import { Input, Text, View } from '@tarojs/components'
Expand Down
4 changes: 2 additions & 2 deletions src/components/swipe-action/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { h, defineComponent, ref, reactive, watch, CSSProperties, computed, mergeProps, PropType } from 'vue'
import _inRange from 'lodash/inRange'
import _isEmpty from 'lodash/isEmpty'
import _inRange from 'lodash-es/inRange'
import _isEmpty from 'lodash-es/isEmpty'
import { Text, View } from '@tarojs/components'
import { CommonEvent, ITouchEvent } from '@tarojs/components/types/common'
import {
Expand Down
2 changes: 1 addition & 1 deletion types/calendar.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dayjs from 'dayjs'
import dayjs from 'dayjs/esm/index'
import { CommonEvent } from '@tarojs/components/types/common'
import { Component } from '@vue/runtime-core'

Expand Down

0 comments on commit ca8192a

Please sign in to comment.