Tauri(파트 - 먼저 창 구성을 올바르게 설정하세요.
머리말
데스크톱 애플리케이션을 개발할 때 창 매개변수를 이해하고 올바르게 구성하는 것이 중요합니다. 기능을 간소화하고 사용자 경험을 최적화하는 데 도움이 됩니다.
다음 콘텐츠는 Tauri 2 공식 문서를 기반으로 하며 기능, 기본값 및 적용 가능성을 포함하여 WindowConfig 구성 매개변수에 대한 자세한 설명을 제공합니다.
기본 창 동작
매개변수 | 유형 | 설명 | 기본값 |
---|---|---|---|
FirstMouse 수락 | 부울 | 창에서 첫 번째 마우스 이벤트를 허용할지 여부(macOS만 해당) | 거짓 |
alwaysOnBottom | 부울 | 창이 항상 다른 창 아래에 위치하는지 여부 | 거짓 |
alwaysOnTop | 부울 | 창이 항상 다른 창 위에 위치하는지 여부 | 거짓 |
배경색상 | 문자열 | 창의 배경색(16진수 형식) | 기본값 없음 |
센터 | 부울 | 창이 화면 중앙에 있는지 여부 | 거짓 |
폐쇄 가능 | 부울 | 창문을 닫을 수 있는지 여부 | 그렇습니다 |
콘텐츠 보호됨 | 부울 | 창 내용이 캡처되거나 기록되지 않도록 보호합니다(부분 지원). | 거짓 |
장식 | 부울 | 창 장식(제목 표시줄, 테두리 등) 표시 여부 | 그렇습니다 |
드래그드롭 활성화됨 | 부울 | 드래그 앤 드롭 기능이 활성화되어 있는지 여부 | 그렇습니다 |
집중 | 부울 | 실행 시 창이 포커스를 받는지 여부 | 그렇습니다 |
전체 화면 | 부울 | 창이 전체 화면 모드로 시작되는지 여부 | 거짓 |
숨겨진 제목 | 부울 | 제목 표시줄을 숨깁니다(macOS만 해당). | 거짓 |
시크릿 | 부울 | 데이터 추적을 방지하기 위해 시크릿 모드를 활성화합니다. | 거짓 |
라벨 | 문자열 | 창의 고유 식별자(필수). | 기본값 없음 |
최대화 가능 | 부울 | 창을 최대화할 수 있는지 여부 | 그렇습니다 |
최대화 | 부울 | 창이 최대화되기 시작하는지 여부 | 거짓 |
최소화 가능 | 부울 | 창을 최소화할 수 있는지 여부 | 그렇습니다 |
크기 조정 가능 | 부울 | 창 크기 조절 가능 여부 | 그렇습니다 |
작업 표시줄 건너뛰기 | 부울 | 작업 표시줄에서 창을 숨깁니다(플랫폼에 따라 다름). | 거짓 |
탭 식별자 | 문자열 | 창 그룹화 식별자(macOS만 해당) | 기본값 없음 |
테마 | "빛" 또는 "어두움" | 창의 기본 테마, 부분적으로 지원됩니다. | 시스템 기본값 |
제목 | 문자열 | 창 제목. | "타우리 앱" |
titleBarStyle | 문자열 | 제목 표시줄 스타일(macOS 등 플랫폼에 따라 다름) | 기본 스타일 |
투명 | 부울 | 창 투명도를 활성화합니다(부분 지원). | 거짓 |
userAgent | 문자열 | 창용 사용자 정의 사용자 에이전트. | 기본값 없음 |
표시 | 부울 | 창이 보이는지. | 그렇습니다 |
visibleOnAllWorkspaces | 부울 | 창을 모든 작업 공간에 표시합니다(macOS만 해당). | 거짓 |
windowClassname | 문자열 | 사용자 정의 창 클래스 이름(Windows에만 해당). | 기본값 없음 |
zoomHotkeysEnabled | 부울 | 창에 확대/축소 단축키를 활성화합니다. | 그렇습니다 |
치수 및 위치
Parameter | Type | Description | Default Value |
---|---|---|---|
width | number | Initial width of the window (in pixels). | 800 |
height | number | Initial height of the window (in pixels). | 600 |
minWidth | number | Minimum width of the window (in pixels). | No default value |
minHeight | number | Minimum height of the window (in pixels). | No default value |
maxWidth | number | Maximum width of the window (in pixels). | No default value |
maxHeight | number | Maximum height of the window (in pixels). | No default value |
x | number | Initial X-axis position of the window (from screen top-left). | Centered |
y | number | Initial Y-axis position of the window (from screen top-left). | Centered |
브라우저 기능
Parameter | Type | Description | Default Value |
---|---|---|---|
additionalBrowserArgs | string | Additional command-line arguments for the browser. | No default value |
browserExtensionsEnabled | boolean | Enables support for browser extensions. | false |
proxyUrl | string | Custom proxy URL. | No default value |
useHttpsScheme | boolean | Forces the use of HTTPS. | false |
창 효과
Parameter | Type | Description | Default Value |
---|---|---|---|
shadow | boolean | Whether the window shows a shadow (platform-dependent). | true |
windowEffects | string | Custom window effects (e.g., blur, transparency). | No default value |
JSON 구성 예
src-tauri/tauri.conf.json
{ "$schema": "https://schema.tauri.app/config/2.0.0", "productName": "Coco AI", "version": "0.1.0", "identifier": "rs.coco.app", "build": { "beforeDevCommand": "pnpm dev", "devUrl": "http://localhost:1420", "beforeBuildCommand": "pnpm build", "frontendDist": "../dist" }, "app": { "macOSPrivateApi": true, "windows": [ { "acceptFirstMouse": false, // Whether the first mouse event is accepted "additionalBrowserArgs": "", // Additional arguments passed to the browser "alwaysOnBottom": false, // Whether the window always stays at the bottom "alwaysOnTop": false, // Whether the window always stays on top "backgroundColor": "#ffffff", // Background color of the window (default is white) "browserExtensionsEnabled": false, // Whether browser extensions are enabled "center": true, // Whether the window is centered "closable": true, // Whether the window can be closed "contentProtected": false, // Whether content protection is enabled (prevents screenshots) "create": true, // Whether to display the window when created "decorations": true, // Whether to display window decorations "devtools": false, // Whether developer tools are enabled (disabled by default in production) "dragDropEnabled": true, // Whether drag-and-drop functionality is enabled "focus": true, // Whether the window is focused "fullscreen": false, // Whether the window is in fullscreen mode "height": 600, // Window height (default 600px) "hiddenTitle": false, // Whether the window title bar is hidden "incognito": false, // Whether incognito mode is enabled "label": "main", // Unique label (identifier) of the window "maxHeight": null, // Maximum height of the window (default is unlimited) "maximizable": true, // Whether the window can be maximized "maximized": false, // Whether the window is maximized by default "maxWidth": null, // Maximum width of the window (default is unlimited) "minHeight": 300, // Minimum height of the window (default 300px) "minimizable": true, // Whether the window can be minimized "minWidth": 300, // Minimum width of the window (default 300px) "parent": null, // Parent window (default is none) "proxyUrl": "", // Proxy URL "resizable": true, // Whether the window is resizable "shadow": true, // Whether the window shadow is displayed "skipTaskbar": false, // Whether to skip showing the window in the taskbar "tabbingIdentifier": null, // Identifier for grouping windows "theme": "light", // Window theme (default is light) "title": "Tauri App", // Window title "titleBarStyle": "default", // Title bar style "transparent": false, // Whether the window is transparent "url": "/", // Default URL of the window "useHttpsScheme": false, // Whether to enforce HTTPS "userAgent": null, // Custom user agent (default is null) "visible": true, // Whether the window is visible "visibleOnAllWorkspaces": false, // Whether the window is visible on all workspaces "width": 800, // Window width (default 800px) "windowClassname": "", // Window class name (customizable) "windowEffects": null, // Window effects (default is none) "x": null, // Initial X-coordinate of the window position "y": null, // Initial Y-coordinate of the window position "zoomHotkeysEnabled": true // Whether zoom hotkeys are enabled } ], "security": { "csp": null } } }
결론
창 매개변수 구성은 Tauri 개발에서 중요한 단계입니다.
각 매개변수의 목적과 기본값을 이해하면 효율적인 구현에 도움이 될 뿐만 아니라 잠재적인 크로스 플랫폼 호환성 문제도 예방할 수 있습니다.
정확한 구성과 자세한 내용은 Tauri 공식 문서를 참조하세요.
오픈 소스인 저의 최근 Tauri 프로젝트 github.com/infinilabs/coco-app을 자유롭게 살펴보세요. 별표를 주세요.
이것은 나의 첫 번째 Tauri 프로젝트이며, 진행하면서 배우고 있습니다. 같은 생각을 가진 사람들과 연결되어 함께 탐색하고 성장할 수 있기를 바랍니다.
참고자료
https://v2.tauri.app/reference/config/#windowconfig
위 내용은 Tauri(파트 - 먼저 창 구성을 올바르게 설정하세요.의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

각각의 엔진의 구현 원리 및 최적화 전략이 다르기 때문에 JavaScript 엔진은 JavaScript 코드를 구문 분석하고 실행할 때 다른 영향을 미칩니다. 1. 어휘 분석 : 소스 코드를 어휘 단위로 변환합니다. 2. 문법 분석 : 추상 구문 트리를 생성합니다. 3. 최적화 및 컴파일 : JIT 컴파일러를 통해 기계 코드를 생성합니다. 4. 실행 : 기계 코드를 실행하십시오. V8 엔진은 즉각적인 컴파일 및 숨겨진 클래스를 통해 최적화하여 Spidermonkey는 유형 추론 시스템을 사용하여 동일한 코드에서 성능이 다른 성능을 제공합니다.

Python은 부드러운 학습 곡선과 간결한 구문으로 초보자에게 더 적합합니다. JavaScript는 가파른 학습 곡선과 유연한 구문으로 프론트 엔드 개발에 적합합니다. 1. Python Syntax는 직관적이며 데이터 과학 및 백엔드 개발에 적합합니다. 2. JavaScript는 유연하며 프론트 엔드 및 서버 측 프로그래밍에서 널리 사용됩니다.

JavaScript는 현대 웹 개발의 핵심 언어이며 다양성과 유연성에 널리 사용됩니다. 1) 프론트 엔드 개발 : DOM 운영 및 최신 프레임 워크 (예 : React, Vue.js, Angular)를 통해 동적 웹 페이지 및 단일 페이지 응용 프로그램을 구축합니다. 2) 서버 측 개발 : Node.js는 비 차단 I/O 모델을 사용하여 높은 동시성 및 실시간 응용 프로그램을 처리합니다. 3) 모바일 및 데스크탑 애플리케이션 개발 : 크로스 플랫폼 개발은 개발 효율을 향상시키기 위해 반응 및 전자를 통해 실현됩니다.

이 기사에서는 Contrim에 의해 확보 된 백엔드와의 프론트 엔드 통합을 보여 주며 Next.js를 사용하여 기능적인 Edtech SaaS 응용 프로그램을 구축합니다. Frontend는 UI 가시성을 제어하기 위해 사용자 권한을 가져오고 API가 역할 기반을 준수하도록합니다.

일상적인 기술 도구를 사용하여 기능적 다중 테넌트 SaaS 응용 프로그램 (Edtech 앱)을 구축했으며 동일한 작업을 수행 할 수 있습니다. 먼저, 다중 테넌트 SaaS 응용 프로그램은 무엇입니까? 멀티 테넌트 SAAS 응용 프로그램은 노래에서 여러 고객에게 서비스를 제공 할 수 있습니다.

C/C에서 JavaScript로 전환하려면 동적 타이핑, 쓰레기 수집 및 비동기 프로그래밍으로 적응해야합니다. 1) C/C는 수동 메모리 관리가 필요한 정적으로 입력 한 언어이며 JavaScript는 동적으로 입력하고 쓰레기 수집이 자동으로 처리됩니다. 2) C/C를 기계 코드로 컴파일 해야하는 반면 JavaScript는 해석 된 언어입니다. 3) JavaScript는 폐쇄, 프로토 타입 체인 및 약속과 같은 개념을 소개하여 유연성과 비동기 프로그래밍 기능을 향상시킵니다.

웹 개발에서 JavaScript의 주요 용도에는 클라이언트 상호 작용, 양식 검증 및 비동기 통신이 포함됩니다. 1) DOM 운영을 통한 동적 컨텐츠 업데이트 및 사용자 상호 작용; 2) 사용자가 사용자 경험을 향상시키기 위해 데이터를 제출하기 전에 클라이언트 확인이 수행됩니다. 3) 서버와의 진실한 통신은 Ajax 기술을 통해 달성됩니다.

실제 세계에서 JavaScript의 응용 프로그램에는 프론트 엔드 및 백엔드 개발이 포함됩니다. 1) DOM 운영 및 이벤트 처리와 관련된 TODO 목록 응용 프로그램을 구축하여 프론트 엔드 애플리케이션을 표시합니다. 2) Node.js를 통해 RESTFULAPI를 구축하고 Express를 통해 백엔드 응용 프로그램을 시연하십시오.
