File tree 1 file changed +5
-19
lines changed
packages/runtime-core/src/helpers
1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change 1
1
import type { VNode , VNodeChild } from '../vnode'
2
- import {
3
- isReactive ,
4
- isShallow ,
5
- shallowReadArray ,
6
- toReactive ,
7
- } from '@vue/reactivity'
8
2
import { isArray , isObject , isString } from '@vue/shared'
9
3
import { warn } from '../warning'
10
4
@@ -67,20 +61,12 @@ export function renderList(
67
61
const sourceIsArray = isArray ( source )
68
62
69
63
if ( sourceIsArray || isString ( source ) ) {
70
- const sourceIsReactiveArray = sourceIsArray && isReactive ( source )
71
- let needsWrap = false
72
- if ( sourceIsReactiveArray ) {
73
- needsWrap = ! isShallow ( source )
74
- source = shallowReadArray ( source )
75
- }
76
64
ret = new Array ( source . length )
77
- for ( let i = 0 , l = source . length ; i < l ; i ++ ) {
78
- ret [ i ] = renderItem (
79
- needsWrap ? toReactive ( source [ i ] ) : source [ i ] ,
80
- i ,
81
- undefined ,
82
- cached && cached [ i ] ,
83
- )
65
+ let i = 0
66
+
67
+ for ( let sourceItem of source ) {
68
+ ret [ i ] = renderItem ( sourceItem , i , undefined , cached && cached [ i ] )
69
+ i ++
84
70
}
85
71
} else if ( typeof source === 'number' ) {
86
72
if ( __DEV__ && ! Number . isInteger ( source ) ) {
You can’t perform that action at this time.
0 commit comments