/** * @file 组件 empty * @author chenkai13 */ import './style/index.less'; import Base from 'santd/base'; import {classCreator} from '../core/util'; import defaultEmptyImg from './empty.svg'; import simpleEmptyImg from './simple.svg'; import localeReceiver from '../locale-provider/receiver'; import type * as I from './interface'; const prefixCls = classCreator('empty')(); export default class Empty extends Base { static template = /* html */ `
{{description || locale.description || 'empty'}}

`; static computed: I.Computed = localeReceiver.computed; static PRESENTED_IMAGE_DFEAULT: string; static PRESENTED_IMAGE_SIMPLE: string; initData(): I.State { return { componentName: 'Empty', image: defaultEmptyImg, simpleEmptyImg }; }; inited(): void { this.data.set('hasDescription', !!this.sourceSlots.named.description); localeReceiver.inited.call(this); }; }; Empty.PRESENTED_IMAGE_DFEAULT = defaultEmptyImg; Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;