2024-08-05 11:36:27 +00:00
|
|
|
import { createApp } from 'vue'
|
|
|
|
import './style.css'
|
|
|
|
import App from './App.vue'
|
2024-08-06 11:32:06 +00:00
|
|
|
import '@unocss/reset/sanitize/sanitize.css'
|
|
|
|
import '@unocss/reset/sanitize/assets.css'
|
|
|
|
import 'virtual:uno.css'
|
2024-08-05 11:36:27 +00:00
|
|
|
import router from "./router/index.js";
|
|
|
|
const app = createApp(App);
|
|
|
|
app.use(router);
|
2024-08-07 12:00:54 +00:00
|
|
|
app.directive('no-space', {
|
|
|
|
mounted(el) {
|
|
|
|
el.addEventListener('input', (e) => {
|
|
|
|
const originalValue = e.target.value;
|
|
|
|
const newValue = originalValue.replace(/\s/g, '');
|
|
|
|
if (originalValue !== newValue) {
|
|
|
|
e.target.value = newValue;
|
|
|
|
e.target.dispatchEvent(new Event('input'));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
2024-08-05 11:36:27 +00:00
|
|
|
app.mount('#app');
|