feat init
This commit is contained in:
25
src/components/AppFooter.vue
Normal file
25
src/components/AppFooter.vue
Normal 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>
|
||||
29
src/components/AppLogos.vue
Normal file
29
src/components/AppLogos.vue
Normal 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>
|
||||
23
src/components/HiCounter.vue
Normal file
23
src/components/HiCounter.vue
Normal 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>
|
||||
53
src/components/InputEntry.vue
Normal file
53
src/components/InputEntry.vue
Normal 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>
|
||||
Reference in New Issue
Block a user