Skip to content

Commit

Permalink
refactor: update observer demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenrui committed Feb 6, 2024
1 parent b88428c commit fee22b1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions demo/observer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mini Demo Observer</title>
<script src="/dist/minijs.umd.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<button>Add Item</button>
<ol>
<body class="p-40">
<button class="px-2 py-1 bg-gray-200 rounded-md text-base">Add Item</button>

<ol class="mt-8 list-decimal ml-4">
<li>
<button
:mouseenter="isHovered = true"
:mouseleave="isHovered = false"
:class="isHovered ? 'bg-red-200' : ''"
:click="this.parentNode.parentNode.removeChild(this.parentNode)"
>
list item (click to delete)
Expand Down

0 comments on commit fee22b1

Please sign in to comment.