实现 nacos + traefik,改了很多东西!!!
This commit is contained in:
@@ -4,12 +4,22 @@ import { createPinia } from 'pinia'
|
||||
import App from './App'
|
||||
import router from './router'
|
||||
|
||||
// import { getNacosInstance } from '@shared/lib/nacosInstance';
|
||||
|
||||
class Main {
|
||||
constructor() {
|
||||
createApp(App)
|
||||
.use(createPinia())
|
||||
.use(router)
|
||||
.mount('#app')
|
||||
|
||||
// this.test()
|
||||
}
|
||||
|
||||
async test() {
|
||||
// 关键:通过getNacosInstance获取实例(确保已初始化)
|
||||
const nacos = await getNacosInstance();
|
||||
console.log("product: ", await nacos.find('app-product'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,15 @@ export default class Home extends Vue {
|
||||
{ id: 3, title: '新闻3' },
|
||||
]
|
||||
|
||||
addCount() {
|
||||
async created() {
|
||||
}
|
||||
|
||||
async addCount() {
|
||||
// console.log(await nacos.find('app-product'))
|
||||
// console.log("ref dom: ", this.refH1)
|
||||
// this.router.push({ name: 'about' })
|
||||
// this.route.query
|
||||
|
||||
this.counter++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user