init component
This commit is contained in:
1
node_modules/buetify/lib/composables/labelId/index.d.ts
generated
vendored
Executable file
1
node_modules/buetify/lib/composables/labelId/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export * from './useLabelId';
|
||||
2
node_modules/buetify/lib/composables/labelId/index.js
generated
vendored
Executable file
2
node_modules/buetify/lib/composables/labelId/index.js
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export * from './useLabelId';
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/composables/labelId/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/composables/labelId/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/composables/labelId/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAd","sourcesContent":["export * from './useLabelId';\n"],"sourceRoot":"","file":"index.js"}
|
||||
14
node_modules/buetify/lib/composables/labelId/useLabelId.d.ts
generated
vendored
Executable file
14
node_modules/buetify/lib/composables/labelId/useLabelId.d.ts
generated
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
import { PropType, ExtractPropTypes } from 'vue';
|
||||
export declare const UseLabelIdPropsDefinition: {
|
||||
labelFor: PropType<string>;
|
||||
label: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
};
|
||||
export declare type UseLabelIdProps = ExtractPropTypes<typeof UseLabelIdPropsDefinition>;
|
||||
export declare function useLabelId(props: UseLabelIdProps, prefix: string): {
|
||||
id: import("vue").ComputedRef<string>;
|
||||
labelId: import("vue").ComputedRef<string>;
|
||||
label: import("vue").Ref<string>;
|
||||
};
|
||||
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
|
||||
1
node_modules/buetify/lib/composables/labelId/useLabelId.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/composables/labelId/useLabelId.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/composables/labelId/useLabelId.ts"],"names":[],"mappings":"AAAA,SAAqC,QAArC,EAA+C,KAA/C,QAA4D,KAA5D;AAEA,IAAI,KAAK,GAAG,CAAZ;AAEA,OAAO,MAAM,yBAAyB,GAAG;AACvC,EAAA,QAAQ,EAAE,MAD6B;AAEvC,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,EAAE,MADD;AAEL,IAAA,OAAO,EAAE;AAFJ;AAFgC,CAAlC;AAUP,OAAM,SAAU,UAAV,CAAqB,KAArB,EAA6C,MAA7C,EAA2D;AAC/D,QAAM,KAAK,GAAG,KAAK,EAAnB;AACA,QAAM,EAAE,GAAG,QAAQ,CAAC,MAAO,KAAK,CAAC,QAAN,GAAiB,KAAK,CAAC,QAAvB,GAAkC,GAAG,MAAM,IAAI,KAAK,EAA5D,CAAnB;AACA,QAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,aAAa,EAAE,CAAC,KAAK,EAA5B,CAAxB;AACA,SAAO;AACL,IAAA,EADK;AAEL,IAAA,OAFK;AAGL,IAAA,KAAK,EAAE,KAAK,CAAC,KAAD,EAAQ,OAAR;AAHP,GAAP;AAKD","sourcesContent":["import { PropType, ExtractPropTypes, computed, toRef } from 'vue';\n\nlet numId = 0;\n\nexport const UseLabelIdPropsDefinition = {\n labelFor: String as PropType<string>,\n label: {\n type: String as PropType<string>,\n default: ''\n }\n};\n\nexport type UseLabelIdProps = ExtractPropTypes<typeof UseLabelIdPropsDefinition>;\n\nexport function useLabelId(props: UseLabelIdProps, prefix: string) {\n const newId = numId++;\n const id = computed(() => (props.labelFor ? props.labelFor : `${prefix}-${newId}`));\n const labelId = computed(() => `label-for-${id.value}`);\n return {\n id,\n labelId,\n label: toRef(props, 'label')\n };\n}\n"],"sourceRoot":"","file":"useLabelId.js"}
|
||||
Reference in New Issue
Block a user