hospitalIntroduction.js 525 B

123456789101112131415161718192021222324252627282930313233
  1. import { getRichText } from './service';
  2. Component({
  3. props: {
  4. componentData: {}
  5. },
  6. data: {
  7. richText: ''
  8. },
  9. async didMount() {
  10. const {
  11. componentData
  12. } = this.props;
  13. const {
  14. componentUUID
  15. } = componentData;
  16. await this.fetchRichValue(componentUUID);
  17. },
  18. methods: {
  19. async fetchRichValue(uuid) {
  20. const {
  21. abRichText
  22. } = await getRichText({
  23. componentUuid: uuid
  24. });
  25. this.setData({
  26. richText: abRichText
  27. });
  28. }
  29. }
  30. });