Merge branch 'fanpeng' into 'develop'
Fanpeng See merge request StarlockTeam/starwork-uniapp!2
This commit is contained in:
commit
2245cefc67
@ -58,6 +58,10 @@
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/application-list/application-list",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "pages/code/code",
|
||||
"type": "page",
|
||||
@ -74,10 +78,6 @@
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/CustomTab",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"type": "page",
|
||||
|
||||
7
src/pages/application-list/application-list.vue
Normal file
7
src/pages/application-list/application-list.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<view></view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -1,6 +1,18 @@
|
||||
<template>
|
||||
<view class="m-2 p-2 bg-white rounded-2">
|
||||
<wd-tabs v-model="tab" auto-line-width swipeable animated>
|
||||
<view class="m-2 p-2 bg-white rounded-2 pos-relative">
|
||||
<image
|
||||
@click="clickMenu"
|
||||
src="/static/images/icon_table_menu.png"
|
||||
class="w-6 h-6 pos-absolute right-1 top-3 p-1 z-10"
|
||||
></image>
|
||||
<wd-tabs
|
||||
v-model="tab"
|
||||
auto-line-width
|
||||
swipeable
|
||||
animated
|
||||
color="#0d100e"
|
||||
inactiveColor="#838383"
|
||||
>
|
||||
<wd-tab v-for="(item, index) in list" :key="index" :title="item.title" :name="index">
|
||||
<view class="flex flex-wrap">
|
||||
<view
|
||||
@ -19,13 +31,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
options: {
|
||||
styleIsolation: 'shared'
|
||||
}
|
||||
})
|
||||
|
||||
const tab = ref<number>(0)
|
||||
|
||||
const props = defineProps({
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
list: {
|
||||
type: Array<HomeTab>,
|
||||
required: true
|
||||
@ -34,11 +48,19 @@
|
||||
|
||||
const emits = defineEmits(['clickItem'])
|
||||
|
||||
onMounted(() => {
|
||||
tab.value = props.index
|
||||
})
|
||||
const clickMenu = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application-list/application-list'
|
||||
})
|
||||
}
|
||||
|
||||
const clickItem = (item: HomeTabItem) => {
|
||||
emits('clickItem', item)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
:deep(.wd-tabs__nav--wrap) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -9,9 +9,8 @@
|
||||
<template>
|
||||
<view class="custom-bg-default">
|
||||
<TopNavigation :title="appName"></TopNavigation>
|
||||
<TopNavigation mini :title="appName"></TopNavigation>
|
||||
<button class="mt-12" @click="toLogin">去登录</button>
|
||||
<CustomTab class="mt-10" :list="featuresList" :index="2" @clickItem="clickItem"></CustomTab>
|
||||
<CustomTab class="mt-10" :list="featuresList" @clickItem="clickItem"></CustomTab>
|
||||
<view class="pt-10">
|
||||
<CustomTabBar :list="list" :default-index="1" @change="change"></CustomTabBar>
|
||||
</view>
|
||||
|
||||
BIN
src/static/images/bg_table.png
Normal file
BIN
src/static/images/bg_table.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 513 B |
BIN
src/static/images/icon_table_menu.png
Normal file
BIN
src/static/images/icon_table_menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
2
src/types/uni-pages.d.ts
vendored
2
src/types/uni-pages.d.ts
vendored
@ -5,9 +5,9 @@
|
||||
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/home/home" |
|
||||
"/pages/application-list/application-list" |
|
||||
"/pages/code/code" |
|
||||
"/pages/get-code/get-code" |
|
||||
"/pages/home/CustomTab" |
|
||||
"/pages/login/login" |
|
||||
"/pages/mine/mine" |
|
||||
"/pages/notification/notification" |
|
||||
|
||||
@ -52,7 +52,7 @@ export default ({ command, mode }) => {
|
||||
|
||||
plugins: [
|
||||
UniPages({
|
||||
exclude: ['**/components/**/**.*'],
|
||||
exclude: ['**/**/[A-Z][a-zA-Z0-9]*.*'],
|
||||
routeBlockLang: 'json5', // 虽然设了默认值,但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
|
||||
// homePage 通过 vue 文件的 route-block 的type="home"来设定
|
||||
// pages 目录为 src/pages,分包目录不能配置在pages目录下
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user