refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范

这个提交包含在:
wikiboss
2026-09-20 17:05:22 +08:00
父节点 de3cf8b870
当前提交 9fa1d1fbd0
共有 1679 个文件被更改,包括 204798 次插入 和 16817 次删除

查看文件

@@ -0,0 +1,69 @@
<template>
<view class="main">
<share-element class="share-element" share-key="left"
:shuttle-on-pop="shuttleOnPush" :transition-on-gesture="transitionOnGesture" @tap="openPage()">
<image src="https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/drop-card-1.jpg" mode="widthFix">
</image>
<view class="text-label">
<text style="color: white;">每一口,都是幸福</text>
</view>
</share-element>
</view>
<share-element class="bottomWrap" share-key="bottom" @tap="openPage()"
transitionOnGesture=true>
<view class="bottom">
<text style="color: white;">share-element(底部固定)</text>
</view>
</share-element>
</template>
<script setup lang="uts">
const shuttleOnPush = ref("to")
const transitionOnGesture = ref(false)
function openPage() {
uni.navigateBack()
}
onLoad((event : OnLoadOptions) => {
shuttleOnPush.value = event["shuttleOnPush"] as string
transitionOnGesture.value = event["transitionOnGesture"] === "true"
console.log(`shuttleOnPush:${shuttleOnPush.value} transitionOnGesture:${transitionOnGesture.value}`)
})
</script>
<style>
.bottomWrap {
width: 100%;
bottom: 0px;
height: 80px;
position: fixed;
}
.bottom {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background-color: #007aff;
}
.text-label {
position: absolute;
background-color: #007aff;
opacity: 0.8;
text-align: center;
justify-content: center;
align-items: center;
bottom: 0px;
left: 0px;
right: 0px;
height: 30px;
}
.main {
padding: 5px;
align-items: center;
justify-content: center;
}
</style>

查看文件

@@ -0,0 +1,119 @@
<template>
<page-head title="share-element"></page-head>
<view class="main">
<swiper circular="true">
<swiper-item>
<share-element class="share-element" share-key="left" :shuttle-on-pop="shuttleOnPopType"
:transition-on-gesture="transitionOnGesture" :shuttle-on-push="shuttleOnPushType" :easing-function="easingFunctionType" @tap="openPage()">
<image style="width: 100px;height: 150px;"
src="https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/drop-card-1.jpg">
</image>
</share-element>
</swiper-item>
</swiper>
</view>
<button type="primary" @click="openPage" class="button">
打开share-element页面
</button>
</template>
<script setup lang="uts">
type ShareElementOpenAnimationType =
'auto' |
'none' |
'slide-in-right' |
'slide-in-left' |
'slide-in-top' |
'slide-in-bottom' |
'fade-in' |
'pop-in' |
'zoom-out' |
'zoom-fade-out'
type ShareElementEasingFunctionType =
'ease' |
'ease-in' |
'ease-out' |
'ease-in-out' |
'linear'
type ShuttleOnType =
'from' |
'to'
import { ItemType } from '@/components/enum-data/enum-data-types'
const transitionOnGesture = ref(true)
const shuttleOnPopType = ref('to' as ShuttleOnType)
const shuttleOnPushType = ref('to' as ShuttleOnType)
const shuttleOnTypeList = ref([
'from',
'to'
])
const openAnimationType = ref('slide-in-right' as ShareElementOpenAnimationType)
const openAnimationTypeList = ref([
'auto',
'none',
'slide-in-right',
'slide-in-left',
'slide-in-top',
'slide-in-bottom',
'fade-in',
'pop-in',
'zoom-out',
'zoom-fade-out'
])
const easingFunctionType = ref('ease' as ShareElementEasingFunctionType)
const easingFunctionTypeList = ref([
'ease',
'ease-in',
'ease-out',
'ease-in-out',
'linear'
])
function openPage() {
uni.navigateTo({
animationType: openAnimationType.value,
url: "/pages/component/share-element/share-element-to?shuttleOnPush=" + shuttleOnPushType.value + "&transitionOnGesture=" + transitionOnGesture.value
})
}
</script>
<style>
.ml-10 {
margin-left: 10px;
}
.choose-property-title {
font-weight: bold;
}
.choose-property-type-radio-group {
flex-direction: row;
flex-wrap: wrap;
}
.bottomWrap {
width: 100%;
bottom: 0px;
height: 80px;
position: fixed;
}
.bottom {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background-color: #007aff;
}
.main {
padding: 5px 0;
align-items: center;
justify-content: center;
}
</style>

查看文件

@@ -0,0 +1,202 @@
<template>
<page-head title="share-element"></page-head>
<page-intro content="本页演示 share-element 共享元素组件:点击图片打开详情页时的转场共享效果;下方可配置过渡手势、easing、shuttle-on-push/pop 等。"></page-intro>
<view class="main">
<share-element class="share-element" share-key="left" :shuttle-on-pop="shuttleOnPopType"
:transition-on-gesture="transitionOnGesture" :shuttle-on-push="shuttleOnPushType" :easing-function="easingFunctionType" @tap="openPage()">
<image style="width: 100px;height: 150px;"
src="https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/drop-card-1.jpg">
</image>
</share-element>
</view>
<button type="primary" @click="openPage" class="button">
打开share-element页面
</button>
<scroll-view style="flex: 1">
<view class="content">
<boolean-data :defaultValue="transitionOnGesture" title="transition-on-gesture= true(仅iOS生效)"
@change="changeTransitionOnGesture"></boolean-data>
<text class="uni-common-mt choose-property-title">easing-function:</text>
<radio-group class="choose-property-type-radio-group" @change="handleEasingFunction">
<radio class="ml-10 uni-common-mt" v-for="item in easingFunctionTypeList" :key="item" :value="item"
:checked="easingFunctionType == item">{{ item }}
</radio>
</radio-group>
<text class="uni-common-mt choose-property-title">shuttle-on-push(仅iOS生效):</text>
<radio-group class="choose-property-type-radio-group" @change="handleShuttleOnPushType">
<radio class="ml-10 uni-common-mt" v-for="item in shuttleOnTypeList" :key="item" :value="item"
:checked="shuttleOnPushType == item">{{ item }}
</radio>
</radio-group>
<text class="uni-common-mt choose-property-title">shuttle-on-pop(仅iOS生效):</text>
<radio-group class="choose-property-type-radio-group" @change="handleShuttleOnPopType">
<radio class="ml-10 uni-common-mt" v-for="item in shuttleOnTypeList" :key="item" :value="item"
:checked="shuttleOnPopType == item">{{ item }}
</radio>
</radio-group>
<text class="uni-common-mt choose-property-title">animationType(页面动画降级):</text>
<radio-group class="choose-property-type-radio-group" @change="handleOpenAnimationType">
<radio class="ml-10 uni-common-mt" v-for="item in openAnimationTypeList" :key="item" :value="item"
:checked="openAnimationType == item">{{ item }}
</radio>
</radio-group>
</view>
</scroll-view>
<button @click="gotoShareElementWithSwiper" class="button">
打开share-element-with-swiper页面
</button>
<view style="height: 80px;"></view>
<share-element class="bottomWrap" share-key="bottom" @tap="openPage()" transitionOnGesture=true>
<view class="bottom">
<text style="color: white;">share-element(底部固定)</text>
</view>
</share-element>
</template>
<script setup lang="uts">
type ShareElementOpenAnimationType =
'auto' |
'none' |
'slide-in-right' |
'slide-in-left' |
'slide-in-top' |
'slide-in-bottom' |
'fade-in' |
'pop-in' |
'zoom-out' |
'zoom-fade-out'
type ShareElementEasingFunctionType =
'ease' |
'ease-in' |
'ease-out' |
'ease-in-out' |
'linear'
type ShuttleOnType =
'from' |
'to'
import { ItemType } from '@/components/enum-data/enum-data-types'
const transitionOnGesture = ref(true)
const shuttleOnPopType = ref('to' as ShuttleOnType)
const shuttleOnPushType = ref('to' as ShuttleOnType)
const shuttleOnTypeList = [
'from',
'to'
]
const openAnimationType = ref('slide-in-right' as ShareElementOpenAnimationType)
const openAnimationTypeList = [
'auto',
'none',
'slide-in-right',
'slide-in-left',
'slide-in-top',
'slide-in-bottom',
'fade-in',
'pop-in',
'zoom-out',
'zoom-fade-out'
]
const easingFunctionType = ref('ease' as ShareElementEasingFunctionType)
const easingFunctionTypeList = [
'ease',
'ease-in',
'ease-out',
'ease-in-out',
'linear'
]
const openPage = () => {
uni.navigateTo({
animationType: openAnimationType.value,
url: "/pages/component/share-element/share-element-to?shuttleOnPush=" + shuttleOnPushType.value + "&transitionOnGesture=" + transitionOnGesture.value
})
}
const gotoShareElementWithSwiper = () => {
uni.navigateTo({
url:'/pages/component/share-element/share-element-with-swiper'
})
}
const changeTransitionOnGesture = (checked : boolean) => {
console.log(`changeTransitionOnGesture:${checked}`)
transitionOnGesture.value = checked
}
const handleOpenAnimationType = (e : RadioGroupChangeEvent) => {
openAnimationType.value = e.detail.value as ShareElementOpenAnimationType
}
const handleEasingFunction = (e : RadioGroupChangeEvent) => {
easingFunctionType.value = e.detail.value as ShareElementEasingFunctionType
}
const handleShuttleOnPopType = (e : RadioGroupChangeEvent) => {
shuttleOnPopType.value = e.detail.value as ShuttleOnType
}
const handleShuttleOnPushType = (e : RadioGroupChangeEvent) => {
shuttleOnPushType.value = e.detail.value as ShuttleOnType
}
defineExpose({
transitionOnGesture,
shuttleOnPopType,
shuttleOnPushType,
shuttleOnTypeList,
openAnimationType,
openAnimationTypeList,
easingFunctionType,
easingFunctionTypeList,
openPage,
gotoShareElementWithSwiper,
changeTransitionOnGesture,
handleOpenAnimationType,
handleEasingFunction,
handleShuttleOnPopType,
handleShuttleOnPushType
})
</script>
<style>
.ml-10 {
margin-left: 10px;
}
.choose-property-title {
font-weight: bold;
}
.choose-property-type-radio-group {
flex-direction: row;
flex-wrap: wrap;
}
.bottomWrap {
width: 100%;
bottom: 0px;
height: 80px;
position: fixed;
}
.bottom {
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background-color: #007aff;
}
.main {
padding: 5px 0;
align-items: center;
justify-content: center;
}
</style>