Skip to content
Open
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
3 changes: 2 additions & 1 deletion packages/components/affix/affix.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ref, watch, nextTick, onMounted, onBeforeUnmount, defineComponent, onActivated, onDeactivated } from 'vue';
import { isFunction, isUndefined } from 'lodash-es';
import isFunction from 'lodash-es/isFunction';
import isUndefined from 'lodash-es/isUndefined';

import { on, off, getScrollContainer } from '@tdesign/shared-utils';
import props from './props';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
HelpCircleFilledIcon as TdHelpCircleFilledIcon,
InfoCircleFilledIcon as TdInfoCircleFilledIcon,
} from 'tdesign-icons-vue-next';
import { isArray, isString } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isString from 'lodash-es/isString';

import { on, off, addClass } from '@tdesign/shared-utils';
import props from './props';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';
import type { AnchorProps } from 'tdesign-vue-next';

const { appContext } = getCurrentInstance();
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/cursor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/custom-scroll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/large.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/multiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/small.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>
<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
2 changes: 1 addition & 1 deletion packages/components/anchor/_example/target.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<script lang="tsx" setup>
import { computed, getCurrentInstance } from 'vue';
import { get } from 'lodash-es';
import get from 'lodash-es/get';

const { appContext } = getCurrentInstance();
const path = computed(() => get(appContext, '$route.path', ''));
Expand Down
3 changes: 2 additions & 1 deletion packages/components/anchor/anchor-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { ANCHOR_SHARP_REGEXP } from './utils';
import props from './anchor-item-props';
import { usePrefixClass, useCommonClassName } from '@tdesign/shared-hooks';
import { AnchorInjectionKey } from './constants';
import { isString, isFunction } from 'lodash-es';
import isString from 'lodash-es/isString';
import isFunction from 'lodash-es/isFunction';

const localProps = {
...props,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { computed, defineComponent } from 'vue';
import type { PropType } from 'vue';
import { usePrefixClass } from '@tdesign/shared-hooks';
import { isString, escapeRegExp } from 'lodash-es';
import isString from 'lodash-es/isString';
import escapeRegExp from 'lodash-es/escapeRegExp';

export interface HighlightOptionProps {
content: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ref, computed, defineComponent, PropType, h, watch, onBeforeUnmount } from 'vue';
import { isString, isFunction, escapeRegExp } from 'lodash-es';
import isString from 'lodash-es/isString';
import isFunction from 'lodash-es/isFunction';
import escapeRegExp from 'lodash-es/escapeRegExp';
import HighlightOption from './highlight-option';
import { useConfig, usePrefixClass, CommonClassNameType } from '@tdesign/shared-hooks';
import { AutoCompleteOptionObj, TdAutoCompleteProps } from '../type';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { computed, isVNode, Slots } from 'vue';
import { isArray, isString } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isString from 'lodash-es/isString';
import { useChildComponentSlots } from '@tdesign/shared-hooks';
import type { TdBreadcrumbProps, TdBreadcrumbItemProps } from '../type';

Expand Down
4 changes: 3 additions & 1 deletion packages/components/calendar/calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { defineComponent, computed, watch } from 'vue';
// 通用库
import dayjs from 'dayjs';
import { remove, isArray, isFunction } from 'lodash-es';
import remove from 'lodash-es/remove';
import isArray from 'lodash-es/isArray';
import isFunction from 'lodash-es/isFunction';

import props from './props';
import * as utils from './utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/calendar/hooks/useColHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TdCalendarProps, WeekDay } from '../type';
import { useConfig } from '@tdesign/shared-hooks';
import { COMPONENT_NAME } from '../constants';
import * as utils from '../utils';
import { isObject } from 'lodash-es';
import isObject from 'lodash-es/isObject';

export function useColHeaders(props: TdCalendarProps, state: CalendarState) {
const { t, globalConfig } = useConfig(COMPONENT_NAME);
Expand Down
3 changes: 2 additions & 1 deletion packages/components/calendar/hooks/useController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isBoolean, isFunction } from 'lodash-es';
import isBoolean from 'lodash-es/isBoolean';
import isFunction from 'lodash-es/isFunction';

import { computed, nextTick } from 'vue';
import dayjs from 'dayjs';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/calendar/hooks/useState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { COMPONENT_NAME } from '../constants';
import { createDefaultCurDate } from '../utils';
import { TdCalendarProps } from '../type';
import { CalendarState } from '../types';
import { isArray } from 'lodash-es';
import isArray from 'lodash-es/isArray';

export function useState(props: TdCalendarProps) {
const { globalConfig } = useConfig(COMPONENT_NAME);
Expand Down
2 changes: 1 addition & 1 deletion packages/components/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTNodeJSX, usePrefixClass, useCommonClassName } from '@tdesign/shared

import TLoading from '../loading';
import props from './props';
import { isString } from 'lodash-es';
import isString from 'lodash-es/isString';
import { TdCardProps } from './type';

export default defineComponent({
Expand Down
4 changes: 3 additions & 1 deletion packages/components/cascader/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Ref, reactive, computed, toRefs, watch, nextTick } from 'vue';
import { isEqual, isString, isFunction } from 'lodash-es';
import isEqual from 'lodash-es/isEqual';
import isString from 'lodash-es/isString';
import isFunction from 'lodash-es/isFunction';

import TreeStore from '@tdesign/common-js/tree/tree-store';
import { useVModel, useDisabled, useDefaultValue } from '@tdesign/shared-hooks';
Expand Down
5 changes: 4 additions & 1 deletion packages/components/cascader/utils/effect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { isArray, isNumber, cloneDeep, isFunction } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isNumber from 'lodash-es/isNumber';
import cloneDeep from 'lodash-es/cloneDeep';
import isFunction from 'lodash-es/isFunction';

import type { TreeNode, CascaderContextType, TdCascaderProps, TreeNodeValue, TreeNodeModel } from '../types';
import { getFullPathLabel, getTreeValue, isEmptyValues } from './helper';
Expand Down
5 changes: 4 additions & 1 deletion packages/components/cascader/utils/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { isArray, isEmpty, isNumber, isObject } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isEmpty from 'lodash-es/isEmpty';
import isNumber from 'lodash-es/isNumber';
import isObject from 'lodash-es/isObject';

import {
TreeNode,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, ref, toRefs, inject, watch, computed, ComputedRef } from 'vue';
import { isString } from 'lodash-es';
import isString from 'lodash-es/isString';
import props from './props';
import {
useVModel,
Expand Down
4 changes: 3 additions & 1 deletion packages/components/checkbox/group.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { defineComponent, provide, computed, watchEffect, ref, toRefs } from 'vue';
import { isObject, isUndefined, intersection } from 'lodash-es';
import isObject from 'lodash-es/isObject';
import isUndefined from 'lodash-es/isUndefined';
import intersection from 'lodash-es/intersection';

import Checkbox from './checkbox';
import props from './checkbox-group-props';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/color-picker/color-picker-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { computed, defineComponent } from 'vue';
import props from './color-picker-panel-props';
import ColorPanel from './components/panel';
import { usePrefixClass } from '@tdesign/shared-hooks';
import { pickBy } from 'lodash-es';
import pickBy from 'lodash-es/pickBy';

export default defineComponent({
name: 'TColorPickerPanel',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, PropType, reactive, watch } from 'vue';
import { throttle } from 'lodash-es';
import throttle from 'lodash-es/throttle';
import { Color, getColorFormatInputs, getColorFormatMap } from '@tdesign/common-js/color-picker/index';
import props from '../../props';
import TInput from '../../../input';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { computed, defineComponent, ref, toRefs, watch } from 'vue';
import { cloneDeep, isNull, isUndefined } from 'lodash-es';
import cloneDeep from 'lodash-es/cloneDeep';
import isNull from 'lodash-es/isNull';
import isUndefined from 'lodash-es/isUndefined';
import {
Color,
DEFAULT_COLOR,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue';
import { cloneDeep } from 'lodash-es';
import cloneDeep from 'lodash-es/cloneDeep';
import { GRADIENT_SLIDER_DEFAULT_WIDTH } from '@tdesign/common-js/color-picker/constants';
import { genGradientPoint, gradientColors2string, GradientColorPoint } from '../../utils';
import { InputNumber as TInputNumber } from '../../../input-number';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/comment/comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import props from './props';
import { useTNodeJSX, usePrefixClass, useFlatChildrenSlots } from '@tdesign/shared-hooks';

import Button from '../button';
import { isString } from 'lodash-es';
import isString from 'lodash-es/isString';

export default defineComponent({
name: 'TComment',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script lang="ts" setup>
import { merge } from 'lodash-es';
import merge from 'lodash-es/merge';
import enConfig from 'tdesign-vue-next/es/locale/en_US';
import type { GlobalConfigProvider } from 'tdesign-vue-next';

Expand Down
2 changes: 1 addition & 1 deletion packages/components/config-provider/_example/global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script lang="ts" setup>
import { merge } from 'lodash-es';
import merge from 'lodash-es/merge';
import enConfig from 'tdesign-vue-next/es/locale/en_US';

// 全局特性配置,引入英文语言配置包 enConfig
Expand Down
2 changes: 1 addition & 1 deletion packages/components/config-provider/_example/others.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</template>

<script lang="tsx" setup>
import { merge } from 'lodash-es';
import merge from 'lodash-es/merge';
import enConfig from 'tdesign-vue-next/es/locale/en_US';
import { ErrorIcon, ChevronRightIcon, CloseIcon, CloseCircleIcon } from 'tdesign-icons-vue-next';
import type {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/config-provider/_example/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</template>

<script lang="tsx" setup>
import { merge } from 'lodash-es';
import merge from 'lodash-es/merge';
import enConfig from 'tdesign-vue-next/es/locale/en_US';
import { ChevronRightIcon, CaretDownSmallIcon } from 'tdesign-icons-vue-next';
import type { TableProps, GlobalConfigProvider } from 'tdesign-vue-next';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/config-provider/hooks/useConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// TODO 应当提取到公共 hooks 中
import { computed, h, inject, getCurrentInstance, ref, provide } from 'vue';
import { cloneDeep, isFunction } from 'lodash-es';
import cloneDeep from 'lodash-es/cloneDeep';
import isFunction from 'lodash-es/isFunction';

import { defaultGlobalConfig, configProviderInjectKey, mergeWith } from '../utils/context';
import { GlobalConfigProvider, TdConfigProviderProps } from '../type';
Expand Down
4 changes: 3 additions & 1 deletion packages/components/config-provider/utils/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { InjectionKey, ComputedRef } from 'vue';
import { mergeWith as _mergeWith, merge, isArray } from 'lodash-es';
import _mergeWith from 'lodash-es/mergeWith';
import merge from 'lodash-es/merge';
import isArray from 'lodash-es/isArray';
import defaultConfig from '@tdesign/common-js/global-config/default-config';
import defaultZhLocale from '@tdesign/common-js/global-config/locale/zh_CN';
import { GlobalConfigProvider } from '../type';
Expand Down
4 changes: 3 additions & 1 deletion packages/components/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineComponent, computed, watch, ComputedRef } from 'vue';
import dayjs from 'dayjs';
import { isFunction, isDate, isArray } from 'lodash-es';
import isFunction from 'lodash-es/isFunction';
import isDate from 'lodash-es/isDate';
import isArray from 'lodash-es/isArray';
import { CalendarIcon as TdCalendarIcon } from 'tdesign-icons-vue-next';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/date-picker/DatePickerPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineComponent, computed } from 'vue';
import dayjs from 'dayjs';
import { isFunction } from 'lodash-es';
import isFunction from 'lodash-es/isFunction';
import { useSingleValue } from './hooks/useSingleValue';
import { formatDate, getDefaultFormat, parseToDayjs } from '@tdesign/common-js/date-picker/format';
import { subtractMonth, addMonth, extractTimeObj } from '@tdesign/common-js/date-picker/utils';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { defineComponent, computed, ref, watch, ComputedRef } from 'vue';
import dayjs from 'dayjs';
import { useDisabled, useReadonly, usePrefixClass } from '@tdesign/shared-hooks';

import { isArray, isFunction } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isFunction from 'lodash-es/isFunction';

import props from './date-range-picker-props';
import {
Expand Down
3 changes: 2 additions & 1 deletion packages/components/date-picker/DateRangePickerPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineComponent, computed, ref, onMounted } from 'vue';
import dayjs from 'dayjs';
import { isArray, isFunction } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isFunction from 'lodash-es/isFunction';

import dateRangePickerPanelProps from './date-range-picker-panel-props';
import dateRangePickerProps from './date-range-picker-props';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineComponent, computed, PropType } from 'vue';
import { isPlainObject } from 'lodash-es';
import isPlainObject from 'lodash-es/isPlainObject';
import { useConfig, usePrefixClass, useTNodeJSX } from '@tdesign/shared-hooks';
import TButton from '../../../button';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineComponent, PropType, computed } from 'vue';
import TDatePickerCell from './Cell';
import { useConfig, usePrefixClass } from '@tdesign/shared-hooks';
import { parseToDayjs } from '@tdesign/common-js/date-picker/format';
import { isArray } from 'lodash-es';
import isArray from 'lodash-es/isArray';

import type { TdDatePickerProps, DateMultipleValue } from '../../type';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineComponent, PropType } from 'vue';
import { isFunction, isArray } from 'lodash-es';
import isFunction from 'lodash-es/isFunction';
import isArray from 'lodash-es/isArray';
import { usePrefixClass } from '@tdesign/shared-hooks';
import type { TdDatePickerProps, TdDateRangePickerProps } from '../../type';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import TExtraContent from './ExtraContent';
import { TdDateRangePickerProps, PickerDateRange } from '../../type';
import { getDefaultFormat, parseToDayjs } from '@tdesign/common-js/date-picker/format';
import { useTableData, useDisableDate } from '../../hooks';
import { isArray, isFunction } from 'lodash-es';
import isArray from 'lodash-es/isArray';
import isFunction from 'lodash-es/isFunction';
import log from '@tdesign/common-js/log/index';

export default defineComponent({
Expand Down
2 changes: 1 addition & 1 deletion packages/components/date-picker/hooks/useDisableDate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isObject } from 'lodash-es';
import isObject from 'lodash-es/isObject';
import dayjs from 'dayjs';
import type { TdDatePickerProps, TdDateRangePickerProps } from '../type';
import { isEnabledDate } from '@tdesign/common-js/date-picker/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/date-picker/hooks/useRange.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ref, computed, watch } from 'vue';
import { CalendarIcon as TdCalendarIcon } from 'tdesign-icons-vue-next';
import { omit } from 'lodash-es';
import omit from 'lodash-es/omit';

import { useConfig, useTNodeJSX, useReadonly, useGlobalIcon, usePrefixClass } from '@tdesign/shared-hooks';

Expand Down
Loading
Loading