cosey 0.5.6 → 0.5.7

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.
@@ -1,6 +1,6 @@
1
1
  import { type SpaceProps } from 'element-plus';
2
2
  export interface FormGroupProps extends Partial<Omit<SpaceProps, 'class' | 'style'>> {
3
- title?: string;
3
+ title?: string | number;
4
4
  borderStyle?: 'none' | 'solid' | 'dashed' | 'dotted';
5
5
  position?: 'left' | 'right' | 'center';
6
6
  collapsible?: boolean;
@@ -11,7 +11,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
11
11
  __name: "form-group",
12
12
  props: {
13
13
  title: {
14
- type: String,
14
+ type: [String, Number],
15
15
  required: false
16
16
  },
17
17
  borderStyle: {
@@ -2,11 +2,11 @@ export * from './table-action.api';
2
2
  declare const _TableAction: {
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
4
4
  actions: {
5
- type: import("vue").PropType<import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][]>;
5
+ type: import("vue").PropType<(import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][]>;
6
6
  default: () => never[];
7
7
  };
8
8
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
9
- actions: import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][];
9
+ actions: (import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][];
10
10
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
11
11
  P: {};
12
12
  B: {};
@@ -16,22 +16,22 @@ declare const _TableAction: {
16
16
  Defaults: {};
17
17
  }, Readonly<import("vue").ExtractPropTypes<{
18
18
  actions: {
19
- type: import("vue").PropType<import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][]>;
19
+ type: import("vue").PropType<(import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][]>;
20
20
  default: () => never[];
21
21
  };
22
22
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
23
- actions: import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][];
23
+ actions: (import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][];
24
24
  }>;
25
25
  __isFragment?: never;
26
26
  __isTeleport?: never;
27
27
  __isSuspense?: never;
28
28
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
29
29
  actions: {
30
- type: import("vue").PropType<import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][]>;
30
+ type: import("vue").PropType<(import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][]>;
31
31
  default: () => never[];
32
32
  };
33
33
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
34
- actions: import("./item.api").TableActionItem[] | import("./item.api").TableActionItem[][];
34
+ actions: (import("./item.api").TableActionItem | null | undefined)[] | (import("./item.api").TableActionItem | null | undefined)[][];
35
35
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
36
36
  export { _TableAction as TableAction };
37
37
  export default _TableAction;
@@ -1,9 +1,11 @@
1
1
  import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  import { type TableActionItem } from './item.api';
3
+ type TableActionItemAtom = TableActionItem | null | undefined;
3
4
  export declare const tableActionProps: {
4
5
  actions: {
5
- type: PropType<TableActionItem[] | TableActionItem[][]>;
6
+ type: PropType<TableActionItemAtom[] | TableActionItemAtom[][]>;
6
7
  default: () => never[];
7
8
  };
8
9
  };
9
10
  export type TableActionProps = ExtractPropTypes<typeof tableActionProps>;
11
+ export {};
@@ -1,15 +1,15 @@
1
1
  import { TableActionItem } from './item.api';
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  actions: {
4
- type: import("vue").PropType<TableActionItem[] | TableActionItem[][]>;
4
+ type: import("vue").PropType<(TableActionItem | null | undefined)[] | (TableActionItem | null | undefined)[][]>;
5
5
  default: () => never[];
6
6
  };
7
7
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
8
  actions: {
9
- type: import("vue").PropType<TableActionItem[] | TableActionItem[][]>;
9
+ type: import("vue").PropType<(TableActionItem | null | undefined)[] | (TableActionItem | null | undefined)[][]>;
10
10
  default: () => never[];
11
11
  };
12
12
  }>> & Readonly<{}>, {
13
- actions: TableActionItem[] | TableActionItem[][];
13
+ actions: (TableActionItem | null | undefined)[] | (TableActionItem | null | undefined)[][];
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
15
  export default _default;
@@ -9,7 +9,8 @@ var stdin_default = defineComponent({
9
9
  props: tableActionProps,
10
10
  setup(props) {
11
11
  const dyadicActions = computed(() => {
12
- return Array.isArray(props.actions[0]) ? props.actions : [props.actions];
12
+ const actions = props.actions.filter(Boolean);
13
+ return Array.isArray(actions[0]) ? props.actions : [props.actions];
13
14
  });
14
15
  const {
15
16
  prefixCls
@@ -24,7 +25,7 @@ var stdin_default = defineComponent({
24
25
  return createVNode("div", {
25
26
  "key": rowIndex,
26
27
  "class": `${prefixCls.value}-row`
27
- }, [actions.map((action, actionIndex) => {
28
+ }, [actions.filter(Boolean).map((action, actionIndex) => {
28
29
  return createVNode(stdin_default$2, mergeProps({
29
30
  "key": actionIndex
30
31
  }, action), null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",