移除传统的全局混入改为使用Vue3的全局暴露

This commit is contained in:
yuantao
2025-09-29 14:31:00 +08:00
parent 6f0bb2f949
commit ff550db7b6
6 changed files with 36 additions and 36 deletions

View File

@@ -3,14 +3,17 @@
<view class="content">
<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
<text class="title">{{ title }}{{ ASSETSURL }}</text>
</view>
<u-button type="primary" @click="handleClick">点击按钮</u-button>
</view>
</template>
<script setup lang="ts">
import { inject } from 'vue'
const title = 'Hello'
const ASSETSURL = inject('ASSETSURL')
function handleClick() {
uni.showToast({