by skiyee

UniApp 增强型工程框架

提供 自动路由智能布局根上下文甄选依赖工程约定 以及 一站式团队服务, 减少项目维护成本,实现团队高效协作,加速项目上线。
src/App.vue
<script setup>
import { ref, onLaunch } from '@skiyee/oiyo/runtime'

const { title, count, increment } = defineRootContext(() => {
  const title = ref('Hello Oiyo')
  const count = ref(1)

  function increment() {
    count.value += 1
  }

  return { title, count, increment }
})

onLaunch(() => {
  console.log('App Launch, title: 321', count.value)
})
</script>

<template>
  <OiyoLayout>
    <view>
      <text>{{ title }}: +{{ count }}</text>
      <button @click="increment">+1</button>
    </view>
    
    <OiyoPage />
  </OiyoLayout>

  <UIModal />
</template>