<script src="vue.js"></script>
const viewmodel = new Vue({
el: "#app",
vuetify: new Vuetify(),
data: {
positions: {
normal: [],
appartment: [],
house: [],
},
selectedValue: {
type: "",
name: ""
},
newChar: false,
show: false,
translations: {}
},
'html/vue.js'
第二个JavaScript文件我并没在这个插件的旧版和新版有发现检查html文件是否有
<script src="vue.js"></script>
和
fxmanifest.lua是否有JavaScript:const viewmodel = new Vue({ el: "#app", vuetify: new Vuetify(), data: { positions: { normal: [], appartment: [], house: [], }, selectedValue: { type: "", name: "" }, newChar: false, show: false, translations: {} },
'html/vue.js'
如果和我一样还有问题你就得联系你的插件出售者了,他们如果没有解决方案,那就没办法了,他们的脚本都是加密的。
最致命的是,我无法联系作者,因为这是qb-core自带的插件,我尝试了好几个版本都是这样检查html文件是否有
<script src="vue.js"></script>
和
fxmanifest.lua是否有JavaScript:const viewmodel = new Vue({ el: "#app", vuetify: new Vuetify(), data: { positions: { normal: [], appartment: [], house: [], }, selectedValue: { type: "", name: "" }, newChar: false, show: false, translations: {} },
'html/vue.js'
如果和我一样还有问题你就得联系你的插件出售者了,他们如果没有解决方案,那就没办法了,他们的脚本都是加密的。
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>QBCore - Spawnlocation</title>
<link rel="stylesheet" type="text/css" href="reset.css"> <!-- RESET CSS -->
<link rel="stylesheet" type="text/css" href="style.css"> <!-- STYLE CSS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js"></script>
<script src="vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"/>
</head>
<body>
<v-app data-app>
<div id="app">
<div class="container">
<div class="noselect">
<div
class="spawn-locations"
:class="{'slide-top-fade-leave-active': show == false, 'slide-top-fade-leave-to': show == false}"
>
<div class="spawn_locations-header">
<p>
<span id="null">{{translate('where_would_you_like_to_start')}}</span>
</p>
</div>
<!--
<v-btn
elevation="0" color="#00000000" v-if="newChar !== true" class="location" x-large v-ripple
:class="{'selected': 'current' == selectedValue.type && 'current' == selectedValue.name}"
@click="click_location('current', 'current')"
>
{{translate('last_location')}}
</v-btn> -->
<div v-for="(locations, locationGroupIdx) in positions">
<v-btn
v-for="(location, locationIdx) in locations"
:key="locationGroupIdx + '-' + locationIdx"
elevation="0" color="#00000000"
:class="{'selected': locationGroupIdx == selectedValue.type && ((locationGroupIdx !== 'house' && locationIdx == selectedValue.name) || (locationGroupIdx == 'house' && location.house == selectedValue.name))}"
class="location" x-large v-ripple @click="click_location(locationGroupIdx, locationGroupIdx == 'house' ? location.house : locationIdx)"
>
{{ location.label }}
</v-btn>
</div>
<v-btn
@click="submit_spawn"
v-ripple
x-large
class="submit-spawn"
v-if="selectedValue.type !== '' && selectedValue.name !== ''"
>
{{translate('confirm')}}
</v-btn>
</div>
</div>
</div>
</div>
</v-app>
<script>
const viewmodel = new Vue({
el: "#app",
vuetify: new Vuetify(),
data: {
positions: {
normal: [],
appartment: [],
house: [],
},
selectedValue: {
type: "",
name: ""
},
newChar: false,
show: false,
translations: {}
},
methods: {
click_location: function(type, name) {
if (type == "normal") {
axios.post('https://qb-spawn/setCam', {
posname: name,
type: type,
});
}
this.selectedValue = {type: type, name: name}
},
submit_spawn: function() {
this.show = false
const data = this.selectedValue
if (data.type !== "appartment") {
axios.post('https://qb-spawn/spawnplayer', {
spawnloc: data.name,
typeLoc: data.type
});
} else {
axios.post('https://qb-spawn/chooseAppa', {
appType: data.name,
});
}
},
translate(phrase) {
return this.translations[phrase] || `Could not find phrase: ${phrase}`;
}
},
mounted () {
window.addEventListener('message', function (event) {
let data = event.data;
switch(data.action) {
case "showUi":
viewmodel.show = data.status
viewmodel.translations = event.data.translations
break;
case "setupLocations":
viewmodel.positions = {normal: [], appartment: [], house: []}
viewmodel.selectedValue = {type: "", index: -1}
viewmodel.positions.normal = data.locations
viewmodel.positions.house = data.houses
viewmodel.newChar = data.isNew
break;
case "setupAppartements":
viewmodel.positions = {normal: [], appartment: [], house: []}
viewmodel.selectedValue = {type: "", index: -1}
viewmodel.positions.appartment = data.locations
viewmodel.newChar = data.isNew
break;
}
})
}
});
</script>
</body>
</html>
你是否能给我推荐其他插件,无论其是否付费。检查html文件是否有
<script src="vue.js"></script>
和
fxmanifest.lua是否有JavaScript:const viewmodel = new Vue({ el: "#app", vuetify: new Vuetify(), data: { positions: { normal: [], appartment: [], house: [], }, selectedValue: { type: "", name: "" }, newChar: false, show: false, translations: {} },
'html/vue.js'
如果和我一样还有问题你就得联系你的插件出售者了,他们如果没有解决方案,那就没办法了,他们的脚本都是加密的。
现在没有UI报错了,但是选择角色后依然弹不出来选择框。用我发你的覆盖html试试
HTML:<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>QBCore - Spawnlocation</title> <link rel="stylesheet" type="text/css" href="reset.css"> <!-- RESET CSS --> <link rel="stylesheet" type="text/css" href="style.css"> <!-- STYLE CSS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js"></script> <script src="vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"/> </head> <body> <v-app data-app> <div id="app"> <div class="container"> <div class="noselect"> <div class="spawn-locations" :class="{'slide-top-fade-leave-active': show == false, 'slide-top-fade-leave-to': show == false}" > <div class="spawn_locations-header"> <p> <span id="null">{{translate('where_would_you_like_to_start')}}</span> </p> </div> <!-- <v-btn elevation="0" color="#00000000" v-if="newChar !== true" class="location" x-large v-ripple :class="{'selected': 'current' == selectedValue.type && 'current' == selectedValue.name}" @click="click_location('current', 'current')" > {{translate('last_location')}} </v-btn> --> <div v-for="(locations, locationGroupIdx) in positions"> <v-btn v-for="(location, locationIdx) in locations" :key="locationGroupIdx + '-' + locationIdx" elevation="0" color="#00000000" :class="{'selected': locationGroupIdx == selectedValue.type && ((locationGroupIdx !== 'house' && locationIdx == selectedValue.name) || (locationGroupIdx == 'house' && location.house == selectedValue.name))}" class="location" x-large v-ripple @click="click_location(locationGroupIdx, locationGroupIdx == 'house' ? location.house : locationIdx)" > {{ location.label }} </v-btn> </div> <v-btn @click="submit_spawn" v-ripple x-large class="submit-spawn" v-if="selectedValue.type !== '' && selectedValue.name !== ''" > {{translate('confirm')}} </v-btn> </div> </div> </div> </div> </v-app> <script> const viewmodel = new Vue({ el: "#app", vuetify: new Vuetify(), data: { positions: { normal: [], appartment: [], house: [], }, selectedValue: { type: "", name: "" }, newChar: false, show: false, translations: {} }, methods: { click_location: function(type, name) { if (type == "normal") { axios.post('https://qb-spawn/setCam', { posname: name, type: type, }); } this.selectedValue = {type: type, name: name} }, submit_spawn: function() { this.show = false const data = this.selectedValue if (data.type !== "appartment") { axios.post('https://qb-spawn/spawnplayer', { spawnloc: data.name, typeLoc: data.type }); } else { axios.post('https://qb-spawn/chooseAppa', { appType: data.name, }); } }, translate(phrase) { return this.translations[phrase] || `Could not find phrase: ${phrase}`; } }, mounted () { window.addEventListener('message', function (event) { let data = event.data; switch(data.action) { case "showUi": viewmodel.show = data.status viewmodel.translations = event.data.translations break; case "setupLocations": viewmodel.positions = {normal: [], appartment: [], house: []} viewmodel.selectedValue = {type: "", index: -1} viewmodel.positions.normal = data.locations viewmodel.positions.house = data.houses viewmodel.newChar = data.isNew break; case "setupAppartements": viewmodel.positions = {normal: [], appartment: [], house: []} viewmodel.selectedValue = {type: "", index: -1} viewmodel.positions.appartment = data.locations viewmodel.newChar = data.isNew break; } }) } }); </script> </body> </html>
这就要问你的脚本作者了,可以在脚本内的config.lua里看看有没有相关的配置现在没有UI报错了,但是选择角色后依然弹不出来选择框。