user-data-edit.ts 678 B

1234567891011121314151617181920212223242526
  1. import DictionariesBehavior from "../../../../core/behavior/dictionaries.behavior";
  2. // module/user/components/user-data-edit/user-data-edit.ts
  3. Component({
  4. behaviors: ['wx://form-field-group', DictionariesBehavior],
  5. properties: {
  6. model: { type: Object, value: {} },
  7. retractable: { type: Boolean, value: false },
  8. dirty: { type: Boolean, value: false },
  9. },
  10. data: {
  11. expanded: false,
  12. showSpecialPeriodPicker: true,
  13. },
  14. observers: {
  15. 'model.sex'(value) {
  16. const showSpecialPeriodPicker = value === '1';
  17. this.setData({ showSpecialPeriodPicker })
  18. }
  19. },
  20. methods: {
  21. onExpand() {
  22. this.setData({ expanded: true });
  23. }
  24. }
  25. })