skeleton-input.tsx 594 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import { defineComponent } from 'vue';
import type { PropType } from 'vue';
import { useNamespace } from '@ibiz-template/vue-util';

export default defineComponent({
  props: {
    size: {
      type: String as PropType<'large' | 'medium' | 'small' | 'default'>,
      default: 'default',
    },
    active: Boolean,
  },
  setup(props) {
    const ns = useNamespace('skeleton-element');

    return () => (
      <div class={`${ns.b()} ${props.active ? ns.m('active') : ''}`.trim()}>
        <skeleton-element prefixClass='input' props={props}></skeleton-element>
      </div>
    );
  },
});