"use strict";(self.webpackChunk_felce_lowcode_engine_docs=self.webpackChunk_felce_lowcode_engine_docs||[]).push([[9800],{5680:(e,t,r)=>{r.d(t,{xA:()=>d,yg:()=>y});var n=r(6540);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),s=c(r),b=a,y=s["".concat(p,".").concat(b)]||s[b]||u[b]||o;return r?n.createElement(y,i(i({ref:t},d),{},{components:r})):n.createElement(y,i({ref:t},d))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.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:a,i[1]=l;for(var c=2;c<o;c++)i[c]=r[c];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}b.displayName="MDXCreateElement"},6137:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var n=r(8168),a=(r(6540),r(5680));const o={title:"Clipboard",sidebar_position:14},i=void 0,l={unversionedId:"api/model/clipboard",id:"api/model/clipboard",title:"Clipboard",description:"@types IPublicModelClipboard > @since v1.1.0",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/fe-lce/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,...r}=e;return(0,a.yg)(s,(0,n.A)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},(0,a.yg)("strong",{parentName:"p"},"@types")," ",(0,a.yg)("a",{parentName:"p",href:"https://github.com/fe-lce/lowcode-engine/blob/main/packages/types/src/shell/model/clipboard.ts"},"IPublicModelClipboard"),(0,a.yg)("br",null)," > ",(0,a.yg)("strong",{parentName:"p"},"@since")," v1.1.0")),(0,a.yg)("h2",{id:"\u65b9\u6cd5"},"\u65b9\u6cd5"),(0,a.yg)("h3",{id:"setdata"},"setData"),(0,a.yg)("p",null,"\u7ed9\u526a\u8d34\u677f\u8d4b\u503c"),(0,a.yg)("pre",null,(0,a.yg)("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,a.yg)("h3",{id:"waitpastedata"},"waitPasteData"),(0,a.yg)("p",null,"\u8bbe\u7f6e\u526a\u8d34\u677f\u6570\u636e\u8bbe\u7f6e\u7684\u56de\u8c03"),(0,a.yg)("pre",null,(0,a.yg)("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}}]);