cosey 0.10.11 → 0.10.13

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.
@@ -4,7 +4,12 @@ var stdin_default = getSimpleStyleHook("CoContainer", (token) => {
4
4
  const { componentCls } = token;
5
5
  return {
6
6
  [componentCls]: {
7
- padding: token.padding
7
+ padding: token.padding,
8
+ "@media(max-height: 800px)": {
9
+ "&": {
10
+ height: "auto !important"
11
+ }
12
+ }
8
13
  }
9
14
  };
10
15
  });
@@ -29,6 +29,7 @@ const getButtonStyle = (token) => {
29
29
  },
30
30
  "&-group": {
31
31
  display: "flex",
32
+ flexWrap: "wrap",
32
33
  gap: 2
33
34
  },
34
35
  "&-select": {
@@ -23,7 +23,12 @@ const getFormItemStyle = (token) => {
23
23
  alignSelf: "center"
24
24
  },
25
25
  [`${formItemCls}-content`]: {
26
- maxWidth: "100%"
26
+ maxWidth: "100%",
27
+ "@media(max-width: 768px)": {
28
+ "&": {
29
+ width: "100% !important"
30
+ }
31
+ }
27
32
  },
28
33
  [`${formItemCls}-extra`]: {
29
34
  marginBlockStart: token.marginXXS,
@@ -3,7 +3,9 @@ import { formDialogEmits, formDialogSlots, formDialogProps, elFormDialogExposeKe
3
3
  import '../form/index.js';
4
4
  import { useFormDialogWidth } from './useFormDialogWidth.js';
5
5
  import { ElDialog } from 'element-plus';
6
+ import stdin_default$1 from './form-dialog.style.js';
6
7
  import { useBubbleTemplate } from '../form/useBubbleTemplate.js';
8
+ import { useComponentConfig } from '../config-provider/config-provider.api.js';
7
9
 
8
10
  var stdin_default = defineComponent({
9
11
  name: "CoFormDialog",
@@ -15,6 +17,12 @@ var stdin_default = defineComponent({
15
17
  slots,
16
18
  expose: _expose
17
19
  }) {
20
+ const {
21
+ prefixCls
22
+ } = useComponentConfig("form-dialog", props);
23
+ const {
24
+ hashId
25
+ } = stdin_default$1(prefixCls);
18
26
  const {
19
27
  visible,
20
28
  handleOpen,
@@ -34,6 +42,7 @@ var stdin_default = defineComponent({
34
42
  return createVNode(ElDialog, mergeProps({
35
43
  "ref": elPopupRef
36
44
  }, props, {
45
+ "class": [hashId.value, prefixCls.value],
37
46
  "modelValue": visible.value,
38
47
  "onUpdate:modelValue": $event => visible.value = $event,
39
48
  "style": {
@@ -0,0 +1,4 @@
1
+ declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../theme/theme-context").ThemeManager) => {
2
+ hashId: import("vue").Ref<string, string>;
3
+ };
4
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { getSimpleStyleHook } from '../theme/getSimpleStyleHook.js';
2
+
3
+ var stdin_default = getSimpleStyleHook("CoFormDialog", (token) => {
4
+ const { componentCls } = token;
5
+ return {
6
+ [componentCls]: {
7
+ "@media(max-width: 768px)": {
8
+ "&": {
9
+ width: "100%"
10
+ }
11
+ }
12
+ }
13
+ };
14
+ });
15
+
16
+ export { stdin_default as default };
@@ -21,7 +21,7 @@ var stdin_default = defineComponent({
21
21
  const {
22
22
  hashId
23
23
  } = stdin_default$1(prefixCls);
24
- const spaceProps = reactiveOmit(props, ["title", "borderStyle", "position", "collapsible", "collapsed"]);
24
+ const spaceProps = reactiveOmit(props, ["title", "tooltip", "borderStyle", "position", "collapsible", "collapsed"]);
25
25
  const innerCollapsed = ref(false);
26
26
  const isBordered = computed(() => !!props.title);
27
27
  watch(() => props.collapsed, () => {
@@ -66,10 +66,7 @@ var stdin_default = defineComponent({
66
66
  "size": "md"
67
67
  }, null)
68
68
  })])]), withDirectives(createVNode(resolveComponent("el-space"), mergeProps(spaceProps, {
69
- "style": {
70
- display: "flex",
71
- minWidth: 0
72
- }
69
+ "class": `${prefixCls.value}-space`
73
70
  }), {
74
71
  default: () => [slots.default?.({})]
75
72
  }), [[vShow, !innerCollapsed.value]])]);
@@ -40,6 +40,17 @@ var stdin_default = getSimpleStyleHook("CoFormGroup", (token) => {
40
40
  marginInlineStart: token.marginXXS,
41
41
  cursor: "pointer",
42
42
  alignSelf: "center"
43
+ },
44
+ [`${componentCls}-space`]: {
45
+ display: "flex",
46
+ "& > *": {
47
+ maxWidth: "100%",
48
+ "@media(max-width: 768px)": {
49
+ "&": {
50
+ width: "100%"
51
+ }
52
+ }
53
+ }
43
54
  }
44
55
  }
45
56
  };
@@ -24,7 +24,38 @@ var stdin_default = getSimpleStyleHook("CoFormList", (token) => {
24
24
  marginInlineEnd: token.marginXXS
25
25
  },
26
26
  ".el-form-item__label": {
27
- display: "none"
27
+ display: "none",
28
+ "@media(max-width: 768px)": {
29
+ "&": {
30
+ display: "inline-flex"
31
+ }
32
+ }
33
+ },
34
+ [`${componentCls}-sort-item`]: {
35
+ "@media(max-width: 768px)": {
36
+ "&": {
37
+ width: "100%"
38
+ }
39
+ }
40
+ },
41
+ [`${componentCls}-space`]: {
42
+ display: "flex",
43
+ flexWrap: "wrap",
44
+ "&.is-head": {
45
+ "@media(max-width: 768px)": {
46
+ "&": {
47
+ display: "none"
48
+ }
49
+ }
50
+ },
51
+ "& > *": {
52
+ maxWidth: "100%",
53
+ "@media(max-width: 768px)": {
54
+ "&": {
55
+ width: "100%"
56
+ }
57
+ }
58
+ }
28
59
  }
29
60
  }
30
61
  };
@@ -280,10 +280,11 @@ var stdin_default = /* @__PURE__ */defineComponent({
280
280
  }) : createVNode("div", {
281
281
  "class": [hashId.value, prefixCls.value]
282
282
  }, [props.modelValue.length > 0 && createVNode(ElSpace, {
283
+ "class": [`${prefixCls.value}-space`, "is-head"],
283
284
  "style": {
284
285
  marginInlineStart: props.draggable ? token.value.marginLG + "px" : ""
285
286
  },
286
- "size": "large"
287
+ "size": [16, 16]
287
288
  }, _isSlot(_slot = columns.value.map(column => {
288
289
  return createVNode("div", {
289
290
  "class": [`${prefixCls.value}-title`, {
@@ -304,10 +305,12 @@ var stdin_default = /* @__PURE__ */defineComponent({
304
305
  }, _isSlot(_slot2 = props.modelValue.map((row, index) => {
305
306
  return createVNode(_DndSortItem, {
306
307
  "key": getKey(row),
307
- "index": index
308
+ "index": index,
309
+ "class": `${prefixCls.value}-sort-item`
308
310
  }, {
309
311
  default: () => [createVNode(ElSpace, {
310
- "size": "large"
312
+ "size": [16, 16],
313
+ "class": `${prefixCls.value}-space`
311
314
  }, {
312
315
  default: () => [slots.default?.({
313
316
  row,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, unref, computed, createVNode, mergeProps, nextTick } from 'vue';
2
- import { reactiveComputed } from '@vueuse/core';
2
+ import { reactiveComputed, reactiveOmit } from '@vueuse/core';
3
3
  import { merge, get } from 'lodash-es';
4
4
  import { ElSelect, ElPagination, ElOption } from 'element-plus';
5
5
  import { remoteSelectEmits, remoteSelectSlots, remoteSelectProps } from './remote-select.api.js';
@@ -126,8 +126,9 @@ var stdin_default = defineComponent({
126
126
  } = useProps(props);
127
127
  const popperId = uniqid();
128
128
  const events = bulkBindEvents(remoteSelectEmits, emit);
129
+ const selectProps = reactiveOmit(props, ["optionProps", "api", "pagination", "formProps", "transformParams", "keys", "immediate"]);
129
130
  return () => {
130
- return createVNode(ElSelect, mergeProps(attrs, props, events, {
131
+ return createVNode(ElSelect, mergeProps(attrs, selectProps, events, {
131
132
  "class": `${hashId.value} ${prefixCls.value}`,
132
133
  "popper-class": `${hashId.value} ${prefixCls.value}-popper ${popperId}`,
133
134
  "onVisible-change": onVisibleChange
@@ -10,6 +10,11 @@ var stdin_default = getSimpleStyleHook("CoStackDialog", (token) => {
10
10
  width: "80%",
11
11
  height: "calc(100vh - 15vh)",
12
12
  transition: token.motionDurationSlow,
13
+ "@media(max-width: 768px)": {
14
+ "&": {
15
+ width: "100%"
16
+ }
17
+ },
13
18
  [`${componentCls}-header`]: {
14
19
  flex: "none"
15
20
  },
@@ -120,7 +120,8 @@ var stdin_default = defineComponent({
120
120
  "class": `${prefixCls.value}-remove`,
121
121
  "onClick": () => emit("remove")
122
122
  }, [createVNode(stdin_default$1, {
123
- "name": "co:close-large"
123
+ "name": "co:close-large",
124
+ "size": "md"
124
125
  }, null)])]);
125
126
  };
126
127
  }
package/config/i18n.js CHANGED
@@ -1,6 +1,11 @@
1
+ import dayjsZhCn from 'dayjs/locale/zh-cn';
2
+ import stdin_default from '../locale/lang/zh-cn.js';
3
+
1
4
  const defaultI18nConfig = {
2
5
  locale: "zh-cn",
3
- messages: []
6
+ messages: [
7
+ { value: "zh-cn", label: "\u7B80\u4F53\u4E2D\u6587", dayjs: dayjsZhCn, cosey: stdin_default, app: {} }
8
+ ]
4
9
  };
5
10
 
6
11
  export { defaultI18nConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.10.11",
3
+ "version": "0.10.13",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",