59 lines
		
	
	
		
			993 B
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			993 B
		
	
	
	
		
			Vue
		
	
	
| <docs>
 | |
| ---
 | |
| order: 5
 | |
| title:
 | |
|   zh-CN: įåŦéįšéžæĨæšå
 | |
|   en-US: Listening for anchor link change
 | |
| ---
 | |
| 
 | |
| ## zh-CN
 | |
| 
 | |
| įåŦéįšéžæĨæšåã
 | |
| 
 | |
| ## en-US
 | |
| 
 | |
| Listening for anchor link change.
 | |
| </docs>
 | |
| 
 | |
| <template>
 | |
|   <a-anchor
 | |
|     :affix="false"
 | |
|     :items="[
 | |
|       {
 | |
|         key: '1',
 | |
|         href: '#components-anchor-demo-basic',
 | |
|         title: 'Basic demo',
 | |
|       },
 | |
|       {
 | |
|         key: '2',
 | |
|         href: '#components-anchor-demo-static',
 | |
|         title: 'Static demo',
 | |
|       },
 | |
|       {
 | |
|         key: '3',
 | |
|         href: '#api',
 | |
|         title: 'API',
 | |
|         children: [
 | |
|           {
 | |
|             key: '4',
 | |
|             href: '#anchor-props',
 | |
|             title: 'Anchor Props',
 | |
|           },
 | |
|           {
 | |
|             key: '5',
 | |
|             href: '#link-props',
 | |
|             title: 'Link Props',
 | |
|           },
 | |
|         ],
 | |
|       },
 | |
|     ]"
 | |
|     @change="onChange"
 | |
|   ></a-anchor>
 | |
| </template>
 | |
| 
 | |
| <script lang="ts" setup>
 | |
| const onChange = (link: string) => {
 | |
|   console.log('Anchor:OnChange', link);
 | |
| };
 | |
| </script>
 |