cosey 0.10.19 → 0.10.21

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.
@@ -123,5 +123,6 @@ export interface FormBubbleData {
123
123
  }
124
124
  export interface FormBubbleContext {
125
125
  setFormBubbleData: (data: FormBubbleData) => void;
126
+ confirm: () => Promise<void>;
126
127
  }
127
128
  export declare const formBubbleContextSymbol: unique symbol;
@@ -57,7 +57,11 @@ var stdin_default = defineComponent({
57
57
  }, {
58
58
  onSubmit: event => {
59
59
  event.preventDefault();
60
- submit();
60
+ if (formBubbleContext) {
61
+ formBubbleContext.confirm();
62
+ } else {
63
+ submit();
64
+ }
61
65
  }
62
66
  }), {
63
67
  default: () => [createVNode(_OptionalWrapper, {
@@ -19,11 +19,6 @@ function useBubbleTemplate(options) {
19
19
  t
20
20
  } = useLocale();
21
21
  const formBubbleData = ref();
22
- provide(formBubbleContextSymbol, {
23
- setFormBubbleData(data) {
24
- formBubbleData.value = data;
25
- }
26
- });
27
22
  const visible = useTwoWayBinding(props, emit, "modelValue");
28
23
  let closeType = null;
29
24
  const cancel = () => {
@@ -66,6 +61,12 @@ function useBubbleTemplate(options) {
66
61
  closeType = null;
67
62
  emit("closed");
68
63
  };
64
+ provide(formBubbleContextSymbol, {
65
+ setFormBubbleData(data) {
66
+ formBubbleData.value = data;
67
+ },
68
+ confirm
69
+ });
69
70
  const buttonTemplate = defineTemplate(() => {
70
71
  let _slot, _slot2;
71
72
  return !formBubbleData.value?.readonly && createVNode("div", null, [slots.button ? slots.button({
@@ -66,6 +66,10 @@ var stdin_default = defineComponent({
66
66
  onSuccess(res) {
67
67
  tableData.value = (tableKeys.list ? get(res, tableKeys.list) : res) || [];
68
68
  total.value = +get(res, tableKeys.total) || 0;
69
+ const el = document.querySelector(`.${popperId} .el-scrollbar__wrap`);
70
+ if (el) {
71
+ el.scrollTop = 0;
72
+ }
69
73
  },
70
74
  onFinally() {
71
75
  isFirstFetch.value = false;
@@ -20,17 +20,15 @@ var stdin_default = getSimpleStyleHook("CoUpload", (token) => {
20
20
  },
21
21
  [`${componentCls}-item`]: {
22
22
  ...getMediaCardStyle(token),
23
- border: void 0,
23
+ border: "",
24
24
  "&.is-small, &.is-mini": {
25
25
  [`${componentCls}-actions`]: {
26
26
  flexDirection: "column"
27
27
  }
28
28
  },
29
- "&.is-mini": {
30
- [`${componentCls}-actions`]: {
31
- button: {
32
- fontSize: 10
33
- }
29
+ [`&.is-mini ${componentCls}-actions`]: {
30
+ button: {
31
+ fontSize: 10
34
32
  }
35
33
  }
36
34
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.10.19",
3
+ "version": "0.10.21",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",