Skip to content

Commit

Permalink
fix(build): fix import module path (element-plus#543)
Browse files Browse the repository at this point in the history
* fix(build): fix import module path

* fix: fix export constants & type

* fix(popover): fix exports and import
  • Loading branch information
zouhangwithsweet authored Nov 4, 2020
1 parent 5f32eb6 commit b45f084
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 30 deletions.
4 changes: 2 additions & 2 deletions packages/button/src/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import { computed, inject, defineComponent } from 'vue'
import { useGlobalConfig } from '@element-plus/utils/util'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import type { PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
type IButtonType = PropType<'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' | 'default'>
type IButtonNativeType = PropType<'button' | 'submit' | 'reset'>
Expand Down
2 changes: 2 additions & 0 deletions packages/cascader-panel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ export default (app: App): void => {
}

export { CascaderPanel }
export * from './src/types'
export * from './src/config'
2 changes: 1 addition & 1 deletion packages/cascader-panel/src/node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<script lang="ts">
import { computed, defineComponent, inject, h } from 'vue'
import { Checkbox as ElCheckbox } from '@element-plus/checkbox'
import ElRadio from '@element-plus/radio/src/radio.vue'
import { Radio as ElRadio } from '@element-plus/radio'
import {
CascaderNode,
CASCADER_PANEL_INJECTION_KEY,
Expand Down
8 changes: 4 additions & 4 deletions packages/cascader/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ import isServer from '@element-plus/utils/isServer'
import { useGlobalConfig } from '@element-plus/utils/util'
import { addResizeListener, removeResizeListener } from '@element-plus/utils/resize-event'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { CommonProps } from '@element-plus/cascader-panel/src/config'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import { CommonProps } from '@element-plus/cascader-panel'
import type { ComputedRef, PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { CascaderValue, CascaderNode, Tag } from '@element-plus/cascader-panel/src/types'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
import type { CascaderValue, CascaderNode, Tag } from '@element-plus/cascader-panel'
const DEFAULT_INPUT_HEIGHT = 40
Expand Down
4 changes: 2 additions & 2 deletions packages/color-picker/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ import { t } from '@element-plus/locale'
import { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'
import { useGlobalConfig } from '@element-plus/utils/util'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import type { PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
interface IUseOptions {
currentColor: ComputedRef<string>
Expand Down
1 change: 1 addition & 0 deletions packages/form/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export default (app: App): void => {
}

export { Form, FormItem, LabelWrap }
export * from './src/token'
4 changes: 2 additions & 2 deletions packages/input-number/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ import { RepeatClick } from '@element-plus/directives'
import { Input as ElInput } from '@element-plus/input'
import { useGlobalConfig } from '@element-plus/utils/util'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import { parseInt } from 'lodash'
import type { PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
interface IData {
currentValue: number | string
Expand Down
4 changes: 2 additions & 2 deletions packages/input/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ import { isObject, useGlobalConfig } from '@element-plus/utils/util'
import isServer from '@element-plus/utils/isServer'
import { isKorean } from '@element-plus/utils/isDef'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import calcTextareaHeight from './calcTextareaHeight'
import type { PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
type AutosizeProp = {
minRows?: number
Expand Down
6 changes: 3 additions & 3 deletions packages/popover/src/index.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts">
import { defineComponent, Fragment, createTextVNode, renderSlot, toDisplayString, createCommentVNode } from 'vue'
import { Popper as ElPopper } from '@element-plus/popper'
import defaultProps, { Effect } from '@element-plus/popper/src/use-popper/defaults'
import { renderPopper, renderTrigger, renderArrow } from '@element-plus/popper/src/renderers'
import { defaultProps, Effect } from '@element-plus/popper'
import { renderPopper, renderTrigger, renderArrow } from '@element-plus/popper'
import { warn } from '@element-plus/utils/error'
import { renderBlock, renderIf, PatchFlags } from '@element-plus/utils/vnode'
import { stop } from '@element-plus/utils/dom'
import usePopover, { SHOW_EVENT, HIDE_EVENT } from './usePopover'
import type { PropType } from 'vue'
import type { TriggerType } from '@element-plus/popper/src/use-popper/defaults'
import type { TriggerType } from '@element-plus/popper'
const emits = ['update:visible', 'after-enter', 'after-leave', SHOW_EVENT, HIDE_EVENT ]
const NAME = 'ElPopover'
Expand Down
4 changes: 2 additions & 2 deletions packages/popover/src/usePopover.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { computed, watch } from 'vue'
import { isString } from '@element-plus/utils/util'
import usePopper from '@element-plus/popper/src/use-popper'
import { usePopper } from '@element-plus/popper'


import type { IPopperOptions } from '@element-plus/popper/src/use-popper/defaults'
import type { IPopperOptions } from '@element-plus/popper'
import type { SetupContext } from 'vue'

export interface IUsePopover extends IPopperOptions{
Expand Down
4 changes: 4 additions & 0 deletions packages/popper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ export default (app: App) => {
}

export { Popper }
export { default as defaultProps, Effect } from './src/use-popper/defaults'
export type { TriggerType, IPopperOptions } from './src/use-popper/defaults'
export { default as usePopper } from './src/use-popper/index'
export * from './src/renderers/index'
4 changes: 2 additions & 2 deletions packages/radio/src/radio-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import {
import { EVENT_CODE } from '@element-plus/utils/aria'
import { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormItemKey } from '@element-plus/form/src/token'
import { elFormItemKey } from '@element-plus/form'
import radioGroupKey from './token'
import type { PropType } from 'vue'
import type { ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormItemContext } from '@element-plus/form'
export default {
name: 'ElRadioGroup',
Expand Down
4 changes: 2 additions & 2 deletions packages/rate/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ import {
import { isObject, isArray } from '@vue/shared'
import { hasClass } from '@element-plus/utils/dom'
import { EVENT_CODE } from '@element-plus/utils/aria'
import { elFormKey } from '@element-plus/form/src/token'
import { elFormKey } from '@element-plus/form'
import type { ElFormContext } from '@element-plus/form/src/token'
import type { ElFormContext } from '@element-plus/form'
export default defineComponent({
name: 'ElRate',
Expand Down
4 changes: 2 additions & 2 deletions packages/switch/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</template>
<script lang='ts'>
import { defineComponent, computed, onMounted, ref, inject, nextTick, watch } from 'vue'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
type ValueType = boolean | string | number;
Expand Down
4 changes: 2 additions & 2 deletions packages/time-picker/src/common/picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ import { Popper as ElPopper } from '@element-plus/popper'
import { EVENT_CODE } from '@element-plus/utils/aria'
import { useGlobalConfig } from '@element-plus/utils/util'
import { isValidComponentSize } from '@element-plus/utils/validators'
import { elFormKey, elFormItemKey } from '@element-plus/form/src/token'
import { elFormKey, elFormItemKey } from '@element-plus/form'
import type { PropType } from 'vue'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormContext, ElFormItemContext } from '@element-plus/form'
interface PickerOptions {
isValidValue: any
Expand Down
4 changes: 2 additions & 2 deletions packages/transfer/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ import { useCheckedChange } from './useCheckedChange'
import { useMove } from './useMove'
import { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'
import { elFormItemKey } from '@element-plus/form/src/token'
import { elFormItemKey } from '@element-plus/form'
import type { PropType, VNode } from 'vue'
import type { ElFormItemContext } from '@element-plus/form/src/token'
import type { ElFormItemContext } from '@element-plus/form'
import type {
DataItem, Format, Key,
Props, TargetOrder,
Expand Down
4 changes: 2 additions & 2 deletions packages/upload/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import {
onBeforeUnmount,
} from 'vue'
import { NOOP } from '@vue/shared'
import { elFormKey } from '@element-plus/form/src/token'
import { elFormKey } from '@element-plus/form'
import ajax from './ajax'
import UploadList from './upload-list.vue'
import Upload from './upload.vue'
import useHandlers from './useHandlers'
import type { PropType } from 'vue'
import type { ElFormContext } from '@element-plus/form/src/token'
import type { ElFormContext } from '@element-plus/form'
import type {
ListType,
UploadFile,
Expand Down

0 comments on commit b45f084

Please sign in to comment.