cosey 0.11.3 → 0.11.4
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 +10 -1
- package/package.json +1 -1
- package/store/layout.d.ts +1 -1
- package/store/user.d.ts +2 -2
package/components/form/form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, reactive, toRef, createVNode, mergeProps, Fragment, isVNode } from 'vue';
|
|
1
|
+
import { defineComponent, inject, reactive, toRef, ref, watch, createVNode, mergeProps, Fragment, isVNode } from 'vue';
|
|
2
2
|
import { formEmits, formSlots, formProps, formBubbleContextSymbol } from './form.api.js';
|
|
3
3
|
import { ElForm, ElButton } from 'element-plus';
|
|
4
4
|
import { useFormTemplate } from './useFormTemplate.js';
|
|
@@ -6,6 +6,7 @@ import { Row as _Row } from '../row/index.js';
|
|
|
6
6
|
import { OptionalWrapper as _OptionalWrapper } from '../optional-wrapper/index.js';
|
|
7
7
|
import stdin_default$2 from './form-item.vue.js';
|
|
8
8
|
import stdin_default$1 from './form.style.js';
|
|
9
|
+
import { useLayoutStore } from '../../store/layout.js';
|
|
9
10
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
10
11
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
11
12
|
|
|
@@ -48,11 +49,19 @@ var stdin_default = defineComponent({
|
|
|
48
49
|
clearValidate,
|
|
49
50
|
submit
|
|
50
51
|
}));
|
|
52
|
+
const innerInline = ref(props.inline);
|
|
53
|
+
const layoutStore = useLayoutStore();
|
|
54
|
+
watch(() => layoutStore.isMobile, isMobile => {
|
|
55
|
+
innerInline.value = isMobile ? false : props.inline;
|
|
56
|
+
}, {
|
|
57
|
+
immediate: true
|
|
58
|
+
});
|
|
51
59
|
_expose(expose);
|
|
52
60
|
return () => {
|
|
53
61
|
return createVNode(ElForm, mergeProps({
|
|
54
62
|
"ref": "form"
|
|
55
63
|
}, elFormProps, {
|
|
64
|
+
"inline": innerInline.value,
|
|
56
65
|
"class": [hashId.value, prefixCls.value]
|
|
57
66
|
}, {
|
|
58
67
|
onSubmit: event => {
|
package/package.json
CHANGED
package/store/layout.d.ts
CHANGED
|
@@ -273,4 +273,4 @@ export declare const useOuterLayoutStore: (hot?: StoreGeneric) => import("pinia"
|
|
|
273
273
|
changePassword: (data: any) => Promise<void>;
|
|
274
274
|
logout: (lastPath?: string, flushOnly?: boolean) => Promise<void>;
|
|
275
275
|
flush: (lastPath?: string) => Promise<void>;
|
|
276
|
-
}, "changePassword" | "login" | "logout" | "
|
|
276
|
+
}, "changePassword" | "login" | "logout" | "initializeData" | "flush">>;
|
package/store/user.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
31
31
|
changePassword: (data: any) => Promise<void>;
|
|
32
32
|
logout: (lastPath?: string, flushOnly?: boolean) => Promise<void>;
|
|
33
33
|
flush: (lastPath?: string) => Promise<void>;
|
|
34
|
-
}, "changePassword" | "login" | "logout" | "
|
|
34
|
+
}, "changePassword" | "login" | "logout" | "initializeData" | "flush">>;
|
|
35
35
|
export declare const useOuterUserStore: (hot?: StoreGeneric) => import("pinia").Store<"cosey-user", Pick<{
|
|
36
36
|
dynamicRoutes: import("vue").ShallowRef<any[], any[]>;
|
|
37
37
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
@@ -59,4 +59,4 @@ export declare const useOuterUserStore: (hot?: StoreGeneric) => import("pinia").
|
|
|
59
59
|
changePassword: (data: any) => Promise<void>;
|
|
60
60
|
logout: (lastPath?: string, flushOnly?: boolean) => Promise<void>;
|
|
61
61
|
flush: (lastPath?: string) => Promise<void>;
|
|
62
|
-
}, "changePassword" | "login" | "logout" | "
|
|
62
|
+
}, "changePassword" | "login" | "logout" | "initializeData" | "flush">>;
|