vueless 0.0.733 → 0.0.734
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/composables/useUI.ts +7 -2
- package/package.json +1 -1
- package/types.ts +1 -0
package/composables/useUI.ts
CHANGED
|
@@ -149,6 +149,7 @@ export default function useUI<T>(
|
|
|
149
149
|
|
|
150
150
|
const commonAttrs: KeyAttrs = {
|
|
151
151
|
...(isTopLevelKey ? attrs : {}),
|
|
152
|
+
"data-vl-root": isTopLevelKey || null,
|
|
152
153
|
"data-vl-child": attrs["data-vl-child"] ? null : true,
|
|
153
154
|
"vl-component": isDev ? attrs["vl-component"] || componentName || null : null,
|
|
154
155
|
"vl-key": isDev ? attrs["vl-key"] || configKey || null : null,
|
|
@@ -156,11 +157,15 @@ export default function useUI<T>(
|
|
|
156
157
|
"vl-child-key": isDev && attrs["vl-component"] ? configKey : null,
|
|
157
158
|
};
|
|
158
159
|
|
|
159
|
-
const topLevelClasses = (!attrs["data-vl-child"] && commonAttrs.class) || "";
|
|
160
|
-
|
|
161
160
|
/* Delete value key to prevent v-model overwrite. */
|
|
162
161
|
delete commonAttrs.value;
|
|
163
162
|
|
|
163
|
+
let topLevelClasses;
|
|
164
|
+
|
|
165
|
+
if (!commonAttrs["data-vl-child"] && !attrs["data-vl-root"]) {
|
|
166
|
+
topLevelClasses = commonAttrs.class || "";
|
|
167
|
+
}
|
|
168
|
+
|
|
164
169
|
vuelessAttrs.value = {
|
|
165
170
|
...commonAttrs,
|
|
166
171
|
class: cx([...extendsClasses, toValue(classes), topLevelClasses]),
|
package/package.json
CHANGED
package/types.ts
CHANGED