@jvs-milkdown/crepe 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +6 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +6 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/theme/common/image-block.css +5 -2
- package/package.json +4 -4
- package/src/feature/fixed-toolbar/menu-bar.tsx +8 -1
- package/src/theme/common/image-block.css +6 -2
package/lib/cjs/index.js
CHANGED
|
@@ -7053,7 +7053,7 @@ const MenuBar = vue.defineComponent({
|
|
|
7053
7053
|
activeSubmenu.value = menuKey;
|
|
7054
7054
|
};
|
|
7055
7055
|
const closeMenu = (e) => {
|
|
7056
|
-
if (showMenu.value && containerRef.value && !containerRef.value.contains(e.target)) {
|
|
7056
|
+
if (showMenu.value && containerRef.value && !containerRef.value.contains(e.target) && mainRef.value && !mainRef.value.contains(e.target)) {
|
|
7057
7057
|
showMenu.value = false;
|
|
7058
7058
|
activeSubmenu.value = null;
|
|
7059
7059
|
if (rafId) cancelAnimationFrame(rafId);
|
|
@@ -7173,6 +7173,11 @@ const MenuBar = vue.defineComponent({
|
|
|
7173
7173
|
{
|
|
7174
7174
|
key: menuKey,
|
|
7175
7175
|
onMouseenter: () => onMouseEnterItem(menuKey),
|
|
7176
|
+
onMouseleave: () => {
|
|
7177
|
+
if (hasSubmenu(menuKey)) {
|
|
7178
|
+
activeSubmenu.value = null;
|
|
7179
|
+
}
|
|
7180
|
+
},
|
|
7176
7181
|
style: {
|
|
7177
7182
|
position: "relative",
|
|
7178
7183
|
padding: "8px 16px",
|