mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 04:30:55 +08:00
Support vite3 for Vue (#1746)
This commit is contained in:
parent
4d51d9b742
commit
a9fcdd705e
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"Vue.volar"
|
|
||||||
]
|
|
||||||
}
|
|
@ -2,19 +2,20 @@
|
|||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.2.25"
|
"vue": "^3.2.37"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^3.0.3",
|
||||||
"typescript": "^4.5.4",
|
"typescript": "^4.6.4",
|
||||||
"vite": "^2.9.9",
|
"vite": "^3.0.7",
|
||||||
"vue-tsc": "^0.34.7",
|
"vue-tsc": "^0.39.5",
|
||||||
"@babel/types": "^7.17.10"
|
"@babel/types": "^7.18.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import type {DefineComponent} from 'vue'
|
import type {DefineComponent} from 'vue'
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
||||||
const component: DefineComponent<{}, {}, any>
|
const component: DefineComponent<{}, {}, any>
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"module": "esnext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node"
|
"moduleResolution": "Node",
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": ["vite.config.ts"]
|
"include": ["vite.config.ts"]
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,13 @@ export interface Size {
|
|||||||
h: number;
|
h: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Screen {
|
||||||
|
isCurrent: boolean;
|
||||||
|
isPrimary: boolean;
|
||||||
|
width: number
|
||||||
|
height: number
|
||||||
|
}
|
||||||
|
|
||||||
// Environment information such as platform, buildtype, ...
|
// Environment information such as platform, buildtype, ...
|
||||||
export interface EnvironmentInfo {
|
export interface EnvironmentInfo {
|
||||||
buildType: string;
|
buildType: string;
|
||||||
@ -171,6 +178,10 @@ export function WindowUnminimise(): void;
|
|||||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||||
|
|
||||||
|
// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
|
||||||
|
// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
|
||||||
|
export function ScreenGetAll(): Promise<Screen[]>;
|
||||||
|
|
||||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
export function BrowserOpenURL(url: string): void;
|
export function BrowserOpenURL(url: string): void;
|
||||||
@ -182,3 +193,11 @@ export function Environment(): Promise<EnvironmentInfo>;
|
|||||||
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
|
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
|
||||||
// Quits the application.
|
// Quits the application.
|
||||||
export function Quit(): void;
|
export function Quit(): void;
|
||||||
|
|
||||||
|
// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
|
||||||
|
// Hides the application.
|
||||||
|
export function Hide(): void;
|
||||||
|
|
||||||
|
// [Show](https://wails.io/docs/reference/runtime/intro#show)
|
||||||
|
// Shows the application.
|
||||||
|
export function Show(): void;
|
||||||
|
@ -149,6 +149,10 @@ export function WindowSetBackgroundColour(R, G, B, A) {
|
|||||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function ScreenGetAll() {
|
||||||
|
return window.runtime.ScreenGetAll();
|
||||||
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
window.runtime.BrowserOpenURL(url);
|
window.runtime.BrowserOpenURL(url);
|
||||||
}
|
}
|
||||||
@ -161,6 +165,10 @@ export function Quit() {
|
|||||||
window.runtime.Quit();
|
window.runtime.Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ScreenGetAll() {
|
export function Hide() {
|
||||||
return window.runtime.ScreenGetAll();
|
window.runtime.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Show() {
|
||||||
|
window.runtime.Show();
|
||||||
}
|
}
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"Vue.volar"
|
|
||||||
]
|
|
||||||
}
|
|
@ -2,16 +2,17 @@
|
|||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.2.25"
|
"vue": "^3.2.37"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^3.0.3",
|
||||||
"vite": "^2.9.9"
|
"vite": "^3.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,6 +18,13 @@ export interface Size {
|
|||||||
h: number;
|
h: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Screen {
|
||||||
|
isCurrent: boolean;
|
||||||
|
isPrimary: boolean;
|
||||||
|
width: number
|
||||||
|
height: number
|
||||||
|
}
|
||||||
|
|
||||||
// Environment information such as platform, buildtype, ...
|
// Environment information such as platform, buildtype, ...
|
||||||
export interface EnvironmentInfo {
|
export interface EnvironmentInfo {
|
||||||
buildType: string;
|
buildType: string;
|
||||||
@ -171,6 +178,10 @@ export function WindowUnminimise(): void;
|
|||||||
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels.
|
||||||
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void;
|
||||||
|
|
||||||
|
// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall)
|
||||||
|
// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system.
|
||||||
|
export function ScreenGetAll(): Promise<Screen[]>;
|
||||||
|
|
||||||
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl)
|
||||||
// Opens the given URL in the system browser.
|
// Opens the given URL in the system browser.
|
||||||
export function BrowserOpenURL(url: string): void;
|
export function BrowserOpenURL(url: string): void;
|
||||||
@ -182,3 +193,11 @@ export function Environment(): Promise<EnvironmentInfo>;
|
|||||||
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
|
// [Quit](https://wails.io/docs/reference/runtime/intro#quit)
|
||||||
// Quits the application.
|
// Quits the application.
|
||||||
export function Quit(): void;
|
export function Quit(): void;
|
||||||
|
|
||||||
|
// [Hide](https://wails.io/docs/reference/runtime/intro#hide)
|
||||||
|
// Hides the application.
|
||||||
|
export function Hide(): void;
|
||||||
|
|
||||||
|
// [Show](https://wails.io/docs/reference/runtime/intro#show)
|
||||||
|
// Shows the application.
|
||||||
|
export function Show(): void;
|
||||||
|
@ -149,6 +149,10 @@ export function WindowSetBackgroundColour(R, G, B, A) {
|
|||||||
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
window.runtime.WindowSetBackgroundColour(R, G, B, A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function ScreenGetAll() {
|
||||||
|
return window.runtime.ScreenGetAll();
|
||||||
|
}
|
||||||
|
|
||||||
export function BrowserOpenURL(url) {
|
export function BrowserOpenURL(url) {
|
||||||
window.runtime.BrowserOpenURL(url);
|
window.runtime.BrowserOpenURL(url);
|
||||||
}
|
}
|
||||||
@ -161,6 +165,10 @@ export function Quit() {
|
|||||||
window.runtime.Quit();
|
window.runtime.Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ScreenGetAll() {
|
export function Hide() {
|
||||||
return window.runtime.ScreenGetAll();
|
window.runtime.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Show() {
|
||||||
|
window.runtime.Show();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user