You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.0 KiB
JavaScript
50 lines
1.0 KiB
JavaScript
// SCRIPT
|
|
// const tab_active = ref('hospital')
|
|
const tab_active = ref('combo')
|
|
const tabClick = (type, jump = false) => {
|
|
if (tab_active.value != type) {
|
|
tab_active.value = type
|
|
}
|
|
if (!!jump) {
|
|
window.location.href = '#hospital'
|
|
}
|
|
}
|
|
const qrcode_show = ref(false)
|
|
const qrcode_url = ref('')
|
|
const showQrcodeClick = (content) => {
|
|
qrcode_show.value = true
|
|
qrcode_url.value = content
|
|
}
|
|
const qrcodeCreate = () => {
|
|
let typeNumber = 10;
|
|
let errorCorrectionLevel = 'L';
|
|
let qr = qrcode(typeNumber, errorCorrectionLevel);
|
|
qr.addData(qrcode_url.value);
|
|
qr.make();
|
|
qrcode_ref.value.innerHTML = qr.createImgTag();
|
|
}
|
|
const qrcode_ref = ref(null)
|
|
const qrcodeRef = (e) => {
|
|
if (!!qrcode_ref.value) return
|
|
qrcode_ref.value = e
|
|
qrcodeCreate()
|
|
}
|
|
// SCRIPT END
|
|
// MOUNTED
|
|
|
|
// MOUNTED END
|
|
// RETURN
|
|
const ret_ = {
|
|
qrcodeRef,
|
|
qrcode_show,
|
|
showQrcodeClick,
|
|
tabClick,
|
|
tab_active,
|
|
}
|
|
// RETURN END
|
|
// OPTIONS
|
|
const opt = (g) => {
|
|
return {}
|
|
}
|
|
// OPTIONS END
|