Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
<script setup lang="ts">
import { ref } from 'vue';
const state = ref<'sun' | 'moon'>('sun');
function toggleState() {
state.value = state.value === 'sun' ? 'moon' : 'sun';
}
</script>
<template>
<div @click="toggleState">
<span v-if="state === 'sun'">🌞</span>
<span v-if="state === 'moon'">🌚</span>
</div>
</template>