소스 검색

feat: commit code

YuKun Liu 3 년 전
부모
커밋
c97d7f263a
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      src/assets/dioxus.toml
  2. 2 3
      src/assets/index.html
  3. 1 0
      src/cli/create/mod.rs

+ 1 - 1
src/assets/dioxus.toml

@@ -17,7 +17,7 @@ asset_dir = "public"
 [web.app]
 
 # HTML title tag content
-title = "dioxus | ⛺"
+title = "Dioxus | An elegant GUI library for Rust"
 
 index_on_404 = true
 

+ 2 - 3
src/assets/index.html

@@ -9,10 +9,9 @@
 </head>
 <body>
   <div id="main"></div>
-  <!-- Note the usage of `type=module` here as this is an ES6 module -->
   <script type="module">
-    import init from "{base_path}/assets/dioxus/{app_name}.js";
-    init("{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
+    import init from "/{base_path}/assets/dioxus/{app_name}.js";
+    init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
       if (wasm.__wbindgen_start == undefined) {
         wasm.main();
       }

+ 1 - 0
src/cli/create/mod.rs

@@ -66,6 +66,7 @@ impl Create {
         let mut meta_file = String::new();
         dioxus_file.read_to_string(&mut meta_file)?;
         meta_file = meta_file.replace("{{project-name}}", &self.name);
+        meta_file = meta_file.replace("{{default-platform}}", "web");
         File::create(project_path.join("Dioxus.toml"))?.write_all(meta_file.as_bytes())?;
 
         println!();