Skip to content

Commit

Permalink
refactor: rename util to utils close #422
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol committed Apr 13, 2022
1 parent 243391e commit 3c3de4b
Show file tree
Hide file tree
Showing 26 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/devui-vue/devui/anchor/src/d-anchor-box.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { setActiveLink, onScroll, } from './util';
import { inBrowser, randomId } from '../../shared/util';
import { setActiveLink, onScroll, } from './utils';
import { inBrowser, randomId } from '../../shared/utils';

export default {
name: 'd-anchor-box',
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/anchor/src/d-anchor-link.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { scrollToControl } from './util';
import { scrollToControl } from './utils';
interface Bind {
value: string;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/anchor/src/d-anchor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {hightLightFn} from './util';
import {hightLightFn} from './utils';
interface Bind {
value: string;
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/breadcrumb/src/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SourceConfig
} from './breadcrumb-types';
import DBreadcrumbItem from './breadcrumb-item';
import { getPropsSlot } from '../../shared/util/props-util';
import { getPropsSlot } from '../../shared/utils/props-util';
import './breadcrumb.scss';

export default defineComponent({
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/drawer/src/use-drawer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { computed, onUnmounted, ref, watch } from 'vue';
import { onClickOutside } from '@vueuse/core';
import { DrawerEmit, DrawerProps, UseDrawerFn } from './drawer-types';
import { lockScroll } from '../../shared/util/lock-scroll';
import { lockScroll } from '../../shared/utils/lock-scroll';

export function useDrawer(props: DrawerProps, emit: DrawerEmit): UseDrawerFn {
const drawerRef = ref<HTMLElement>();
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/dropdown/src/use-dropdown.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { watch, onMounted, onUnmounted, toRefs, computed, ref } from 'vue';
import type { Ref } from 'vue';
import { getElement } from '../../shared/util/dom';
import { getElement } from '../../shared/utils/dom';
import { UseDropdownProps, EmitEvent, DropdownProps, UseOverlayFn } from './dropdown-types';

const dropdownMap = new Map();
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Header from './src/components/header';
import Body from './src/components/body';
import Footer from './src/components/footer';
import { ModalService } from './src/services/modal-service';
import { inBrowser } from '../shared/util/common-var';
import { inBrowser } from '../shared/utils/common-var';

export * from './src/modal-types';

Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/overlay/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { App } from 'vue';
import { FixedOverlay } from './src/fixed-overlay';
import { FlexibleOverlay } from './src/flexible-overlay';
import { inBrowser } from '../shared/util/common-var';
import { inBrowser } from '../shared/utils/common-var';

export * from './src/fixed-overlay/fixed-overlay-types';
export * from './src/flexible-overlay/flexible-overlay-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* <div v-clickoutside="handleClose">
*/

import { inBrowser } from '../util/common-var';
import { inBrowser } from '../utils/common-var';
import { on } from './utils';

const ctx = Symbol('@@clickoutside');
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
} from 'vue';

import DToolTip from '../../../tooltip/src/tooltip';
import { setStyle } from '../../../shared/util/set-style';
import { addClass, removeClass } from '../../../shared/util/class';
import { setStyle } from '../../../shared/utils/set-style';
import { addClass, removeClass } from '../../../shared/utils/class';
import dresize, { ResizeDirectiveProp } from '../d-resize-directive';
import type { SplitterStore, DragState, SplitterPane } from '../splitter-store';
import { splitterBarProps, SplitterBarProps } from './splitter-bar-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
onMounted,
onUpdated,
} from 'vue';
import { addClass, hasClass, removeClass } from '../../../shared/util/class';
import { setStyle } from '../../../shared/util/set-style';
import { addClass, hasClass, removeClass } from '../../../shared/utils/class';
import { setStyle } from '../../../shared/utils/set-style';
import type { SplitterStore } from '../splitter-store';
import { splitterPaneProps, SplitterPaneProps } from './splitter-pane-types';
import './splitter-pane.scss';
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/theme/core/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inBrowser } from '../../shared/util/common-var';
import { inBrowser } from '../../shared/utils/common-var';

class Theme {
static imports: any = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
CheckableRelationType,
TreeData,
} from '../tree-types';
import { flatten } from '../util';
import { flatten } from '../utils';

interface IUseChecked {
selected: Ref<SelectType>;
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/tree/src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomId } from '../../../shared/util';
import { randomId } from '../../../shared/utils';
import { IInnerTreeNode, ITreeNode } from './use-tree-types';

export function flatToNested(flatTree: IInnerTreeNode[]): ITreeNode[] {
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/devui/tree/src/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineComponent, reactive, ref, toRefs, provide } from 'vue';
import type { SetupContext } from 'vue';
import { treeProps, TreeProps, TreeItem, TreeRootType, Nullable } from './tree-types';
import { CHECK_CONFIG } from './config';
import { preCheckTree, deleteNode, getId } from './util';
import { preCheckTree, deleteNode, getId } from './utils';
import Loading from '../../loading/src/loading-service';
import Checkbox from '../../checkbox/src/checkbox';
import useToggle from './composables/use-toggle';
Expand Down
File renamed without changes.

0 comments on commit 3c3de4b

Please sign in to comment.