init component
This commit is contained in:
20
node_modules/buetify/lib/composables/labelId/useLabelId.js
generated
vendored
Executable file
20
node_modules/buetify/lib/composables/labelId/useLabelId.js
generated
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
import { computed, toRef } from 'vue';
|
||||
let numId = 0;
|
||||
export const UseLabelIdPropsDefinition = {
|
||||
labelFor: String,
|
||||
label: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
};
|
||||
export function useLabelId(props, prefix) {
|
||||
const newId = numId++;
|
||||
const id = computed(() => props.labelFor ? props.labelFor : `${prefix}-${newId}`);
|
||||
const labelId = computed(() => `label-for-${id.value}`);
|
||||
return {
|
||||
id,
|
||||
labelId,
|
||||
label: toRef(props, 'label')
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=useLabelId.js.map
|
||||
Reference in New Issue
Block a user