@data-fair/lib-vuetify 1.1.0 → 1.1.1
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/package.json +1 -1
- package/tutorial-alert.vue +11 -10
- package/tutorial-alert.vue.d.ts +5 -0
- package/tutorial-alert.vue.js +16 -15
package/package.json
CHANGED
package/tutorial-alert.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
v-if="href"
|
|
19
19
|
:href="href"
|
|
20
20
|
target="_blank"
|
|
21
|
-
>{{ text ||
|
|
21
|
+
>{{ text || t('readDoc') }}</a>
|
|
22
22
|
<template v-else>
|
|
23
23
|
<span
|
|
24
24
|
v-if="text"
|
|
@@ -37,15 +37,11 @@
|
|
|
37
37
|
icon
|
|
38
38
|
density="compact"
|
|
39
39
|
color="success"
|
|
40
|
-
:title="show ?
|
|
40
|
+
:title="show ? t('closeHelp') : t('readHelp')"
|
|
41
41
|
@click="show = !show"
|
|
42
42
|
>
|
|
43
|
-
<v-icon v-if="show"
|
|
44
|
-
|
|
45
|
-
</v-icon>
|
|
46
|
-
<v-icon v-else>
|
|
47
|
-
mdi-information
|
|
48
|
-
</v-icon>
|
|
43
|
+
<v-icon v-if="show":icon="mdiCloseCircle" />
|
|
44
|
+
<v-icon v-else :icon="mdiInformation" />
|
|
49
45
|
</v-btn>
|
|
50
46
|
</div>
|
|
51
47
|
</template>
|
|
@@ -63,6 +59,8 @@ en:
|
|
|
63
59
|
|
|
64
60
|
<script lang="ts">
|
|
65
61
|
import { useTheme } from 'vuetify'
|
|
62
|
+
import { useI18n } from 'vue-i18n'
|
|
63
|
+
import { mdiCloseCircle, mdiInformation } from '@mdi/js'
|
|
66
64
|
|
|
67
65
|
export default {
|
|
68
66
|
props: {
|
|
@@ -75,10 +73,13 @@ export default {
|
|
|
75
73
|
},
|
|
76
74
|
setup () {
|
|
77
75
|
const theme = useTheme()
|
|
78
|
-
|
|
76
|
+
const { t } = useI18n({ useScope: 'local' })
|
|
77
|
+
return { theme, t }
|
|
79
78
|
},
|
|
80
79
|
data: () => ({
|
|
81
|
-
show: false
|
|
80
|
+
show: false,
|
|
81
|
+
mdiCloseCircle,
|
|
82
|
+
mdiInformation
|
|
82
83
|
}),
|
|
83
84
|
computed: {
|
|
84
85
|
showBtn () {
|
package/tutorial-alert.vue.d.ts
CHANGED
|
@@ -28,8 +28,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
28
|
};
|
|
29
29
|
}>, {
|
|
30
30
|
theme: import("vuetify", { with: { "resolution-mode": "import" } }).ThemeInstance;
|
|
31
|
+
t: import("vue-i18n").ComposerTranslation<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
32
|
+
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
33
|
+
}>, never, never, never>;
|
|
31
34
|
}, {
|
|
32
35
|
show: boolean;
|
|
36
|
+
mdiCloseCircle: string;
|
|
37
|
+
mdiInformation: string;
|
|
33
38
|
}, {
|
|
34
39
|
showBtn(): boolean;
|
|
35
40
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
package/tutorial-alert.vue.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
|
|
2
2
|
import { useTheme } from 'vuetify';
|
|
3
|
+
import { useI18n } from 'vue-i18n';
|
|
4
|
+
import { mdiCloseCircle, mdiInformation } from '@mdi/js';
|
|
3
5
|
export default (await import('vue')).defineComponent({
|
|
4
6
|
props: {
|
|
5
7
|
id: { type: String, required: true },
|
|
@@ -11,10 +13,13 @@ export default (await import('vue')).defineComponent({
|
|
|
11
13
|
},
|
|
12
14
|
setup() {
|
|
13
15
|
const theme = useTheme();
|
|
14
|
-
|
|
16
|
+
const { t } = useI18n({ useScope: 'local' });
|
|
17
|
+
return { theme, t };
|
|
15
18
|
},
|
|
16
19
|
data: () => ({
|
|
17
|
-
show: false
|
|
20
|
+
show: false,
|
|
21
|
+
mdiCloseCircle,
|
|
22
|
+
mdiInformation
|
|
18
23
|
}),
|
|
19
24
|
computed: {
|
|
20
25
|
showBtn() {
|
|
@@ -61,7 +66,7 @@ function __VLS_template() {
|
|
|
61
66
|
var __VLS_6 = {};
|
|
62
67
|
if (__VLS_ctx.href) {
|
|
63
68
|
__VLS_elementAsFunction(__VLS_intrinsicElements.a, __VLS_intrinsicElements.a)({ href: ((__VLS_ctx.href)), target: ("_blank"), });
|
|
64
|
-
(__VLS_ctx.text || __VLS_ctx
|
|
69
|
+
(__VLS_ctx.text || __VLS_ctx.t('readDoc'));
|
|
65
70
|
}
|
|
66
71
|
else {
|
|
67
72
|
if (__VLS_ctx.text) {
|
|
@@ -81,8 +86,8 @@ function __VLS_template() {
|
|
|
81
86
|
const __VLS_7 = __VLS_resolvedLocalAndGlobalComponents.VBtn;
|
|
82
87
|
/** @type { [typeof __VLS_components.VBtn, typeof __VLS_components.vBtn, typeof __VLS_components.VBtn, typeof __VLS_components.vBtn, ] } */
|
|
83
88
|
// @ts-ignore
|
|
84
|
-
const __VLS_8 = __VLS_asFunctionalComponent(__VLS_7, new __VLS_7({ ...{ 'onClick': {} }, ...{ class: ("toggle") }, icon: (true), density: ("compact"), color: ("success"), title: ((__VLS_ctx.show ? __VLS_ctx
|
|
85
|
-
const __VLS_9 = __VLS_8({ ...{ 'onClick': {} }, ...{ class: ("toggle") }, icon: (true), density: ("compact"), color: ("success"), title: ((__VLS_ctx.show ? __VLS_ctx
|
|
89
|
+
const __VLS_8 = __VLS_asFunctionalComponent(__VLS_7, new __VLS_7({ ...{ 'onClick': {} }, ...{ class: ("toggle") }, icon: (true), density: ("compact"), color: ("success"), title: ((__VLS_ctx.show ? __VLS_ctx.t('closeHelp') : __VLS_ctx.t('readHelp'))), }));
|
|
90
|
+
const __VLS_9 = __VLS_8({ ...{ 'onClick': {} }, ...{ class: ("toggle") }, icon: (true), density: ("compact"), color: ("success"), title: ((__VLS_ctx.show ? __VLS_ctx.t('closeHelp') : __VLS_ctx.t('readHelp'))), }, ...__VLS_functionalComponentArgsRest(__VLS_8));
|
|
86
91
|
let __VLS_13;
|
|
87
92
|
const __VLS_14 = {
|
|
88
93
|
onClick: (...[$event]) => {
|
|
@@ -97,21 +102,17 @@ function __VLS_template() {
|
|
|
97
102
|
let __VLS_11;
|
|
98
103
|
if (__VLS_ctx.show) {
|
|
99
104
|
const __VLS_15 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
|
|
100
|
-
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon,
|
|
105
|
+
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
|
|
101
106
|
// @ts-ignore
|
|
102
|
-
const __VLS_16 = __VLS_asFunctionalComponent(__VLS_15, new __VLS_15({}));
|
|
103
|
-
const __VLS_17 = __VLS_16({}, ...__VLS_functionalComponentArgsRest(__VLS_16));
|
|
104
|
-
__VLS_nonNullable(__VLS_20.slots).default;
|
|
105
|
-
const __VLS_20 = __VLS_pickFunctionalComponentCtx(__VLS_15, __VLS_17);
|
|
107
|
+
const __VLS_16 = __VLS_asFunctionalComponent(__VLS_15, new __VLS_15({ icon: ((__VLS_ctx.mdiCloseCircle)), }));
|
|
108
|
+
const __VLS_17 = __VLS_16({ icon: ((__VLS_ctx.mdiCloseCircle)), }, ...__VLS_functionalComponentArgsRest(__VLS_16));
|
|
106
109
|
}
|
|
107
110
|
else {
|
|
108
111
|
const __VLS_21 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
|
|
109
|
-
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon,
|
|
112
|
+
/** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
|
|
110
113
|
// @ts-ignore
|
|
111
|
-
const __VLS_22 = __VLS_asFunctionalComponent(__VLS_21, new __VLS_21({}));
|
|
112
|
-
const __VLS_23 = __VLS_22({}, ...__VLS_functionalComponentArgsRest(__VLS_22));
|
|
113
|
-
__VLS_nonNullable(__VLS_26.slots).default;
|
|
114
|
-
const __VLS_26 = __VLS_pickFunctionalComponentCtx(__VLS_21, __VLS_23);
|
|
114
|
+
const __VLS_22 = __VLS_asFunctionalComponent(__VLS_21, new __VLS_21({ icon: ((__VLS_ctx.mdiInformation)), }));
|
|
115
|
+
const __VLS_23 = __VLS_22({ icon: ((__VLS_ctx.mdiInformation)), }, ...__VLS_functionalComponentArgsRest(__VLS_22));
|
|
115
116
|
}
|
|
116
117
|
__VLS_nonNullable(__VLS_12.slots).default;
|
|
117
118
|
const __VLS_12 = __VLS_pickFunctionalComponentCtx(__VLS_7, __VLS_9);
|