Wasm

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 package main import ( "syscall/js" ) // list function func list() string……

部署svelte到cloudflare

创建项目 npm create svelte@latest myapp cd myapp npm install npm run dev 部署 将项目放到github上,代码push后就会自动运……

递归map

1 2 3 4 5 6 7 8 9 const criteria = {"operator":"and","values":[{"operator":"and","values":[{"operator":"and","values":[{"operator":"and","values":[{"operator":"and","values":[],"uid":"1593264704"},{"operator":"and","values":[],"uid":"283583839"}],"uid":"306590514"},{"operator":"and","values":[],"uid":"1899400818"},{"operator":"and","values":[],"uid":"1809313610"}],"uid":"966087239"},{"operator":"and","values":[],"uid":"586805392"},{"operator":"and","values":[],"uid":"820862889"},{"operator":"and","values":[],"uid":"1622114136"}],"uid":"1198153895"},{"operator":"and","values":[{"operator":"and","values":[],"uid":"2096355855"},{"operator":"and","values":[],"uid":"360825872"}],"uid":"898380472"},{"operator":"and","values":[],"uid":"134584530"}],"uid":"913669697"} const mapHandler = (i) => i.values.map(mapHandler); let values = criteria.values.map(mapHandler); values = flattenDeep(values) if (values.length === 0) { criteriaStr = ''; criteria.values = []; }

Vitejs

# npm 6.x npm create vite@latest my-vue-app --template vue # npm 7+, extra double-dash is needed: npm create vite@latest my-vue-app -- --template vue # yarn yarn create vite my-vue-app --template vue # pnpm pnpm create vite my-vue-app --template vue 模板:……