| Name | Type | Default |
|
backgroundColor
# |
String
|
white
|
Sets the background color of the qrcode element.
<template>
<JqxBarcode ref="myBarcode"
:backgroundColor="'yellow'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
displayLabel
# |
Boolean
|
true
|
Sets whether the qrcode label is visible.
<template>
<JqxBarcode ref="myBarcode"
:displayLabel="true"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelColor
# |
String
|
black
|
Sets the color of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelColor="'red'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelFont
# |
String
|
monospace
|
Sets the font family of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelFont="'monospace'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelFontSize
# |
Number
|
14
|
Sets the font size of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelFontSize="16"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelMarginBottom
# |
Number
|
5
|
Sets the bottom margin of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelMarginBottom="30"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelMarginTop
# |
Number
|
5
|
Sets the top margin of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelMarginTop="30"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
labelPosition
# |
String
|
bottom
|
Sets the position of the qrcode label.
<template>
<JqxBarcode ref="myBarcode"
:labelPosition="'top'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
lineColor
# |
String
|
black
|
Sets the color of the qrcode lines.
<template>
<JqxBarcode ref="myBarcode"
:lineColor="'red'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
lineHeight
# |
Number
|
50
|
Sets the height of the qrcode line.
<template>
<JqxBarcode ref="myBarcode"
:lineHeight="50"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
lineWidth
# |
Number
|
4
|
Sets the width of the qrcode line.
<template>
<JqxBarcode ref="myBarcode"
:lineWidth="7"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
renderAs
# |
String
|
svg
|
Sets the rendering mode of the qrcode.
<template>
<JqxBarcode ref="myBarcode"
:renderAs="'canvas'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
type
# |
String
|
codabar
|
Sets the qrcode type
<template>
<JqxBarcode ref="myBarcode"
:type="'code128a'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
value
# |
String
|
|
Sets or gets the value of the qrcode.
<template>
<JqxBarcode ref="myBarcode"
:value="'example'"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
</script>
|
|
|
|
invalid
# |
Event
|
|
This event is triggered when the value of the qrcode is invalid.
Code examples #
Bind to the invalid event of jqxBarcode.
<template>
<JqxBarcode ref="myBarcode" @invalid="onInvalid($event)"
/>
</template>
<script setup>
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
function onInvalid(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
export
# |
format, fileName
|
None
|
Exports the qrcode.
<template>
<JqxBarcode ref="myBarcode"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
const myBarcode = ref(null);
onMounted(() => {
myBarcode.value.export();
});
</script>
|
|
getDataURL
# |
format
|
String
|
Gets the base64 string of the qrcode
<template>
<JqxBarcode ref="myBarcode"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
const myBarcode = ref(null);
onMounted(() => {
const value = myBarcode.value.getDataURL();
});
</script>
|
|
getDataURLAsync
# |
format
|
Object
|
Gets the base64 string of the qrcode
<template>
<JqxBarcode ref="myBarcode"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
const myBarcode = ref(null);
onMounted(() => {
const value = myBarcode.value.getDataURLAsync();
});
</script>
|
|
isValid
# |
|
Boolean
|
Gets the validity of the qrcode
<template>
<JqxBarcode ref="myBarcode"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxBarcode from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbarcode.vue';
const myBarcode = ref(null);
onMounted(() => {
const value = myBarcode.value.isValid();
});
</script>
|