feat(new tool): markdown to word & fix lint
This commit is contained in:
		
							parent
							
								
									1fd83e1ca9
								
							
						
					
					
						commit
						826f64db58
					
				| @ -128,7 +128,7 @@ function activateOption(option: PaletteOption) { | ||||
|       <c-input-text ref="inputRef" v-model:value="searchPrompt" raw-text placeholder="Type to search a tool or a command..." autofocus clearable /> | ||||
| 
 | ||||
|       <div v-for="(options, category) in filteredSearchResult" :key="category"> | ||||
|         <div ml-3 mt-3 text-sm font-bold text-primary op-60> | ||||
|         <div ml-3 mt-3 text-sm text-primary font-bold op-60> | ||||
|           {{ category }} | ||||
|         </div> | ||||
|         <command-palette-option v-for="option in options" :key="option.name" :option="option" :selected="selectedOptionIndex === getOptionIndex(option)" @activated="activateOption" /> | ||||
|  | ||||
| @ -10,4 +10,4 @@ export const tool = defineTool({ | ||||
|   component: () => import('./markdown-to-word.vue'), | ||||
|   icon: Markdown, | ||||
|   createdAt: new Date('2024-08-25'), | ||||
| }); | ||||
| }); | ||||
|  | ||||
| @ -59,8 +59,12 @@ async function convertMarkdownToDocx() { | ||||
|   <div class="markdown-to-word-container"> | ||||
|     <!-- 顶部标题和按钮区 --> | ||||
|     <div class="header"> | ||||
|       <h1 class="title">{{ t('tools.markdown-to-word.title') }}</h1> | ||||
|       <p class="subtitle">{{ t('tools.markdown-to-word.description') }}</p> | ||||
|       <h1 class="title"> | ||||
|         {{ t('tools.markdown-to-word.title') }} | ||||
|       </h1> | ||||
|       <p class="subtitle"> | ||||
|         {{ t('tools.markdown-to-word.description') }} | ||||
|       </p> | ||||
|       <button | ||||
|         class="export-button" | ||||
|         :disabled="isExportDisabled" | ||||
| @ -87,9 +91,11 @@ async function convertMarkdownToDocx() { | ||||
|         <div class="markdown-preview"> | ||||
|           <div v-if="isLoading" class="loading"> | ||||
|             <div class="loading-spinner" /> | ||||
|             <div class="loading-text">{{ t('tools.markdown-to-word.export.disabled') }}</div> | ||||
|             <div class="loading-text"> | ||||
|               {{ t('tools.markdown-to-word.export.disabled') }} | ||||
|             </div> | ||||
|           </div> | ||||
|           <div v-else-if="inputMarkdown" v-html="previewHtml" class="preview-content" /> | ||||
|           <div v-else-if="inputMarkdown" class="preview-content" v-html="previewHtml" /> | ||||
|           <div v-else class="empty-state"> | ||||
|             {{ t('tools.markdown-to-word.input.placeholder') }}<br> | ||||
|             {{ t('tools.markdown-to-word.export.disabled') }} | ||||
| @ -97,7 +103,9 @@ async function convertMarkdownToDocx() { | ||||
|         </div> | ||||
|         <!-- 导出成功提示 --> | ||||
|         <div v-if="lastExportTime" class="export-success"> | ||||
|           <div class="success-icon">✓</div> | ||||
|           <div class="success-icon"> | ||||
|             ✓ | ||||
|           </div> | ||||
|           {{ t('tools.markdown-to-word.notification.success') }} | ||||
|         </div> | ||||
|       </section> | ||||
|  | ||||
| @ -151,7 +151,7 @@ function onSearchInput() { | ||||
|       > | ||||
|         <div flex-1 truncate> | ||||
|           <slot name="displayed-value"> | ||||
|             <input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput"> | ||||
|             <input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full color-current lh-normal @input="onSearchInput"> | ||||
|             <span v-else-if="selectedOption" lh-normal> | ||||
|               {{ selectedOption.label }} | ||||
|             </span> | ||||
|  | ||||
| @ -39,7 +39,7 @@ const headers = computed(() => { | ||||
| <template> | ||||
|   <div class="relative overflow-x-auto rounded"> | ||||
|     <table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description"> | ||||
|       <thead v-if="!hideHeaders" class="bg-#ffffff uppercase text-gray-700 dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5"> | ||||
|       <thead v-if="!hideHeaders" class="bg-#ffffff text-gray-700 uppercase dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5"> | ||||
|         <tr> | ||||
|           <th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs"> | ||||
|             {{ header.label }} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user