1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/47a38b09778933a11b0c4479051...

1 line
2.9 KiB
JSON

{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\directive\\copy.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\directive\\copy.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import ClipboardJS from 'clipboard';\nimport { Message } from 'element-ui';\nimport Vue from 'vue';\n/* \n @title 全局 双击 复制\n @des 使用 v-copy 绑定元素 双击元素 复制元素文本内容\n*/\n\nVue.directive('copy', {\n bind: function bind(el, binding, vnode, oldVnode) {\n //ondblclick 事件会在对象被双击时发生。\n el.ondblclick = function (event) {\n var clipboard = new ClipboardJS(el, {\n text: function text(trigger) {\n return el.innerText;\n }\n }); //触发 复制事件\n\n clipboard.onClick(event);\n Message.success('复制成功'); //销毁 释放内存\n\n clipboard.destroy();\n };\n }\n});",{"version":3,"sources":["C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\directive\\copy.js"],"names":["ClipboardJS","Message","Vue","directive","bind","el","binding","vnode","oldVnode","ondblclick","event","clipboard","text","trigger","innerText","onClick","success","destroy"],"mappings":"AAAA,OAAOA,WAAP,MAAwB,WAAxB;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,OAAOC,GAAP,MAAgB,KAAhB;AAEA;;;;;AAKAA,GAAG,CAACC,SAAJ,CAAc,MAAd,EAAqB;AACjBC,EAAAA,IAAI,EAAE,cAACC,EAAD,EAAKC,OAAL,EAAcC,KAAd,EAAqBC,QAArB,EAAkC;AACpC;AACAH,IAAAA,EAAE,CAACI,UAAH,GAAc,UAACC,KAAD,EAAS;AACnB,UAAIC,SAAS,GAAG,IAAIX,WAAJ,CAAgBK,EAAhB,EAAmB;AAC/BO,QAAAA,IAAI,EAAC,cAACC,OAAD,EAAW;AACd,iBAAOR,EAAE,CAACS,SAAV;AACD;AAH8B,OAAnB,CAAhB,CADmB,CAMnB;;AACAH,MAAAA,SAAS,CAACI,OAAV,CAAkBL,KAAlB;AACAT,MAAAA,OAAO,CAACe,OAAR,CAAgB,MAAhB,EARmB,CASnB;;AACAL,MAAAA,SAAS,CAACM,OAAV;AACH,KAXD;AAYH;AAfgB,CAArB","sourcesContent":["import ClipboardJS from 'clipboard';\nimport { Message } from 'element-ui'\nimport Vue from 'vue'\n\n/* \n @title 全局 双击 复制\n @des 使用 v-copy 绑定元素 双击元素 复制元素文本内容\n*/\n\nVue.directive('copy',{\n bind: (el, binding, vnode, oldVnode) => {\n //ondblclick 事件会在对象被双击时发生。\n el.ondblclick=(event)=>{\n let clipboard = new ClipboardJS(el,{\n text:(trigger)=>{\n return el.innerText\n }\n });\n //触发 复制事件\n clipboard.onClick(event);\n Message.success('复制成功');\n //销毁 释放内存\n clipboard.destroy();\n }\n }\n})"]}]}