push
This commit is contained in:
30
lib/component/form/input/input-text.vue
Normal file
30
lib/component/form/input/input-text.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<a-input v-bind="$attrs" class="ns-hide">
|
||||
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
|
||||
<slot :name="item" v-bind="data || {}"> </slot>
|
||||
</template>
|
||||
</a-input>
|
||||
<span class="ant-input">
|
||||
<template v-if="optionsMap">{{ optionsMap[$attrs.value] }}</template>
|
||||
<template v-else>{{ $attrs.value }}</template>
|
||||
</span>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NsInputText',
|
||||
props: {
|
||||
defaultValue: {
|
||||
type: [String, Number],
|
||||
},
|
||||
optionsMap: {},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ant-input,
|
||||
.ant-input:hover {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user