Title.js 677 B

12345678910111213141516171819202122232425262728293031
  1. import { createVNode as _createVNode } from "vue";
  2. import { defineComponent } from 'vue';
  3. export const skeletonTitleProps = () => ({
  4. prefixCls: String,
  5. width: {
  6. type: [Number, String]
  7. }
  8. });
  9. const SkeletonTitle = defineComponent({
  10. compatConfig: {
  11. MODE: 3
  12. },
  13. name: 'SkeletonTitle',
  14. props: skeletonTitleProps(),
  15. setup(props) {
  16. return () => {
  17. const {
  18. prefixCls,
  19. width
  20. } = props;
  21. const zWidth = typeof width === 'number' ? `${width}px` : width;
  22. return _createVNode("h3", {
  23. "class": prefixCls,
  24. "style": {
  25. width: zWidth
  26. }
  27. }, null);
  28. };
  29. }
  30. });
  31. export default SkeletonTitle;