mainPage.vue 文件内容如下:
<template>
<view class="stl_button">
<view class="stl_button_item">
<view v-for="(item, index) in global.button">
<button size="mini" style="color:#ffffff; backgroundColor:rgb(0, 205, 172)">{{item.name}}</button>
</view>
</view>
</view>
</template>
<script setup>
import global from '../common/globalData.js'
</script>
globalData.js文件内容如下:
import { reactive } from 'vue'
const button = reactive([{value: 1 , name: "测试按键"},
{value: 2 , name: "测试按键"},
{value: 3 , name: "测试按键"},
{value: 4 , name: "测试按键"}]);
export default {
button
}
manifest.json 配置文件内容如下:
"app-plus" : {
/ 原生JS混淆 /
"confusion" : {
"description" : "原生混淆",
"resources" : {
"common/globalData.js" : {}
}
},
}
笔袋App
正式版啥时候更新呀
2024-04-29 19:39
2***@qq.com
pwp
2024-05-05 16:41