Browse Source

release: 3.1.3

richard1015 4 years ago
parent
commit
e2a3264eaf
2 changed files with 8 additions and 8 deletions
  1. 1 1
      package.json
  2. 7 7
      src/packages/utils/create/component.ts

+ 1 - 1
package.json

@@ -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",

+ 7 - 7
src/packages/utils/create/component.ts

@@ -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) => {
@@ -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);
+    }
   };
 }