newUser.js 745 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Page({
  2. data:{
  3. option1: [
  4. { text: '学生', value: 0 },
  5. { text: '老师', value: 1 },
  6. ],
  7. value1: 0,
  8. option2: [
  9. { text: '请选择', value: 3 },
  10. { text: '计科', value: 4 },
  11. { text: '软件', value: 5 },
  12. ],
  13. value2: 3,
  14. option3: [
  15. { text: '请选择', value: 3 },
  16. { text: '火锅', value: 6 },
  17. { text: '烧烤', value: 7 },
  18. { text: '烤肉', value: 8 },
  19. ],
  20. value3: 3,
  21. date: '',
  22. show: false,
  23. },
  24. onDisplay(){
  25. this.setData({ show: true });
  26. },
  27. onClose() {
  28. this.setData({ show: false });
  29. },
  30. formatDate(date) {
  31. date = new Date(date);
  32. },
  33. onConfirm(event) {
  34. this.setData({
  35. show: false,
  36. date: this.formatDate(event.detail),
  37. })
  38. }
  39. });