feat(分包): 添加分包页面示例及请求组件

在分包页面中添加请求组件示例,并调整相关页面样式和导航
This commit is contained in:
feige996
2025-08-07 21:11:47 +08:00
parent 2777ee2157
commit 0d794899ee
4 changed files with 68 additions and 3 deletions

View File

@@ -27,6 +27,11 @@ function gotoVueQuery() {
url: '/pages/about/vue-query',
})
}
function gotoSubPage() {
uni.navigateTo({
url: '/pages-sub/demo/index',
})
}
</script>
<template>
@@ -46,6 +51,11 @@ function gotoVueQuery() {
vue-query 示例页面
</button>
</view>
<view class="text-center">
<button type="primary" size="mini" class="w-160px" @click="gotoSubPage">
前往分包页面
</button>
</view>
<view class="mt-6 text-center text-sm">
<view class="inline-block w-80% text-gray-400">
为了方便脚手架动态生成不同UI模板本页的按钮统一使用UI库无关的原生button

View File

@@ -28,7 +28,7 @@ function reset() {
但是 pages/components 里面的 vue 不会
</view>
<view class="my-6 text-center">
<view class="my-4 text-center">
<button type="primary" size="mini" class="w-160px" @click="run">
发送请求
</button>
@@ -46,7 +46,7 @@ function reset() {
</view>
</block>
</view>
<view class="my-6 text-center">
<view class="my-4 text-center">
<button type="warn" size="mini" class="w-160px" :disabled="!data" @click="reset">
重置数据
</button>