Skip to content

Commit 49d2cce

Browse files
committed
feat (ui): 增加 Input 组件
1 parent b7c6dfa commit 49d2cce

2 files changed

Lines changed: 501 additions & 20 deletions

File tree

src/components/setting/Language.vue

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,11 @@
2121
<template #general>
2222
<div class="space-y-4">
2323
<Label label="编译前执行的命令">
24-
<input v-model="pluginConfig.before_compile"
25-
type="text"
26-
placeholder="编译前执行的命令"
27-
class="w-full flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent text-sm"/>
24+
<Input v-model="pluginConfig.before_compile" class="w-full" placeholder="编译前执行的命令"/>
2825
</Label>
2926

3027
<Label label="执行的命令">
31-
<input v-model="pluginConfig.run_command"
32-
type="text"
33-
placeholder="执行的命令"
34-
class="w-full flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent text-sm"/>
28+
<Input v-model="pluginConfig.run_command" class="w-full" placeholder="执行的命令"/>
3529
<div class="flex flex-col mx-2 mt-2 space-y-1.5">
3630
<div class="flex text-sm font-medium text-gray-700 dark:text-gray-300 ml-1 space-x-4">
3731
<div class="font-bold">$filename</div>
@@ -45,28 +39,19 @@
4539
</Label>
4640

4741
<Label label="编译完成后执行的命令">
48-
<input v-model="pluginConfig.after_compile"
49-
type="text"
50-
placeholder="编译完成后执行的命令"
51-
class="w-full flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent text-sm"/>
42+
<Input v-model="pluginConfig.after_compile" class="w-full" placeholder="编译完成后执行的命令"/>
5243
</Label>
5344

5445
<Label label="文件后缀名">
55-
<input v-model="pluginConfig.extension"
56-
type="text"
57-
placeholder="输入文件后缀名"
58-
class="w-full flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent text-sm"/>
46+
<Input v-model="pluginConfig.extension" class="w-full" placeholder="输入文件后缀名"/>
5947
</Label>
6048
</div>
6149
</template>
6250

6351
<template #environment>
6452
<Label label="语言环境目录">
6553
<div class="flex gap-2">
66-
<input v-model="pluginConfig.execute_home"
67-
type="text"
68-
placeholder="选择语言环境目录路径"
69-
class="flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent text-sm"/>
54+
<Input v-model="pluginConfig.execute_home" class="w-full" placeholder="选择语言环境目录路径"/>
7055

7156
<Button type="primary"
7257
:icon-only="true"
@@ -109,6 +94,7 @@ import Button from '../../ui/Button.vue'
10994
import Tabs from '../../ui/Tabs.vue'
11095
import Number from '../../ui/Number.vue'
11196
import Label from '../../ui/Label.vue'
97+
import Input from '../../ui/Input.vue'
11298
import { useLanguageSettings } from '../../composables/useLanguageSettings'
11399
import type PluginConfig from '../../types/plugin'
114100

0 commit comments

Comments
 (0)