ant-design-vue/components/image/PreviewGroup.tsx
Zou Jian 5913cf9c5c
feat: add image (#3235)
* feat: 🆕 image组件 - 添加样式

* feat: 🆕 增加 AImage 组件

* feat: 🆕 参考 ant-design 增加 相关 Image 组件的less定义

* feat: 🆕 Image placeholder 的修改

* fix: 🐞 去除 onPreviewClose 相关

* test: 🧪 image width/height 以及相关测试

* fix: 🐞 fix lint no-setup-props-destructure

* test: 🧪 image test snap file

* refactor: 💡 去掉多加了的文件,重构文件以使逻辑清晰

* feat: 🆕 rc-image 相关内容 列入 vc-image 文件夹中

* feat: 🆕 antd 4.9.1 增加 image-preview-group

* feat: 🆕 add ImagePropsType

* feat: udpate image components

* feat: update image

* feat: update image

Co-authored-by: tanjinzhou <415800467@qq.com>
2020-12-18 18:02:51 +08:00

26 lines
841 B
Vue

import PreviewGroup from '../vc-image/src/PreviewGroup';
import { defineComponent, inject } from 'vue';
import { defaultConfigProvider } from '../config-provider';
import PropTypes from '../_util/vue-types';
const InternalPreviewGroup = defineComponent({
name: 'AImagePreviewGroup',
inheritAttrs: false,
props: { previewPrefixCls: PropTypes.string },
setup(props, { attrs, slots }) {
const configProvider = inject('configProvider', defaultConfigProvider);
return () => {
const { getPrefixCls } = configProvider;
const prefixCls = getPrefixCls('image-preview', props.previewPrefixCls);
return (
<PreviewGroup
previewPrefixCls={prefixCls}
{...{ ...attrs, ...props }}
v-slots={slots}
></PreviewGroup>
);
};
},
});
export default InternalPreviewGroup;