"use strict";(self.webpackChunk_alilc_lowcode_engine_docs=self.webpackChunk_alilc_lowcode_engine_docs||[]).push([[9044],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function l(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},o=Object.keys(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var p=r.createContext({}),c=function(e){var t=r.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},d=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),s=c(a),b=n,m=s["".concat(p,".").concat(b)]||s[b]||u[b]||o;return a?r.createElement(m,i(i({ref:t},d),{},{components:a})):r.createElement(m,i({ref:t},d))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=b;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:n,i[1]=l;for(var c=2;c<o;c++)i[c]=a[c];return r.createElement.apply(null,i)}return r.createElement.apply(null,a)}b.displayName="MDXCreateElement"},6099:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=a(7462),n=(a(7294),a(3905));const o={title:"Clipboard",sidebar_position:14},i=void 0,l={unversionedId:"api/model/clipboard",id:"api/model/clipboard",title:"Clipboard",description:"@types IPublicModelClipboard",source:"@site/docs/api/model/clipboard.md",sourceDirName:"api/model",slug:"/api/model/clipboard",permalink:"/site/docs/api/model/clipboard",draft:!1,editUrl:"https://github.com/alibaba/lowcode-engine/tree/develop/docs/docs/api/model/clipboard.md",tags:[],version:"current",sidebarPosition:14,frontMatter:{title:"Clipboard",sidebar_position:14},sidebar:"api",previous:{title:"Resource",permalink:"/site/docs/api/model/resource"},next:{title:"ComponentMeta",permalink:"/site/docs/api/model/component-meta"}},p={},c=[{value:"\u65b9\u6cd5",id:"\u65b9\u6cd5",level:2},{value:"setData",id:"setdata",level:3},{value:"waitPasteData",id:"waitpastedata",level:3}],d={toc:c},s="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("blockquote",null,(0,n.kt)("p",{parentName:"blockquote"},(0,n.kt)("strong",{parentName:"p"},"@types")," ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/clipboard.ts"},"IPublicModelClipboard"),(0,n.kt)("br",null),"\n",(0,n.kt)("strong",{parentName:"p"},"@since")," v1.1.0")),(0,n.kt)("h2",{id:"\u65b9\u6cd5"},"\u65b9\u6cd5"),(0,n.kt)("h3",{id:"setdata"},"setData"),(0,n.kt)("p",null,"\u7ed9\u526a\u8d34\u677f\u8d4b\u503c"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript"},"/**\n * \u7ed9\u526a\u8d34\u677f\u8d4b\u503c\n * set data to clipboard\n *\n * @param {*} data\n * @since v1.1.0\n */\nsetData(data: any): void;\n")),(0,n.kt)("h3",{id:"waitpastedata"},"waitPasteData"),(0,n.kt)("p",null,"\u8bbe\u7f6e\u526a\u8d34\u677f\u6570\u636e\u8bbe\u7f6e\u7684\u56de\u8c03"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript"},"/**\n * \u8bbe\u7f6e\u526a\u8d34\u677f\u6570\u636e\u8bbe\u7f6e\u7684\u56de\u8c03\n * set callback for clipboard provide paste data\n *\n * @param {KeyboardEvent} keyboardEvent\n * @param {(data: any, clipboardEvent: ClipboardEvent) => void} cb\n * @since v1.1.0\n */\nwaitPasteData(\n    keyboardEvent: KeyboardEvent,\n    cb: (data: any, clipboardEvent: ClipboardEvent) => void,\n  ): void;\n")))}u.isMDXComponent=!0}}]);