feat init

This commit is contained in:
Ironsp
2026-08-21 11:02:07 +08:00
commit 27c5275d83
44 changed files with 15187 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<script lang="ts" setup>
function handleClickGithub() {
if (window?.open) {
window.open('https://github.com/uni-helper/vitesse-uni-app')
}
else {
uni.showToast({
icon: 'none',
title: '请使用浏览器打开',
})
}
}
</script>
<template>
<view text="xl gray4" m-5 flex items-center justify-center gap-3>
<navigator url="/pages/index" open-type="redirect">
<view i-carbon-campsite />
</navigator>
<view cursor-pointer @click="handleClickGithub">
<view i-carbon:logo-github />
</view>
</view>
</template>

View File

@@ -0,0 +1,29 @@
<template>
<view inline-flex cursor-default text-2xl font-300>
<view
flex
flex-col
items-center
hover-class="drop-shadow-md drop-shadow-color-green5"
>
<image inline-block h-18 w-18 src="/static/logo.svg" />
<text mt--2 text-green5 class="uni-helper-logo__label">
uni-helper
</text>
</view>
<view
text="3xl gray4"
m="x-4 y-auto"
i-carbon-add
transform
transition-all-500
hover:rotate-135
/>
<view flex flex-col hover-class="drop-shadow-md drop-shadow-color-purple5">
<image inline-block h-18 w-18 src="/static/vite.png" />
<text mt--2 text-purple5>
Vite
</text>
</view>
</view>
</template>

View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
const { count, inc, dec } = useCount()
</script>
<template>
<view inline-flex m="y-3">
<view class="btn" @click="dec()">
<text i-carbon-subtract />
</view>
<view font="mono" w="15" m-auto inline-block>
{{ count }}
</view>
<view class="btn" @click="inc()">
<text i-carbon-add />
</view>
</view>
</template>
<style>
.btn {
--at-apply: w-8 h-8 flex items-center justify-center rounded-full bg-teal-600 text-white cursor-pointer;
}
</style>

View File

@@ -0,0 +1,53 @@
<script setup lang="ts">
const name = ref('')
function go() {
if (name.value) {
uni.navigateTo({
url: `/pages/hi?name=${name.value}`,
})
}
}
</script>
<template>
<view>
<view
p="x-4 y-2"
w="250px"
m="t-5 auto"
text="center"
bg="transparent"
border="~ rounded gray-200 dark:gray-700 solid"
outline="none active:none"
box-border
w-full
>
<input
v-model="name"
placeholder="What's your name?"
type="text"
autocomplete="off"
mr-0
w-full
>
</view>
<view>
<button
:disabled="!name"
m="t-3 auto"
m-auto
w-120rpx
rounded
bg-teal-600
px-4
py-1
text-sm
text-white
hover-class="bg-teal-700"
@click="go"
>
GO
</button>
</view>
</view>
</template>