Vue.js中是否可以修改props的值?

Vue.js组件中props的修改与双向绑定实践
395 篇文章 ¥29.90 ¥99.00
本文探讨了Vue.js中不应直接修改props的常规原则,并介绍了两种特殊情况:将props用作子组件初始值并通过data同步,以及使用.sync修饰符实现双向绑定。同时强调了在修改props时需注意数据流的可追踪性和维护性。

Vue.js是一种流行的JavaScript框架,用于构建用户界面。在Vue.js中,组件之间通过props属性进行数据传递。Props是一种从父组件向子组件传递数据的机制。一般情况下,Vue.js鼓励将props视为单向数据流,即父组件向子组件传递数据,子组件在其内部使用这些数据,但不应直接修改props的值。这是为了确保组件之间的数据传递是可追踪和可预测的。

虽然Vue.js不建议直接修改props的值,但在某些情况下,可能会有需要修改props的需求。下面将介绍两种常见的情况,并提供相应的源代码示例。

情况一:使用props值作为子组件的初始值

有时候,我们希望将props的值作为子组件内部数据的初始值,以便在子组件中进行操作和修改。在这种情况下,可以使用data选项来定义一个与props同名的数据属性,并通过计算属性或watcher来保持其与props的同步。

<!-- 父组件 -->
<template>
  <div
请分析下面报错原因:[Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "". found in ---> <ACheckboxGroup> <ACol> <ARow> <AFormItem> <AFormModelItem> <ACol> <ARow> <ACard> <AFormModel> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 assertProp @ vue.runtime.esm.js?2b0e:1705 validateProp @ vue.runtime.esm.js?2b0e:1632 updateChildComponent @ vue.runtime.esm.js?2b0e:4147 prepatch @ vue.runtime.esm.js?2b0e:3125 patchVnode @ vue.runtime.esm.js?2b0e:6308 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 patch @ vue.runtime.esm.js?2b0e:6482 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 notify @ vue.runtime.esm.js?2b0e:730 reactiveSetter @ vue.runtime.esm.js?2b0e:1055 proxySetter @ vue.runtime.esm.js?2b0e:4631 eval @ Normal.vue?d49f:1359 Promise.then (async) activated @ Normal.vue?d49f:1357 invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854 callHook @ vue.runtime.esm.js?2b0e:4219 activateChildComponent @ vue.runtime.esm.js?2b0e:4192 callActivatedHooks @ vue.runtime.esm.js?2b0e:4370 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4335 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ VM7446 Normal.vue:34 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.766d0762ad86be534143.hot-update.js:1 vue.runtime.esm.js?2b0e:619 [Vue warn]: Property or method "id" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. found in ---> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 warnNonPresent @ vue.runtime.esm.js?2b0e:2015 get @ vue.runtime.esm.js?2b0e:2070 render @ Normal.vue?29d3:3515 Vue._render @ vue.runtime.esm.js?2b0e:3548 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 merged @ vue.runtime.esm.js?2b0e:3301 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6516 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ Normal.vue?57bc:29 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.f107e98cb1b992dbab44.hot-update.js:1 3vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "". found in ---> <ACheckboxGroup> <ACol> <ARow> <AFormItem> <AFormModelItem> <ACol> <ARow> <ACard> <AFormModel> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 assertProp @ vue.runtime.esm.js?2b0e:1705 validateProp @ vue.runtime.esm.js?2b0e:1632 loop @ vue.runtime.esm.js?2b0e:4665 initProps @ vue.runtime.esm.js?2b0e:4698 initState @ vue.runtime.esm.js?2b0e:4639 Vue._init @ vue.runtime.esm.js?2b0e:5006 VueComponent @ vue.runtime.esm.js?2b0e:5154 createComponentInstanceForVnode @ vue.runtime.esm.js?2b0e:3283 init @ vue.runtime.esm.js?2b0e:3114 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 merged @ vue.runtime.esm.js?2b0e:3301 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6516 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ Normal.vue?57bc:29 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.f107e98cb1b992dbab44.hot-update.js:1 Show 101 more frames Normal.vue?d49f:1312 新建 vue.runtime.esm.js?2b0e:619 [Vue warn]: Property or method "id" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. found in ---> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 warnNonPresent @ vue.runtime.esm.js?2b0e:2015 get @ vue.runtime.esm.js?2b0e:2070 render @ Normal.vue?29d3:3515 Vue._render @ vue.runtime.esm.js?2b0e:3548 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 bind @ index.js?46cf:13 callHook$1 @ vue.runtime.esm.js?2b0e:6680 _update @ vue.runtime.esm.js?2b0e:6601 updateDirectives @ vue.runtime.esm.js?2b0e:6582 invokeCreateHooks @ vue.runtime.esm.js?2b0e:6069 createElm @ vue.runtime.esm.js?2b0e:5956 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 merged @ vue.runtime.esm.js?2b0e:3301 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6516 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ Normal.vue?57bc:29 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.f107e98cb1b992dbab44.hot-update.js:1 Show 162 more frames 3vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "". found in ---> <ACheckboxGroup> <ACol> <ARow> <AFormItem> <AFormModelItem> <ACol> <ARow> <ACard> <AFormModel> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 assertProp @ vue.runtime.esm.js?2b0e:1705 validateProp @ vue.runtime.esm.js?2b0e:1632 updateChildComponent @ vue.runtime.esm.js?2b0e:4147 prepatch @ vue.runtime.esm.js?2b0e:3125 patchVnode @ vue.runtime.esm.js?2b0e:6308 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 updateChildren @ vue.runtime.esm.js?2b0e:6193 patchVnode @ vue.runtime.esm.js?2b0e:6319 patch @ vue.runtime.esm.js?2b0e:6482 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 bind @ index.js?46cf:13 callHook$1 @ vue.runtime.esm.js?2b0e:6680 _update @ vue.runtime.esm.js?2b0e:6601 updateDirectives @ vue.runtime.esm.js?2b0e:6582 invokeCreateHooks @ vue.runtime.esm.js?2b0e:6069 createElm @ vue.runtime.esm.js?2b0e:5956 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 createChildren @ vue.runtime.esm.js?2b0e:6053 createElm @ vue.runtime.esm.js?2b0e:5954 patch @ vue.runtime.esm.js?2b0e:6477 Vue._update @ vue.runtime.esm.js?2b0e:3945 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 Watcher @ vue.runtime.esm.js?2b0e:4468 mountComponent @ vue.runtime.esm.js?2b0e:4073 Vue.$mount @ vue.runtime.esm.js?2b0e:8415 init @ vue.runtime.esm.js?2b0e:3118 merged @ vue.runtime.esm.js?2b0e:3301 createComponent @ vue.runtime.esm.js?2b0e:5978 createElm @ vue.runtime.esm.js?2b0e:5925 patch @ vue.runtime.esm.js?2b0e:6516 Vue._update @ vue.runtime.esm.js?2b0e:3948 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ Normal.vue?57bc:29 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.f107e98cb1b992dbab44.hot-update.js:1 Show 171 more frames axios-interceptors.js?55ef:62 {data: {…}, status: 200, statusText: "OK", headers: {…}, config: {…}, …} vue.runtime.esm.js?2b0e:619 [Vue warn]: Property or method "id" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. found in ---> <Process> <PageToggleTransition> at src/components/transition/PageToggleTransition.vue <Anonymous> <ALayoutContent> <Anonymous> <ALayout> <Anonymous> <ALayout> <AdminLayout> at src/layouts/AdminLayout.vue <TabsView> at src/layouts/tabs/TabsView.vue <ALocaleProvider> <LocaleReceiver> <AConfigProvider> <App> at src/App.vue <Root> warn @ vue.runtime.esm.js?2b0e:619 warnNonPresent @ vue.runtime.esm.js?2b0e:2015 get @ vue.runtime.esm.js?2b0e:2070 render @ Normal.vue?29d3:3515 Vue._render @ vue.runtime.esm.js?2b0e:3548 updateComponent @ vue.runtime.esm.js?2b0e:4066 get @ vue.runtime.esm.js?2b0e:4479 run @ vue.runtime.esm.js?2b0e:4554 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4310 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 notify @ vue.runtime.esm.js?2b0e:730 reactiveSetter @ vue.runtime.esm.js?2b0e:1055 proxySetter @ vue.runtime.esm.js?2b0e:4631 eval @ Normal.vue?d49f:1335 Promise.then (async) activated @ Normal.vue?d49f:1333 invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854 callHook @ vue.runtime.esm.js?2b0e:4219 activateChildComponent @ vue.runtime.esm.js?2b0e:4192 callActivatedHooks @ vue.runtime.esm.js?2b0e:4370 flushSchedulerQueue @ vue.runtime.esm.js?2b0e:4335 eval @ vue.runtime.esm.js?2b0e:1980 flushCallbacks @ vue.runtime.esm.js?2b0e:1906 Promise.then (async) timerFunc @ vue.runtime.esm.js?2b0e:1933 nextTick @ vue.runtime.esm.js?2b0e:1990 queueWatcher @ vue.runtime.esm.js?2b0e:4402 update @ vue.runtime.esm.js?2b0e:4544 Vue.$forceUpdate @ vue.runtime.esm.js?2b0e:3969 eval @ index.js?6435:244 eval @ index.js?6435:242 eval @ index.js?6435:119 eval @ Normal.vue?57bc:29 ./src/pages/mlcs/NewApplication/Mlcs/Normal.vue @ 14.1764557576548.js:118 __webpack_require__ @ app.1764557576548.js:859 hotApplyInternal @ app.1764557576548.js:750 hotApply @ app.1764557576548.js:412 (anonymous) @ app.1764557576548.js:387 Promise.then (async) hotUpdateDownloaded @ app.1764557576548.js:386 hotAddUpdateChunk @ app.1764557576548.js:362 webpackHotUpdateCallback @ app.1764557576548.js:58 (anonymous) @ 14.f107e98cb1b992dbab44.hot-update.js:1 3vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "".
最新发布
12-02
你遇到的报错是: ``` [Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "". ``` 这个警告表明:你正在向一个组件(这里是 `<ACheckboxGroup>`)传递了一个 `value` prop,但这个组件期望的类型是 **Array**,而你传入的是一个 **空字符串(String)**。 --- ## 🔍 报错原因分析 ### 1. **组件期望的 `value` 类型是 `Array`** `<a-checkbox-group>` 是 Ant Design Vue 的组件,它期望的 `value` 是一个数组,用于表示选中的选项。例如: ```vue <a-checkbox-group v-model="selectedValues" /> ``` ```js data() { return { selectedValues: [] // 应该是一个数组 } } ``` 如果你传入的是一个字符串(如 `""`),就会触发这个警告。 --- ### 2. **可能的错误写法** 你可能在模板中这样写了: ```vue <a-checkbox-group :value="someString" /> ``` 或者在 `data` 中初始化了 `someString` 为一个字符串: ```js data() { return { someString: '' } } ``` --- ### 3. **v-model 绑定错误类型** 如果你用了 `v-model`: ```vue <a-checkbox-group v-model="someString" /> ``` 而 `someString` 是字符串类型,也会导致这个错误。 --- ## ✅ 解决方案 ### ✅ 方法一:确保绑定的是数组 修改你的 `data`,将绑定初始化为一个数组: ```js data() { return { selectedValues: [] // 必须是数组 } } ``` 然后在模板中使用: ```vue <a-checkbox-group v-model="selectedValues" /> ``` --- ### ✅ 方法二:如果你使用了 `v-model`,确保不是字符串 不要这样写: ```js data() { return { someString: '' } } ``` 要改成: ```js data() { return { someString: [] // 改成数组 } } ``` --- ### ✅ 方法三:使用计算属性转换类型(不推荐,仅用于兼容旧代码) 如果你的必须是字符串,可以使用计算属性转换为数组: ```js computed: { checkboxValue: { get() { return this.someString ? this.someString.split(',') : []; }, set(value) { this.someString = value.join(','); } } } ``` 然后在模板中使用: ```vue <a-checkbox-group v-model="checkboxValue" /> ``` --- ## 🧪 补充:`id` 未定义的错误 你还有另一个警告: ``` Property or method "id" is not defined on the instance but referenced during render. ``` 这说明你在模板中使用了 `id` 变量,但没有在 `data` 或 `props` 中定义它。例如: ```vue <a-table :rowKey="id" /> ``` 你需要定义它: ```js data() { return { id: 'key' // 或者根据你的业务逻辑定义 } } ``` 或者作为 `props` 传入组件。 --- ## ✅ 总结 | 报错信息 | 原因 | 解决方案 | |---------|------|-----------| | `[Vue warn]: Invalid prop: type check failed for prop "value". Expected Array, got String with value "".` | `<a-checkbox-group>` 的 `value` 期望是数组,但你传入的是字符串 | 将绑定改为数组类型 | | `Property or method "id" is not defined` | 使用了未定义的变量 `id` | 在 `data` 或 `props` 中定义 `id` | --- ## ✅ 推荐调试方式 1. 打开浏览器开发者工具; 2. 查看控制台的警告信息; 3. 查看对应的组件代码; 4. 检查 `v-model`、`:value` 和 `:rowKey` 等属性绑定; 5. 确保类型匹配,尤其是数组和字符串之间不要混用。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值