You've already forked template-MP-ts
移除传统的全局混入改为使用Vue3的全局暴露
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user