查看默认的前端
import { Actor, HttpAgent } from '@dfinity/agent';import { idlFactory as explore_hello_idl, canisterId as explore_hello_id } from 'dfx-generated/explore_hello';const agent = new HttpAgent();const explore_hello = Actor.createActor(explore_hello_idl, { agent, canisterId: explore_hello_id });document.getElementById("clickMeBtn").addEventListener("click", async () => { const name = document.getElementById("name").value.toString(); const greeting = await explore_hello.greet(name); document.getElementById("greeting").innerText = greeting;});drwxr-xr-x 9 pubs staff 288 Apr 6 14:25 assets-r--r--r-- 1 pubs staff 2931 Dec 31 1969 assetstorage.did-r--r--r-- 1 pubs staff 265823 Dec 31 1969 assetstorage.wasm-rw-r--r-- 1 pubs staff 3651 Apr 6 14:25 explore_hello_assets.d.ts-rw-rw-rw- 1 pubs staff 2931 Dec 31 1969 explore_hello_assets.did-rw-r--r-- 1 pubs staff 4236 Apr 6 14:25 explore_hello_assets.did.js-rw-r--r-- 1 pubs staff 149 Apr 6 14:25 explore_hello_assets.js-rw-rw-rw- 1 pubs staff 265823 Dec 31 1969 explore_hello_assets.wasm


最后更新于