feat: delete useless files
This commit is contained in:
parent
908f094d33
commit
7a924e6778
@ -1,62 +0,0 @@
|
|||||||
import { onReady } from '@dcloudio/uni-app'
|
|
||||||
import { getIsTabbar } from '@/utils/index'
|
|
||||||
|
|
||||||
export default () => {
|
|
||||||
// 获取页面栈
|
|
||||||
const pages = getCurrentPages()
|
|
||||||
const isTabbar = getIsTabbar()
|
|
||||||
|
|
||||||
// 页面滚动到底部时的操作,通常用于加载更多数据
|
|
||||||
const onScrollToLower = () => {}
|
|
||||||
// 获取屏幕边界到安全区域距离
|
|
||||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
// 基于小程序的 Page 类型扩展 uni-app 的 Page
|
|
||||||
type PageInstance = Page.PageInstance & WechatMiniprogram.Page.InstanceMethods<any>
|
|
||||||
// 获取当前页面实例,数组最后一项
|
|
||||||
const pageInstance = getCurrentPages().at(-1) as PageInstance
|
|
||||||
|
|
||||||
// 页面渲染完毕,绑定动画效果
|
|
||||||
onReady(() => {
|
|
||||||
// 动画效果,导航栏背景色
|
|
||||||
pageInstance.animate(
|
|
||||||
'.fly-navbar',
|
|
||||||
[{ backgroundColor: 'transparent' }, { backgroundColor: '#f8f8f8' }],
|
|
||||||
1000,
|
|
||||||
{
|
|
||||||
scrollSource: '#scroller',
|
|
||||||
timeRange: 1000,
|
|
||||||
startScrollOffset: 0,
|
|
||||||
endScrollOffset: 50,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
// 动画效果,导航栏标题
|
|
||||||
pageInstance.animate(
|
|
||||||
'.fly-navbar .title',
|
|
||||||
[{ color: 'transparent' }, { color: '#000' }],
|
|
||||||
1000,
|
|
||||||
{
|
|
||||||
scrollSource: '#scroller',
|
|
||||||
timeRange: 1000,
|
|
||||||
startScrollOffset: 0,
|
|
||||||
endScrollOffset: 50,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
// 动画效果,导航栏返回按钮
|
|
||||||
pageInstance.animate('.fly-navbar .left-icon', [{ color: '#fff' }, { color: '#000' }], 1000, {
|
|
||||||
scrollSource: '#scroller',
|
|
||||||
timeRange: 1000,
|
|
||||||
startScrollOffset: 0,
|
|
||||||
endScrollOffset: 50,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
return {
|
|
||||||
pages,
|
|
||||||
isTabbar,
|
|
||||||
onScrollToLower,
|
|
||||||
safeAreaInsets,
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
|
||||||
|
|
||||||
export default () => {
|
|
||||||
return {
|
|
||||||
/** 激活“分享给好友” */
|
|
||||||
onShareAppMessage: onShareAppMessage(
|
|
||||||
(options: Page.ShareAppMessageOption): Page.CustomShareContent => {
|
|
||||||
console.log('options:', options)
|
|
||||||
return {
|
|
||||||
title: '自定义分享标题',
|
|
||||||
path: '/pages/index/index?id=xxx',
|
|
||||||
imageUrl:
|
|
||||||
'https://cip-shopping-page-0eysug01066a9e-1302818703.tcloudbaseapp.com/pretty-girl.png',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
/** 激活“分享到朋友圈”, 注意:需要先激活“分享给好友” */
|
|
||||||
onShareTimeline: onShareTimeline((): Page.ShareTimelineContent => {
|
|
||||||
return {
|
|
||||||
title: '自定义分享标题',
|
|
||||||
query: 'a=1&b=2',
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,19 +8,6 @@
|
|||||||
<view class="text-center">
|
<view class="text-center">
|
||||||
<view class="m-8"> http://localhost:9000/#/pages-sub/demo/index </view>
|
<view class="m-8"> http://localhost:9000/#/pages-sub/demo/index </view>
|
||||||
<view class="text-green-500"> 分包页面demo </view>
|
<view class="text-green-500"> 分包页面demo </view>
|
||||||
<view class="test titi">test global css</view>
|
|
||||||
<view class="text-green-500 text-xl mt-10">uvui 引入演示</view>
|
|
||||||
<view class="center my-10">
|
|
||||||
<uv-icon name="photo" class="text-center m-auto"></uv-icon>
|
|
||||||
<uv-icon name="photo" class="text-center m-auto"></uv-icon>
|
|
||||||
<uv-icon name="photo" class="text-center m-auto"></uv-icon>
|
|
||||||
</view>
|
|
||||||
<uv-qrcode
|
|
||||||
ref="qrcode"
|
|
||||||
size="200px"
|
|
||||||
class="m-auto"
|
|
||||||
value="https://gitee.com/codercup/unibest"
|
|
||||||
></uv-qrcode>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
// src/store/useCountStore.ts
|
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
import { ref } from 'vue'
|
|
||||||
|
|
||||||
export const useCountStore = defineStore(
|
|
||||||
'count',
|
|
||||||
() => {
|
|
||||||
const count = ref(0)
|
|
||||||
const increment = () => {
|
|
||||||
count.value++
|
|
||||||
}
|
|
||||||
const decrement = () => {
|
|
||||||
count.value--
|
|
||||||
}
|
|
||||||
const reset = () => {
|
|
||||||
count.value = 0
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
count,
|
|
||||||
decrement,
|
|
||||||
increment,
|
|
||||||
reset,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
persist: true,
|
|
||||||
},
|
|
||||||
)
|
|
@ -1,4 +1,3 @@
|
|||||||
// src/store/index.ts
|
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
|
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
|
||||||
|
|
||||||
@ -16,4 +15,3 @@ export default store
|
|||||||
|
|
||||||
// 模块统一导出
|
// 模块统一导出
|
||||||
export * from './user'
|
export * from './user'
|
||||||
export * from './count'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user