@hostlink/nuxt-light 1.21.11 → 1.21.12
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/module.json +1 -1
- package/dist/runtime/light.js +12 -17
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/runtime/light.js
CHANGED
|
@@ -31,7 +31,6 @@ const COLOR_CODE = {
|
|
|
31
31
|
warning: "#ff9f43",
|
|
32
32
|
dark: "#4b4b4b"
|
|
33
33
|
};
|
|
34
|
-
let styles = {};
|
|
35
34
|
const light = reactive({
|
|
36
35
|
styles: {
|
|
37
36
|
table: {
|
|
@@ -46,8 +45,8 @@ const light = reactive({
|
|
|
46
45
|
square: false
|
|
47
46
|
},
|
|
48
47
|
button: {
|
|
49
|
-
outline:
|
|
50
|
-
rounded:
|
|
48
|
+
outline: false,
|
|
49
|
+
rounded: false,
|
|
51
50
|
unelevated: false,
|
|
52
51
|
dense: false
|
|
53
52
|
},
|
|
@@ -56,7 +55,7 @@ const light = reactive({
|
|
|
56
55
|
outlined: true,
|
|
57
56
|
standout: false,
|
|
58
57
|
rounded: false,
|
|
59
|
-
dense:
|
|
58
|
+
dense: false,
|
|
60
59
|
square: false,
|
|
61
60
|
stackLabel: true
|
|
62
61
|
}
|
|
@@ -189,7 +188,7 @@ const light = reactive({
|
|
|
189
188
|
name,
|
|
190
189
|
value
|
|
191
190
|
});
|
|
192
|
-
styles[name] = value;
|
|
191
|
+
light.styles[name] = value;
|
|
193
192
|
},
|
|
194
193
|
setCurrentRoute(to) {
|
|
195
194
|
currentRoute = to;
|
|
@@ -202,22 +201,18 @@ const light = reactive({
|
|
|
202
201
|
const keyname = parts[1];
|
|
203
202
|
return parseInt(currentRoute.params[keyname]);
|
|
204
203
|
},
|
|
205
|
-
init(
|
|
206
|
-
light.color =
|
|
207
|
-
light.theme =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
light.styles = styles2;
|
|
204
|
+
init(styles) {
|
|
205
|
+
light.color = styles.color || "primary";
|
|
206
|
+
light.theme = styles.theme || "semi-dark";
|
|
207
|
+
light.styles.input = { ...light.styles.input, ...styles.input || {} };
|
|
208
|
+
light.styles.card = { ...light.styles.card, ...styles.card || {} };
|
|
209
|
+
light.styles.button = { ...light.styles.button, ...styles.button || {} };
|
|
210
|
+
light.styles.table = { ...light.styles.table, ...styles.table || {} };
|
|
213
211
|
watch(() => light.theme, async () => {
|
|
214
212
|
await light.setStyle("theme", light.theme);
|
|
215
213
|
});
|
|
216
214
|
watch(() => light.color, async () => {
|
|
217
|
-
await
|
|
218
|
-
name: "color",
|
|
219
|
-
value: light.color
|
|
220
|
-
});
|
|
215
|
+
await light.setStyle("color", light.color);
|
|
221
216
|
});
|
|
222
217
|
},
|
|
223
218
|
isGranted(right) {
|