Comments (3)
Hi @hutong9, please provide a snippet of your code, then I'll try to help you.
from tw-elements.
`
<div style="position: relative;width:100%;"
class="sm:container sm:mx-auto flex flex-wrap items-center justify-between px-4">
<!-- Logo -->
<div>
<a class="mx-2 my-1 flex items-center text-neutral-900 hover:text-neutral-900 focus:text-neutral-900 lg:mb-0 lg:mt-0"
href="/">
<img src="/images/logo.png" style="height: 30px left: 10px;" alt="CCF" loading="lazy" />
</a>
</div>
<!-- Hamburger button for mobile view -->
<button
class="block border-0 bg-transparent px-2 text-neutral-200 hover:no-underline hover:shadow-none focus:no-underline focus:shadow-none focus:outline-none focus:ring-0 dark:text-neutral-200 lg:hidden"
type="button" data-te-collapse-init data-te-target="#navbarSupportedContent8"
aria-controls="navbarSupportedContent8" aria-expanded="false" aria-label="Toggle navigation"
style="position:absolute;top:10px; right:15px;">
<!-- Hamburger icon -->
<span class="[&>svg]:w-7 ">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="h-7 w-7 ">
<path fill-rule="evenodd"
d="M3 6.75A.75.75 0 013.75 6h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 6.75zM3 12a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 12zm0 5.25a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75z"
clip-rule="evenodd" />
</svg>
</span>
</button>
<!-- Collapsible navbar container -->
<div
class="!visible mt-2 hidden flex-grow basis-[100%] items-center justify-center lg:mt-0 lg:!flex lg:basis-auto "
id="navbarSupportedContent8" data-te-collapse-item>
<!-- Left links -->
<ul class="list-style-none flex flex-col pl-0 lg:mt-1 lg:flex-row " data-te-navbar-nav-ref>
<!-- Home link -->
<li class="my-4 pl-2 lg:my-0 lg:pl-2 lg:pr-4" data-te-nav-item-ref>
<NuxtLink to="/"
class="p-0 text-neutral-200 transition duration-200 hover:text-blue-300 hover:ease-in-out focus:text-yellow-500 disabled:text-black/30 motion-reduce:transition-none dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-neutral-400">
首页</NuxtLink>
</li>
<li class="my-4 pl-2 lg:my-0 lg:pl-2 lg:pr-4" data-te-nav-item-ref>
<NuxtLink to="/introduction"
class="p-0 text-neutral-200 transition duration-200 hover:text-blue-300 hover:ease-in-out focus:text-yellow-500 disabled:text-black/30 motion-reduce:transition-none dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-neutral-400">
大会介绍</NuxtLink>
</li>
<!-- Link -->
<li class="mb-4 pl-2 lg:mb-0 lg:pl-0 lg:pr-4" data-te-nav-item-ref>
<NuxtLink to="#"
class="p-0 text-neutral-200 transition duration-200 hover:text-blue-300 hover:ease-in-out focus:text-yellow-500 disabled:text-black/30 motion-reduce:transition-none dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400 lg:px-2 [&.active]:text-black/90 dark:[&.active]:text-neutral-400">
征稿通知</NuxtLink>
</li>
</ul>
</div>
</div>
from tw-elements.
You don't have a nav
wrapper element in your code and data-te-nav-link-ref
on NuxtLink
elements. I recommend you check out our Basic example in the Navbar documentation and compare correctness with yours. It should help you with debugging any issues.
from tw-elements.
Related Issues (20)
- Popconfirm - fix disable scrolling when the modal is opened and restore it when the modal is closed
- Chips (Chip and ChipsInput) - component refactor and add missing functionalities
- Charts - remove dynamic import and build charts as a different module
- Chips (Chip and ChipsInput) - fix dispose method and `add.te.chips` event
- Select/Autocomplete - fix aria-expanded value toggling
- Autocomplete - fix issues with input focus after closing the dropdown on esc
- Popconfirm - fix: way of adding event listeners, `cancel` event and dispose method
- When use tw input inside tw collapse, notch does not get updated correctly HOT 1
- Rating - add inheritance via BaseComponent and fix dispose method
- Lightbox - update image source URLs across all examples
- [Form Input Custom Classes] [data-te-class-notch-leading-valid, middle and trailing not working in Nuxt 3] HOT 2
- [FORMS - SELECT and MODAL] [NOT PROPERLY WORKING] HOT 1
- License AGPL HOT 1
- Timepicker Allow Minutes Step instead of Increment HOT 1
- Datepicker Format to allow more date formats HOT 1
- [Angular integration] [ReferenceError: document is not defined] HOT 3
- [Angular] - Datepicker re-initialization not wroking HOT 2
- Registration on Site - registration not taking, pw reset not working HOT 8
- v2.0 missing components HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tw-elements.