cosey 0.10.20 → 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.
package/components/form/form.js
CHANGED
|
@@ -57,7 +57,11 @@ var stdin_default = defineComponent({
|
|
|
57
57
|
}, {
|
|
58
58
|
onSubmit: event => {
|
|
59
59
|
event.preventDefault();
|
|
60
|
-
|
|
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({
|
|
@@ -20,17 +20,15 @@ var stdin_default = getSimpleStyleHook("CoUpload", (token) => {
|
|
|
20
20
|
},
|
|
21
21
|
[`${componentCls}-item`]: {
|
|
22
22
|
...getMediaCardStyle(token),
|
|
23
|
-
border:
|
|
23
|
+
border: "",
|
|
24
24
|
"&.is-small, &.is-mini": {
|
|
25
25
|
[`${componentCls}-actions`]: {
|
|
26
26
|
flexDirection: "column"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fontSize: 10
|
|
33
|
-
}
|
|
29
|
+
[`&.is-mini ${componentCls}-actions`]: {
|
|
30
|
+
button: {
|
|
31
|
+
fontSize: 10
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
},
|