请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

重写之后说list有异常

  1. WARNING  Compiled with 2 warnings16:53:28


  2.  warning  in ./src/views/Auth/index.jsx?vue&type=script&lang=js


  3. "export 'resetPassword' was not found in '@/service'


  4.  warning  in ./src/views/ResetPassword?vue&type=script&lang=js


  5. "export 'resetPassword' was not found in '@/service'

  6. Uncaught (in promise) TypeError: Cannot read property 'list' of undefined

  7.     at _callee$ (index.js?6610:14)

  8.     at tryCatch (runtime.js?96cf:63)

  9.     at Generator.invoke [as _invoke] (runtime.js?96cf:293)

  10.     at Generator.eval [as next] (runtime.js?96cf:118)

  11.     at asyncGeneratorStep (asyncToGenerator.js?1da1:3)

  12.     at _next (asyncToGenerator.js?1da1:25)

  13.     at eval (asyncToGenerator.js?1da1:32)

  14.     at new Promise (<anonymous>)

  15.     at eval (asyncToGenerator.js?1da1:21)

  16.     at getList (index.js?6610:14)

  17. _callee$ @ index.js?6610:14

  18. tryCatch @ runtime.js?96cf:63

  19. invoke @ runtime.js?96cf:293

  20. eval @ runtime.js?96cf:118

  21. asyncGeneratorStep @ asyncToGenerator.js?1da1:3

  22. _next @ asyncToGenerator.js?1da1:25

  23. eval @ asyncToGenerator.js?1da1:32

  24. eval @ asyncToGenerator.js?1da1:21

  25. getList @ index.js?6610:14

  26. eval @ index.js?6610:25

  27. callWithErrorHandling @ runtime-core.esm-bundler.js?5c40:154

  28. callWithAsyncErrorHandling @ runtime-core.esm-bundler.js?5c40:163

  29. hook.__weh.hook.__weh @ runtime-core.esm-bundler.js?5c40:1910

  30. flushPostFlushCbs @ runtime-core.esm-bundler.js?5c40:333

  31. flushJobs @ runtime-core.esm-bundler.js?5c40:369

  32. Promise.then (async)

  33. queueFlush @ runtime-core.esm-bundler.js?5c40:264

  34. queueCb @ runtime-core.esm-bundler.js?5c40:286

  35. queuePostFlushCb @ runtime-core.esm-bundler.js?5c40:292

  36. queueEffectWithSuspense @ runtime-core.esm-bundler.js?5c40:1384

  37. scheduler @ runtime-core.esm-bundler.js?5c40:2071

  38. run @ reactivity.esm-bundler.js?a1e9:183

  39. trigger @ reactivity.esm-bundler.js?a1e9:189

  40. scheduler @ reactivity.esm-bundler.js?a1e9:819

  41. run @ reactivity.esm-bundler.js?a1e9:183

  42. trigger @ reactivity.esm-bundler.js?a1e9:189

  43. scheduler @ reactivity.esm-bundler.js?a1e9:819

  44. run @ reactivity.esm-bundler.js?a1e9:183

  45. trigger @ reactivity.esm-bundler.js?a1e9:189

  46. set value @ reactivity.esm-bundler.js?a1e9:729

  47. finalizeNavigation @ vue-router.esm-bundler.js?6c02:3098

  48. eval @ vue-router.esm-bundler.js?6c02:2971

  49. Promise.then (async)

  50. pushWithRedirect @ vue-router.esm-bundler.js?6c02:2942

  51. push @ vue-router.esm-bundler.js?6c02:2886

  52. install @ vue-router.esm-bundler.js?6c02:3251

  53. use @ runtime-core.esm-bundler.js?5c40:2948

  54. eval @ main.js?56d7:23

  55. ./src/main.js @ app.js:1345

  56. __webpack_require__ @ app.js:854

  57. fn @ app.js:151

  58. 1 @ app.js:1526

  59. __webpack_require__ @ app.js:854

  60. checkDeferredModules @ app.js:46

  61. (anonymous) @ app.js:994

  62. (anonymous) @ app.js:997

import { defineComponent, ref, onMounted } from 'vue';

import { resetPassword } from '@/service';

import { result } from '@/helpers/utils';

import { message } from 'ant-design-vue';


export default defineComponent({

  setup() {

    const list = ref([]);


    const curPage = ref(1);


    const total = ref(0);


    const getList = async () => {

      const res = await resetPassword.list(curPage.value);


       result(res)

          .success(( { list : l , total : t } ) => {

            list.value = l;

            total.value = t;

          });

    };


    onMounted(() => {

          getList();

        });


    return {

      total,

      list,

    };


  },

})


正在回答 回答被采纳积分+3

1回答

然冬 2021-05-10 22:30:54
  1. "export 'resetPassword' was not found in '@/service'

检查 @/service 里有没有导出

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信