WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2020-12-01 9b2f52f8e276d6a80a19c2d487163e34273ec03a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * CInput
 * @author Tevin
 */
 
<template>
    <AtInput
        :name="itemData.name"
        :title="itemData.label"
        :type="type"
        :placeholder="placeholder"
        :required="itemData.required"
        :error="itemData.error"
        :value="itemData.formData[itemData.name]"
        :onChange="evt=>itemData.onChange(evt)"
    >
        <slot />
    </AtInput>
</template>
 
<script>
import { AtInput } from 'taro-ui-vue';
 
export default {
    name: 'CInput',
    components: {
        AtInput,
    },
    props: {
        type: String,
        placeholder: String,
        itemData: Object,
    },
};
</script>