4 changed files with 23 additions and 1 deletions
			
			
		| @ -0,0 +1,17 @@ | |||||
|  | <template> | ||||
|  |   <a :href="href" style="cursor: pointer; color: blue" v-bind="attrs">{{ label }}</a> | ||||
|  | </template> | ||||
|  | 
 | ||||
|  | <script setup lang="ts"> | ||||
|  | import { defineProps, useAttrs } from 'vue'; | ||||
|  | 
 | ||||
|  | const attrs = useAttrs(); | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * A标签组件接收属性 | ||||
|  |  */ | ||||
|  | const props = defineProps({ | ||||
|  |   label: { type: String, default: '' }, | ||||
|  |   href: { type: String, default: 'javascript:void 0;' }, | ||||
|  | }); | ||||
|  | </script> | ||||
					Loading…
					
					
				
		Reference in new issue