mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 11:00:39 +00:00
vue components refactoring
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{ 'mb-6 sm:mb-7': !isLast }"
|
||||
class="w-full justify-between space-y-4 sm:flex sm:space-x-8 sm:space-x-2 sm:space-y-0"
|
||||
>
|
||||
<!--Label for input-->
|
||||
<div class="leading-5">
|
||||
<label class="mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"> {{ title }}: </label>
|
||||
|
||||
<!--Input Description-->
|
||||
<span v-if="description" class="block text-xs leading-4 dark:text-gray-500 text-gray-500" v-html="description"></span>
|
||||
|
||||
<!--Input Description-->
|
||||
<span v-if="error" class="error-message">
|
||||
{{ error }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!--Form element-->
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppInputButton',
|
||||
props: ['description', 'isLast', 'title', 'error'],
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div :class="{ 'mb-6 sm:mb-7': !isLast }" class="flex w-full items-center justify-between space-x-2 sm:space-x-8">
|
||||
<!--Label for input-->
|
||||
<div class="leading-5">
|
||||
<label class="mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"> {{ title }}: </label>
|
||||
|
||||
<!--Input Description-->
|
||||
<span v-if="description" class="block text-xs leading-4 dark:text-gray-500 text-gray-500" v-html="description"></span>
|
||||
|
||||
<!--Input Description-->
|
||||
<span v-if="error" class="pt-2 text-xs dark:text-rose-600 text-rose-600">
|
||||
{{ error }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!--Form element-->
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppInputSwitch',
|
||||
props: ['description', 'isLast', 'title', 'error'],
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div :class="{ 'mb-6 sm:mb-7': !isLast }">
|
||||
<!--Label for input-->
|
||||
<label v-if="title" class="mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200">
|
||||
{{ title }}:
|
||||
</label>
|
||||
|
||||
<!--Form element-->
|
||||
<slot />
|
||||
|
||||
<!--Input Description-->
|
||||
<span v-if="error" class="pt-2 text-xs dark:text-rose-600 text-rose-600">
|
||||
{{ error }}
|
||||
</span>
|
||||
|
||||
<!--Input Description-->
|
||||
<small v-if="description" class="block pt-2 text-xs leading-4 dark:text-gray-500 text-gray-500" v-html="description"></small>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppInputText',
|
||||
props: ['description', 'isLast', 'title', 'error'],
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user