From e35d3f761c77cf679acfce3d61bb3865ff87ff5c Mon Sep 17 00:00:00 2001 From: zazzaz Date: Fri, 27 Nov 2020 11:15:20 +0800 Subject: [PATCH] chore: update build type --- build/gen-type.js | 2 +- packages/option/index.ts | 2 +- packages/select/index.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/gen-type.js b/build/gen-type.js index 0d6cfe1121..d85bf6aa26 100644 --- a/build/gen-type.js +++ b/build/gen-type.js @@ -32,7 +32,7 @@ fs.readdirSync(libDirPath).forEach(comp => { if(outsideImport.test(imp)) { const newImp = imp.replace(outsideImport, (i, c) => { return i.replace(`../${c}`, `../el-${c}`) - }) + }).replace('@element-plus/', '../el-') fs.writeFileSync(path.resolve(__dirname, '../lib', newCompName, 'index.d.ts'), newImp) } } diff --git a/packages/option/index.ts b/packages/option/index.ts index 82a8acf30c..4fd8463588 100644 --- a/packages/option/index.ts +++ b/packages/option/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import Option from '../select/src/option.vue' +import { Option } from '@element-plus/select' Option.install = (app: App): void => { app.component(Option.name, Option) diff --git a/packages/select/index.ts b/packages/select/index.ts index 5da034f048..977cff922c 100644 --- a/packages/select/index.ts +++ b/packages/select/index.ts @@ -1,8 +1,10 @@ import { App } from 'vue' import Select from './src/select.vue' +import Option from './src/option.vue' Select.install = (app: App): void => { app.component(Select.name, Select) } +export { Option } export default Select