Skip to content

Commit ba78f70

Browse files
committed
fix: mixin导出不正确
1 parent 372b6fe commit ba78f70

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

build/build-entry.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ const builtInNamesTemplate = getBuiltInNameTemplate(ComponentNames)
6262
const MAIN_TEMPLATE = `import Vue from 'vue'
6363
import locale from './locale'
6464
import EleForm from './EleForm'
65+
import formMixin from './mixins/formMixin'
66+
import uploadMixin from './mixins/uploadMixin'
6567
import EleFormGroup from './EleFormGroup'
6668
import EleFormDialog from './EleFormDialog'
6769
import EleFormSection from './EleFormSection'
6870
{{include}}
69-
export { default as formMixin } from './mixins/formMixin'
70-
export { default as uploadMixin } from './mixins/uploadMixin'
7171
7272
const components = [
7373
EleForm,
@@ -93,8 +93,9 @@ const install = function (Vue, opts = {}, lang) {
9393
if (typeof window !== 'undefined' && window.Vue) {
9494
install(window.Vue)
9595
}
96-
9796
EleForm.install = install
97+
EleForm.formMixin = formMixin
98+
EleForm.uploadMixin = uploadMixin
9899
export default EleForm
99100
`
100101
const template = render(MAIN_TEMPLATE, {

lib/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Vue from 'vue'
22
import locale from './locale'
33
import EleForm from './EleForm'
4+
import formMixin from './mixins/formMixin'
5+
import uploadMixin from './mixins/uploadMixin'
46
import EleFormGroup from './EleFormGroup'
57
import EleFormDialog from './EleFormDialog'
68
import EleFormSection from './EleFormSection'
@@ -37,8 +39,6 @@ import EleFormAutocomplete from './components/EleFormAutocomplete'
3739
import EleFormCascaderPanel from './components/EleFormCascaderPanel'
3840
import EleFormDatetimerange from './components/EleFormDatetimerange'
3941
import EleFormCheckboxButton from './components/EleFormCheckboxButton'
40-
export { default as formMixin } from './mixins/formMixin'
41-
export { default as uploadMixin } from './mixins/uploadMixin'
4242

4343
const components = [
4444
EleForm,
@@ -128,6 +128,7 @@ const install = function (Vue, opts = {}, lang) {
128128
if (typeof window !== 'undefined' && window.Vue) {
129129
install(window.Vue)
130130
}
131-
132131
EleForm.install = install
132+
EleForm.formMixin = formMixin
133+
EleForm.uploadMixin = uploadMixin
133134
export default EleForm

0 commit comments

Comments
 (0)