mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-05 19:42:07 +08:00
2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{y as d}from"./hooks-DxjADXf2.js";import"./currency.js@2.0.4-9OAR_aOO.js";import"./dayjs@1.11.10-BYZwCyGy.js";import"./print-js@1.6.0-C3lAJnMa.js";import"./awesome-qr@2.1.5-rc.0-Ds7AaOTE.js";import"./vue-hooks-plus@1.9.0_vue@3.4.26-C_BRgauB.js";import"./lodash@4.17.21-CM7ROh5r.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DuGDi0R7.js";import"./lodash-es@4.17.21-Dos9GOhk.js";import"./@vueuse_core@10.9.0_vue@3.4.26-BxvIaqQO.js";import"./@vueuse_shared@10.9.0_vue@3.4.26-7aSumFzu.js";import"./utils-XwSDXJUe.js";import"./interactjs@1.10.26-DmsZVOf4.js";import"./pinia-plugin-persistedstate@3.2.1_pinia@2.1.7-RV7uh3T-.js";import"./dom-to-image@2.6.0-CaeIWam-.js";import"./echarts@5.5.0-BEyY33Zi.js";import"./zrender@5.5.0-JN1hODMT.js";import"./tslib@2.3.0-BDyQ-Jie.js";import"./@vue_runtime-core@3.4.26-Cq5aFJKF.js";import"./@vue_reactivity@3.4.26-DTbxPGxS.js";import"./@vue_shared@3.4.26-DWpY0PUk.js";import"./canvas@2.11.2-CVRTzJty.js";import"./js-binary-schema-parser@2.0.3-D0akQrQ7.js";const T=Vue.defineComponent({name:"ContextMenuDemo",setup(){const e=Vue.ref(),o=Vue.ref(!1),r=Vue.ref([{label:"杰·盖茨比",key:"jay gatsby"},{label:"黛西·布坎南",key:"daisy buchanan"},{type:"divider",key:"d1"},{label:"尼克·卡拉威",key:"nick caraway"}]),{x:i,y:u,show:a,updateShow:t}=d(e);return{demoOneRef:e,demoOneShow:o,x:i,y:u,show:a,options:r,clickOutside:n=>{n.preventDefault(),t(!1)},updateShow:t}},render(){const{x:e,y:o,show:r}=this,{clickOutside:i,updateShow:u}=this;return Vue.createVNode(naive.NFlex,{vertical:!0},{default:()=>[Vue.createVNode(naive.NCard,{title:"useContextmenuCoordinate + NDropdown 实现右键菜单"},{default:()=>[Vue.createVNode(naive.NFlex,{vertical:!0},{default:()=>[Vue.createVNode("h3",null,[Vue.createTextVNode("默认点击元素外部会关闭菜单。")]),Vue.createVNode("div",{ref:"demoOneRef",style:"width: 100%; height: 200px; background-color: rgba(0, 128, 0, 0.5)"},[Vue.createTextVNode("右击")])]})]}),Vue.createVNode(naive.NDropdown,{show:r,x:e,y:o,options:this.options,trigger:"manual",placement:"bottom-start",onSelect:(a,t)=>{window.$message.info(`选中了 ${t.label}`),u(!1)},onClickoutside:i.bind(this)},null)]})}});export{T as default};
|