UNPKG

@fecp/mobile

Version:

53 lines (52 loc) 1.58 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); const FloatingBubble = require("./FloatingBubble.js"); ;/* empty css */ const useRoute = require("../../../utils/use-route.js"); require("../../../../../../_virtual/less.js"); const _sfc_main = { __name: "FloatingBubble", props: { axis: { //拖拽的方向,xy 代表自由拖拽,lock 代表禁止拖拽 type: String, default: "xy" }, magnetic: { //自动磁吸的方向 'x' | 'y' type: String, default: "" }, ...useRoute.routeProps }, setup(__props) { const route = useRoute.useRoute(); const props = __props; const dropAxis = vue.ref(props.axis); const compMagnetic = vue.computed(() => { if (props.axis == "xy") { return props.magnetic; } else { return ""; } }); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(FloatingBubble.default), vue.mergeProps({ class: "fec-floating-bubble" }, _ctx.$attrs, { axis: vue.unref(dropAxis), magnetic: compMagnetic.value, onClick: vue.unref(route) }), vue.createSlots({ _: 2 }, [ vue.renderList(_ctx.$slots, (item, key) => { return { name: key, fn: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, key) ]) }; }) ]), 1040, ["axis", "magnetic", "onClick"]); }; } }; exports.default = _sfc_main;