智慧申请系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
490 B

  1. import { VantComponent } from '../common/component';
  2. const PRESETS = ['error', 'search', 'default', 'network'];
  3. VantComponent({
  4. props: {
  5. description: String,
  6. image: {
  7. type: String,
  8. value: 'default',
  9. },
  10. },
  11. created() {
  12. if (PRESETS.indexOf(this.data.image) !== -1) {
  13. this.setData({
  14. imageUrl: `https://img.yzcdn.cn/vant/empty-image-${this.data.image}.png`,
  15. });
  16. } else {
  17. this.setData({ imageUrl: this.data.image });
  18. }
  19. },
  20. });