@jari-ace/element-plus-component 0.4.4 → 0.5.0
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/dist/components/avatar/JaAvatar.vue.d.ts.map +1 -1
- package/dist/components/avatar/JaAvatar.vue.js +4 -2
- package/dist/components/avatar/JaAvatar.vue.js.map +1 -1
- package/dist/components/flowShell/FlowFormShell.vue.d.ts +403 -0
- package/dist/components/flowShell/FlowFormShell.vue.d.ts.map +1 -0
- package/dist/components/flowShell/FlowFormShell.vue.js +671 -0
- package/dist/components/flowShell/FlowFormShell.vue.js.map +1 -0
- package/dist/components/flowShell/index.d.ts +4 -0
- package/dist/components/flowShell/index.d.ts.map +1 -0
- package/dist/components/flowShell/index.js +4 -0
- package/dist/components/flowShell/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/upload/uploader.vue.d.ts.map +1 -1
- package/dist/components/upload/uploader.vue.js +1 -2
- package/dist/components/upload/uploader.vue.js.map +1 -1
- package/dist/components/userPicker/src/JaUserList.vue.d.ts.map +1 -1
- package/dist/components/userPicker/src/JaUserList.vue.js +0 -2
- package/dist/components/userPicker/src/JaUserList.vue.js.map +1 -1
- package/dist/components/userTag/UserInfoTag.vue.d.ts +1 -1
- package/dist/components/userTag/UserInfoTag.vue.d.ts.map +1 -1
- package/dist/components/userTag/UserInfoTag.vue.js +2 -2
- package/dist/components/userTag/UserInfoTag.vue.js.map +1 -1
- package/dist/hooks/useRouteableVisible.d.ts +12 -0
- package/dist/hooks/useRouteableVisible.d.ts.map +1 -0
- package/dist/hooks/useRouteableVisible.js +34 -0
- package/dist/hooks/useRouteableVisible.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.js +10623 -9904
- package/lib/index.umd.cjs +39 -35
- package/package.json +4 -2
- package/packages/components/avatar/JaAvatar.vue +4 -2
- package/packages/components/flowShell/FlowFormShell.vue +628 -0
- package/packages/components/flowShell/index.ts +5 -0
- package/packages/components/index.ts +1 -0
- package/packages/components/upload/uploader.vue +1 -2
- package/packages/components/userPicker/src/JaUserList.vue +0 -1
- package/packages/components/userTag/UserInfoTag.vue +2 -2
- package/packages/hooks/useRouteableVisible.ts +35 -0
- package/packages/index.ts +1 -0
|
@@ -29,7 +29,7 @@ const props = withDefaults(defineProps<{
|
|
|
29
29
|
realm?: string,
|
|
30
30
|
username?: string,
|
|
31
31
|
theme?: keyof typeof themeClass,
|
|
32
|
-
|
|
32
|
+
showAvatarInTag?: boolean,
|
|
33
33
|
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'
|
|
34
34
|
}>(), {
|
|
35
35
|
closable: false,
|
|
@@ -106,7 +106,7 @@ function doUnbookmark() {
|
|
|
106
106
|
<div :class="themeClass[props.theme]">
|
|
107
107
|
<div class="portrait">
|
|
108
108
|
<ja-avatar :size="24" :user-id="userId" :realm="realm"
|
|
109
|
-
:username="username" :has-avatar="
|
|
109
|
+
:username="username" :has-avatar="showAvatarInTag"></ja-avatar>
|
|
110
110
|
</div>
|
|
111
111
|
<div class="user-info">
|
|
112
112
|
{{ fullName }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { computed, ref, type Ref } from 'vue';
|
|
2
|
+
import { useRouter } from 'vue-router';
|
|
3
|
+
/**
|
|
4
|
+
* 支持通过路由控制对话框visible或者通过v-model控制对话框visible
|
|
5
|
+
*
|
|
6
|
+
* @param modelValue 对话框的visible模型变量
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export function useRouteableVisible(modelValue: Ref<boolean | undefined>) {
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
|
|
12
|
+
// Use internal state if modelValue is not provided (route mode)
|
|
13
|
+
const internalVisible = ref(true);
|
|
14
|
+
const isRouteMode = computed(() => modelValue.value === undefined);
|
|
15
|
+
|
|
16
|
+
const visible = computed({
|
|
17
|
+
get: () => (isRouteMode.value ? internalVisible.value : modelValue.value!),
|
|
18
|
+
set: (val) => {
|
|
19
|
+
if (isRouteMode.value) {
|
|
20
|
+
internalVisible.value = val;
|
|
21
|
+
if (!val) {
|
|
22
|
+
// If closed in route mode, go back
|
|
23
|
+
router.back();
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
modelValue.value = val;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
visible,
|
|
33
|
+
isRouteMode,
|
|
34
|
+
};
|
|
35
|
+
}
|
package/packages/index.ts
CHANGED