cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
56 lines (55 loc) • 1.55 kB
JavaScript
import { openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
import style0 from "./Panel.vue_used_vue_type_style_index_0_lang.module.mjs";
import _export_sfc from "../../../_virtual/plugin-vue_export-helper.mjs";
const _sfc_main = {
name: "Panel",
props: {
visible: {
type: Boolean,
required: true,
default: true
},
fullscreen: {
type: Boolean,
required: true
}
},
emits: ["mouseout"],
computed: {
panelClasses() {
return {
[this.$style.panel]: true,
[this.$style.visible]: this.visible,
[this.$style.invisible]: !this.visible,
[this.$style.fullscreen]: this.fullscreen
};
}
},
methods: {
onMouseOut(e) {
try {
const el = e.toElement || e.relatedTarget;
if (this.$refs.panel.contains(el)) {
return;
}
this.$emit("mouseout");
} catch (e2) {
console.debug("Missing some cross browser here", e2);
}
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", {
ref: "panel",
class: normalizeClass($options.panelClasses),
onMouseout: _cache[0] || (_cache[0] = (...args) => $options.onMouseOut && $options.onMouseOut(...args))
}, [
renderSlot(_ctx.$slots, "default")
], 34);
}
const cssModules = {
"$style": style0
};
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__cssModules", cssModules]]);
export { Panel as default };