{{ myData.resultText }}
wails init -n myproject -t vue
wails dev
cd frontend
npm install element-plus
npm install
在 main.js
里配置如下
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
const app = createApp(App)
app.use(ElementPlus)
app.mount('#app')
{{ myData.resultText }}
app.go
中配置
func (a *App) Custom(name string) string {
return name + "custom text"
}
在 frontend\wailsjs\go\main\App.js
中增加方法
export function Custom(arg1) {
return window['go']['main']['App']['Custom'](arg1);
}
App.vue
引入组件
frontend/src/App.vue
Primary
cd ..
wails build -s
涉及资源