vueless 0.0.56 → 0.0.58
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.
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import tippy from "tippy.js";
|
|
2
|
+
import merge from "lodash.merge";
|
|
2
3
|
|
|
3
|
-
import vuelessConfig from "
|
|
4
|
+
import vuelessConfig from "../../../vueless.config.js";
|
|
4
5
|
|
|
5
6
|
import "tippy.js/dist/tippy.css";
|
|
6
7
|
import "tippy.js/themes/light.css";
|
|
7
8
|
import "tippy.js/animations/shift-away.css";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
const globalSettings = vuelessConfig?.directive?.tooltip || {};
|
|
11
|
+
const defaultSettings = {
|
|
12
|
+
arrow: true,
|
|
13
|
+
theme: "light",
|
|
14
|
+
animation: "shift-away",
|
|
15
|
+
};
|
|
16
|
+
const mergedSettings = merge(defaultSettings, globalSettings);
|
|
17
|
+
|
|
18
|
+
tippy.setDefaultProps(mergedSettings);
|
|
10
19
|
|
|
11
20
|
export default {
|
|
12
21
|
mounted(el, bindings) {
|
|
13
|
-
tippy(el, bindings.value);
|
|
22
|
+
tippy(el, merge(mergedSettings, bindings.value || {}));
|
|
14
23
|
},
|
|
15
24
|
updated(el, bindings) {
|
|
16
25
|
if (!el._tippy) return;
|
|
17
26
|
|
|
18
|
-
el._tippy.setProps(bindings);
|
|
27
|
+
el._tippy.setProps(merge(mergedSettings, bindings.value || {}));
|
|
19
28
|
},
|
|
20
29
|
unmounted(el) {
|
|
21
30
|
if (!el._tippy) return;
|
package/package.json
CHANGED
package/ui.image-icon/index.vue
CHANGED
|
@@ -21,6 +21,8 @@ import { UIcon } from "./constants";
|
|
|
21
21
|
import defaultConfig from "./configs/default.config";
|
|
22
22
|
import { useAttrs } from "./composables/attrs.composable";
|
|
23
23
|
|
|
24
|
+
import vTooltip from "../directive.tooltip";
|
|
25
|
+
|
|
24
26
|
/* Should be a string for correct web-types gen */
|
|
25
27
|
defineOptions({
|
|
26
28
|
name: "UIcon",
|
|
@@ -31,9 +31,15 @@ export default /*tw*/ {
|
|
|
31
31
|
long: 12000,
|
|
32
32
|
},
|
|
33
33
|
i18n: {
|
|
34
|
-
success:
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
success: {
|
|
35
|
+
default: "Operation successful.",
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
default: "Operation warning.",
|
|
39
|
+
},
|
|
40
|
+
error: {
|
|
41
|
+
default: "Operation error.",
|
|
42
|
+
},
|
|
37
43
|
},
|
|
38
44
|
positionClasses: {
|
|
39
45
|
page: "UNotifyPage",
|
package/ui.notify/index.vue
CHANGED
|
@@ -211,7 +211,7 @@ function setPosition() {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
function getText(notificationText, type) {
|
|
214
|
-
return notificationText || currentLocale.value[type];
|
|
214
|
+
return notificationText || currentLocale.value[type]?.default;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
function getNotificationClasses(notification) {
|