fix: if emoji is not set set random emoji

This commit is contained in:
Shariq Ansari 2024-05-20 18:06:21 +05:30
parent 51c5af1f64
commit fa93cacd9e

View File

@ -66,7 +66,7 @@
<script setup> <script setup>
import { gemoji } from 'gemoji' import { gemoji } from 'gemoji'
import { Popover } from 'frappe-ui' import { Popover } from 'frappe-ui'
import { ref, computed } from 'vue' import { ref, computed, onMounted } from 'vue'
const search = ref('') const search = ref('')
const emoji = defineModel() const emoji = defineModel()
@ -109,5 +109,9 @@ function randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min) return Math.floor(Math.random() * (max - min + 1) + min)
} }
onMounted(() => {
if (!emoji.value) setRandom()
})
defineExpose({ setRandom }) defineExpose({ setRandom })
</script> </script>