Skip to content

Commit

Permalink
release: 3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Aug 15, 2021
1 parent dbef439 commit e2a3264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nutui/nutui",
"version": "3.1.2",
"version": "3.1.3",
"description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)",
"main": "dist/nutui.umd.js",
"module": "dist/nutui.es.js",
Expand Down
14 changes: 7 additions & 7 deletions src/packages/utils/create/component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { App, defineComponent, ComponentOptions } from 'vue';
import { App, defineComponent } from 'vue';
export function createComponent(name: string) {
const componentName = 'nut-' + name;
return {
componentName,
create: function (_component: ComponentOptions) {
create: function (_component: any) {
_component.baseName = name;
_component.name = componentName;
_component.install = (vue: App) => {
Expand All @@ -13,12 +13,12 @@ export function createComponent(name: string) {
vue.component(item.name as string, item);
});
};
return defineComponent(_component as any);
} as typeof defineComponent,
createDemo: function (_component: ComponentOptions) {
return defineComponent(_component);
},
createDemo: function (_component: any) {
_component.baseName = name;
_component.name = 'demo-' + name;
return defineComponent(_component as any);
} as typeof defineComponent
return defineComponent(_component);
}
};
}

0 comments on commit e2a3264

Please sign in to comment.