Skip to content

Instantly share code, notes, and snippets.

View 2234839's full-sized avatar
😊
持续学习

崮生 2234839

😊
持续学习
View GitHub Profile
@2234839
2234839 / 使用prisma studio链接任何server-后端.ts
Created December 24, 2023 13:27
使用prisma studio链接任何server
app.post(api_path, async (c) => {
const req = await c.req.json();
const [payload, resHelper] = reqParser(req);
const r = await execClientRequest(payload.data)
return c.json(resHelper(r, null));
});
interface queries {
schemaHash: string;
modelName: "Proxy_api";
import { reactive, computed } from "vue";
/** 返回一个 params对象 与 href 字符串computed ,href 依赖于 params
* @example
* ```js
* const [AppOptions, href] = useParamsObj(undefined, {});
* // 将基于 AppOptions 计算得来的 href 设置到 history
* watchEffect(() => history.replaceState("", "", href.value));
* ```
*/
@2234839
2234839 / copy.ts
Last active October 20, 2020 06:48
崮生的代码片段
export const copy = (str: string) => {
// 第一种
navigator.clipboard.writeText(str);
};
export const copy2 = (str: string) => {
// 第二种
const input = document.createElement("textarea");
input.style.opacity = "0";
document.body.appendChild(input);
@2234839
2234839 / cloudSettings
Last active April 16, 2019 06:29
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-04-16T06:28:17.779Z","extensionVersion":"v3.2.8"}