cosey 0.4.52 → 0.4.53

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,7 +1,7 @@
1
1
  import { type SpaceProps } from 'element-plus';
2
- export interface FormGroupProps extends Partial<SpaceProps> {
2
+ export interface FormGroupProps extends Partial<Omit<SpaceProps, 'class' | 'style'>> {
3
3
  title?: string;
4
- borderStyle?: 'none' | 'solid' | 'dashed';
4
+ borderStyle?: 'none' | 'solid' | 'dashed' | 'dotted';
5
5
  position?: 'left' | 'right' | 'center';
6
6
  collapsible?: boolean;
7
7
  collapsed?: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, withDirectives, createElementVNode, normalizeStyle, createBlock, createTextVNode, toDisplayString, createVNode, mergeProps, withCtx, renderSlot, vShow } from 'vue';
1
+ import { defineComponent, ref, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, withDirectives, createElementVNode, createBlock, createTextVNode, toDisplayString, createVNode, mergeProps, withCtx, renderSlot, vShow } from 'vue';
2
2
  import { reactiveOmit } from '@vueuse/core';
3
3
  import stdin_default$2 from '../icon/icon.vue.js';
4
4
  import stdin_default$1 from './style/index.js';
@@ -35,14 +35,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
35
35
  type: String,
36
36
  required: false
37
37
  },
38
- class: {
39
- type: null,
40
- required: false
41
- },
42
- style: {
43
- type: null,
44
- required: false
45
- },
46
38
  alignment: {
47
39
  type: null,
48
40
  required: false,
@@ -80,6 +72,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
80
72
  emit: __emit
81
73
  }) {
82
74
  const props = __props;
75
+ console.log(props);
83
76
  const emit = __emit;
84
77
  const {
85
78
  prefixCls
@@ -89,6 +82,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
89
82
  } = stdin_default$1(prefixCls);
90
83
  const spaceProps = reactiveOmit(props, ["title", "borderStyle", "position", "collapsible", "collapsed"]);
91
84
  const innerCollapsed = ref(false);
85
+ const isBordered = computed(() => !!props.title);
92
86
  watch(() => props.collapsed, () => {
93
87
  innerCollapsed.value = !!props.collapsed;
94
88
  }, {
@@ -104,9 +98,12 @@ var stdin_default = /* @__PURE__ */defineComponent({
104
98
  const _component_el_space = resolveComponent("el-space");
105
99
  return openBlock(), createElementBlock("div", {
106
100
  class: normalizeClass([unref(hashId), unref(prefixCls), {
107
- "is-bordered": !!_ctx.title,
101
+ "is-bordered": isBordered.value,
108
102
  "is-collapsed": innerCollapsed.value
109
- }])
103
+ }]),
104
+ style: normalizeStyle({
105
+ borderStyle: isBordered.value ? props.borderStyle : void 0
106
+ })
110
107
  }, [_ctx.title ? (openBlock(), createElementBlock("div", {
111
108
  key: 0,
112
109
  class: normalizeClass([`${unref(prefixCls)}-title`, `is-${_ctx.position}`])
@@ -134,8 +131,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
134
131
  _: 3
135
132
  /* FORWARDED */
136
133
  }, 16
137
- /* FULL_PROPS */), [[vShow, !innerCollapsed.value]])], 2
138
- /* CLASS */);
134
+ /* FULL_PROPS */), [[vShow, !innerCollapsed.value]])], 6
135
+ /* CLASS, STYLE */);
139
136
  };
140
137
  }
141
138
  });
@@ -6,10 +6,9 @@ var stdin_default = getSimpleStyleHook("FromGroup", (token) => {
6
6
  [componentCls]: {
7
7
  "&.is-bordered": {
8
8
  position: "relative",
9
- marginBlockStart: token.marginSM,
9
+ marginBlock: token.marginLG,
10
+ padding: token.paddingMD,
10
11
  paddingBlockStart: token.paddingLG,
11
- paddingBlockEnd: token.paddingMD,
12
- paddingInline: token.paddingMD,
13
12
  border: `${token.lineWidth} ${token.lineType} ${token.colorBorder}`,
14
13
  borderRadius: token.borderRadius,
15
14
  "&.is-collapsed": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.4.52",
3
+ "version": "0.4.53",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",