Xiao_123 1 year ago
parent
commit
4d833a49b0
2 changed files with 0 additions and 89 deletions
  1. 0 47
      src/components/FormUI/textArea/index.vue
  2. 0 42
      src/components/FormUI/textarea/index.vue

+ 0 - 47
src/components/FormUI/textArea/index.vue

@@ -1,47 +0,0 @@
-<template>
-  <div :style="{ width: item.width ? item.width + 'px' : '100%' }">
-    <v-textarea
-      v-model="value"
-      variant="outlined"
-      :counter="item.counter || 200" 
-      color="primary" 
-      :validate-on="item.validateOn || 'input'"
-      :rules="item.rules"
-      :disabled="item.disabled"
-      :style="{width: item.width}"
-      :label="item.label"
-      :placeholder="item.placeholder || item.label"
-      :autofocus="item.autofocus"
-      :required="item.required"
-      :class="item.class"
-      :suffix="item.suffix"
-      :append-inner-icon="item.appendInnerIcon"
-      :clearable="item.clearable"
-      :readonly="item.readonly"
-      :prepend-inner-icon="item.prependInnerIcon"
-      hide-spin-buttons
-      :hide-details="item.hideDetails || false"
-      @update:modelValue="modelValueUpDate"
-    ></v-textarea>
-  </div>
-</template>
-<script setup>
-import { defineEmits, ref, watch } from 'vue';
-defineOptions({ name:'FormUI-v-textarea'})
-
-const props = defineProps({item: Object, modelValue: String})
-const emit = defineEmits(['update:modelValue'])
-const item = props.item
-const value = ref(props.modelValue)
-
-watch(() => props.modelValue, (newVal) => {
-  value.value = newVal
-})
-const modelValueUpDate = (val) => {
-  value.value = val
-  emit('update:modelValue', value.value)
-}
-</script>
-<style lang="scss" scoped>
-
-</style>

+ 0 - 42
src/components/FormUI/textarea/index.vue

@@ -1,42 +0,0 @@
-<template>
-  <div :style="{ width: item.width ? item.width + 'px' : '100%' }">
-    <v-textarea
-      v-model="value"
-      :rules="item.rules"
-      variant="outlined"
-      :label="item.label"
-      :counter="item.counter"
-      :bg-color="item.bgColor"
-      :color="item.color || 'primary'"
-      :validate-on="item.validateOn"
-      :rows="item.rows || 3"
-      :disabled="item.disabled"
-      :density="item.dense || 'compact'"
-      :placeholder="item.placeholder || item.label"
-      :no-resize="!item.resize"
-      @update:modelValue="modelValueUpDate"
-    ></v-textarea>
-  </div>
-</template>
-<script setup>
-import { defineEmits, ref, watch } from 'vue';
-defineOptions({ name:'FormUI-v-textarea'})
-
-const props = defineProps({item: Object, modelValue: [String, Number]})
-const emit = defineEmits(['update:modelValue', 'change'])
-const item = props.item
-const value = ref(props.modelValue)
-
-watch(() => props.modelValue, (newVal) => {
-  value.value = newVal
-})
-const modelValueUpDate = (val) => {
-  value.value = val
-  emit('update:modelValue', value.value)
-  emit('change', value.value)
-}
-
-</script>
-<style lang="scss" scoped>
-
-</style>