2025-12-29 17:35:46 +08:00
|
|
|
import App from './App'
|
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
App.mpType = 'app'
|
|
|
|
|
|
|
|
|
|
Vue.directive('enterNumber', {
|
|
|
|
|
inserted: function (el) {
|
|
|
|
|
el.addEventListener("keypress",function(e){
|
|
|
|
|
e = e || window.event;
|
|
|
|
|
let charcode = typeof e.charCode == 'number' ? e.charCode : e.keyCode;
|
|
|
|
|
// if (parseInt(e.target.value) == 0) {
|
|
|
|
|
// e.preventDefault();
|
|
|
|
|
// }
|
|
|
|
|
parseInt(e.target.value) == 0 && e.preventDefault();
|
|
|
|
|
let re = /\d/;
|
|
|
|
|
if(!re.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey){
|
|
|
|
|
if(e.preventDefault){
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
}else{
|
|
|
|
|
e.returnValue = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Vue.prototype.$getStatusText = function(statusMap, status) {
|
|
|
|
|
return statusMap[status] || '';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
import store from '@/vuex/store.js'
|
|
|
|
|
|
2026-04-03 10:44:35 +08:00
|
|
|
// 全局注册账号密码输入框
|
|
|
|
|
import CredentialPopup from '@/components/CredentialPopup.vue';
|
|
|
|
|
Vue.component('CredentialPopup', CredentialPopup);
|
|
|
|
|
|
2025-12-29 17:35:46 +08:00
|
|
|
const app = new Vue({
|
|
|
|
|
...App,
|
|
|
|
|
store
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.$mount()
|