浏览代码

fix(example/state): correct invoke method path to __TAURI__.core.invoke() (#9817)

ryoichi 1 年之前
父节点
当前提交
0c61784efb
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      examples/state/index.html

+ 3 - 3
examples/state/index.html

@@ -35,14 +35,14 @@
       }
 
       incrementBtn.addEventListener('click', () => {
-        window.__TAURI__
+        window.__TAURI__.core
           .invoke('increment_counter')
           .then(updateResponse)
           .catch(updateResponse)
       })
 
       storeBtn.addEventListener('click', () => {
-        window.__TAURI__
+        window.__TAURI__.core
           .invoke('db_insert', {
             key: KEY,
             value: storeInput.value
@@ -52,7 +52,7 @@
       })
 
       readBtn.addEventListener('click', () => {
-        window.__TAURI__
+        window.__TAURI__.core
           .invoke('db_read', {
             key: KEY
           })