cnhis-design-vue 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.0.2",
4
+ "version": "3.0.3",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",
7
7
  "scripts": {
@@ -1,14 +1,16 @@
1
1
  import type { App } from "vue";
2
2
 
3
3
  // 导入组件
4
- // import Grid, { VXETable } from "./src/Grid"
4
+ import 'vxe-table/lib/style.css'
5
+ import 'xe-utils'
6
+ import VXETable from 'vxe-table'
5
7
  import Grid from "./src/Grid"
6
8
 
7
9
  // type SFCWithInstall<T> = T & { install(app: App): void }; // vue 安装
8
10
 
9
11
  // 为组件提供 install 安装方法,供按需引入
10
12
  Grid.install = function(app: App) {
11
- // app.use(VXETable);
13
+ app.use(VXETable);
12
14
  app.component(Grid.name, Grid);
13
15
  };
14
16
 
@@ -1,17 +1,12 @@
1
1
  import { defineComponent } from "vue"
2
- import 'xe-utils'
3
- // import VXETable, { Grid } from 'vxe-table'
4
- import { Grid } from 'vxe-table'
5
- // import 'vxe-table/lib/style.css'
6
2
  import create from '@/core/create.js';
7
3
  import { useMethods } from './hooks'
8
4
 
9
- // export { VXETable }
10
5
 
11
6
  export default defineComponent(create({
12
7
  name: "Grid",
13
8
  setup(props: any, { attrs, slots }: any) {
14
- const renderVN = () => <Grid ref="xGrid" { ...attrs }>{slots}</Grid>
9
+ const renderVN = () => <vxe-grid ref="xGrid" { ...attrs }>{slots}</vxe-grid>
15
10
  return {
16
11
  ...useMethods(),
17
12
  renderVN
@@ -156,8 +156,7 @@ export const useMethods = () => {
156
156
  const funcs: any = {}
157
157
  methodKeys.forEach(name => {
158
158
  funcs[name] = (...args: any[]) => {
159
- const $xGrid: any = xGrid.value
160
- return $xGrid && $xGrid[name](...args)
159
+ return xGrid.value && xGrid.value[name](...args)
161
160
  }
162
161
  })
163
162
 
package/packages/index.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import type { App } from "vue";
2
2
  // 导入组件
3
- import { default as Grid } from './grid';
4
- import { default as BigTable } from './big-table';
5
- import { default as DragLayout } from './drag-layout';
6
- import { default as ButtonPrint } from './button-print';
3
+ import { default as CGrid } from './grid';
4
+ import { default as CBigTable } from './big-table';
5
+ import { default as CDragLayout } from './drag-layout';
6
+ import { default as CButtonPrint } from './button-print';
7
7
 
8
8
  // 存储组件列表
9
9
  const components: any[] = [
10
- Grid,
11
- BigTable,
12
- DragLayout,
13
- ButtonPrint
10
+ CGrid,
11
+ CBigTable,
12
+ CDragLayout,
13
+ CButtonPrint
14
14
  ];
15
15
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
16
16
  const install = function(app: App) {
@@ -21,10 +21,10 @@ const install = function(app: App) {
21
21
  };
22
22
 
23
23
  export {
24
- Grid as CGrid,
25
- BigTable as CBigTable,
26
- DragLayout as CDragLayout,
27
- ButtonPrint as CButtonPrint
24
+ CGrid,
25
+ CBigTable,
26
+ CDragLayout,
27
+ CButtonPrint
28
28
  }
29
29
 
30
30
  export default {
@@ -4,5 +4,5 @@
4
4
  "module": "esnext",
5
5
  "moduleResolution": "node"
6
6
  },
7
- "include": ["vite.config.ts"]
7
+ "include": ["vite.config.ts", "build/*.ts"]
8
8
  }