|
@@ -15,46 +15,13 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { InputComponents, inputProps } from './input'
|
|
|
-const props = defineProps(inputProps)
|
|
|
|
|
|
+defineOptions({
|
|
|
+ name: 'UIInput',
|
|
|
+})
|
|
|
+const props = defineProps(inputProps)
|
|
|
const emit = defineEmits(['update:modelValue'])
|
|
|
const handleUpdate = (newValue: string) => {
|
|
|
emit('update:modelValue', newValue)
|
|
|
}
|
|
|
-// const type = computed(() => (types[props.type] ? props.type : 'text'))
|
|
|
-// const childProps = computed(() => {
|
|
|
-// if (props.type) {
|
|
|
-// const retain = InputComponents[props.type].props
|
|
|
-// console.log('retain', retain)
|
|
|
-// const cProps = {}
|
|
|
-// if (retain) {
|
|
|
-// for (let key in props) {
|
|
|
-// console.log('key', key)
|
|
|
-// if (Object.keys(retain).includes(key)) {
|
|
|
-// cProps[key] = props[key]
|
|
|
-// }
|
|
|
-// }
|
|
|
-// console.log('cProps', cProps)
|
|
|
-// }
|
|
|
-
|
|
|
-// return childProps
|
|
|
-// }
|
|
|
-// return false
|
|
|
-// })
|
|
|
-
|
|
|
-// console.log('childProps', childProps)
|
|
|
-// const style = computed(() => {
|
|
|
-// const style = {}
|
|
|
-// const keys = Object.keys(childProps.value)
|
|
|
-
|
|
|
-// if (!keys.includes('width')) {
|
|
|
-// style.width = props.width
|
|
|
-// }
|
|
|
-
|
|
|
-// if (!keys.includes('height')) {
|
|
|
-// style.height = props.height
|
|
|
-// }
|
|
|
-
|
|
|
-// return style
|
|
|
-// })
|
|
|
</script>
|