Closed NooBiToo closed 4 years ago
`
</div>
<div class="table-wrap">
<sorted-table :values="this.ammo_data">
<thead>
<tr>
<th colspan="9"></th>
<th colspan="11" class="hr-line">
Количество точных выстрелов для убийства
</th>
</tr>
<tr>
<th class="clickable" rowspan="2" scope="col">
<sort-link name="list_caliber">Калибр</sort-link>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span><sort-link name="list_items_damage">Урон</sort-link></span>
</span>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span>Бронепробитие</span>
</span>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span>Повреждение брони</span>
</span>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span>Вероятность фрагментации</span>
</span>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span>Скорость (м/сек)</span>
</span>
</th>
<th class="tilted clickable" rowspan="2" scope="col">
<span>
<span>Вероятность рикошет</span>
</span>
</th>
<th rowspan="2" class="spacer"></th>
<th colspan="3" class="armor_title">Нет брони</th>
<th rowspan="2" class="smallspacer"></th>
<th colspan="3" class="armor_title">Gen4 Штурм.</th>
<th rowspan="2" class="smallspacer"></th>
<th colspan="3" class="armor_title">Жук-6а</th>
</tr>
<tr class="compare">
<th>Мин</th>
<th>Срд.</th>
<th>Макс</th>
<th>Мин</th>
<th>Срд.</th>
<th>Макс</th>
<th>Мин</th>
<th>Срд.</th>
<th>Макс</th>
</tr>
</thead>
<tbody class="tbody">
<template v-for="value in sort.values">
<template
v-if="caliber === '' || value.list_caliber == caliber"
>
<tr :key="value.id">
<td data-label="Калибр">
<span>{{ value.list_caliber }}</span>
</td>
<td data-label="Урон">
<span>
<span class="val">{{ value.list_items_damage }}</span>
</span>
</td>
<td data-label="Бронепробитие">
<span>
<span class="val">{{
value.list_items_arm_pentra
}}</span>
</span>
</td>
<td data-label="Повреждение брони">
<span>
<span class="val">{{
value.list_items_arm_damage
}}</span>
</span>
</td>
<td data-label="Вероятность фрагментации">
<span>
<span class="val">{{
value.list_items_bullet_frag
}}</span>
</span>
</td>
<td data-label="Скорость (м/сек)">
<span>
<span class="val">{{ value.list_items_speed }}</span>
</span>
</td>
<td data-label="Вероятность рикошет">
<span>
<span class="val">{{ value.list_items_ricochet }}</span>
</span>
</td>
<td class="spacer"></td>
<td
data-label="Без брони: минимальное количество попаданий"
>
<span class="val">{{
value.list_items_without_armor_min
}}</span>
</td>
<td
data-label="Без брони: минимальное количество попаданий"
>
<span class="val">{{
value.list_items_without_armor_avg
}}</span>
</td>
<td
data-label="Без брони: минимальное количество попаданий"
>
<span class="val">{{
value.list_items_without_armor_max
}}</span>
</td>
<td class="smallspacer"></td>
<td
data-label="Gen4 штурмовой: минимальное количество попаданий"
>
<span class="val">{{ value.list_items_gen4_min }}</span>
</td>
<td
data-label="Gen4 штурмовой: минимальное количество попаданий"
>
<span class="val">{{ value.list_items_gen4_avg }}</span>
</td>
<td
data-label="Gen4 штурмовой: минимальное количество попаданий"
>
<span class="val">{{ value.list_items_gen4_max }}</span>
</td>
<td class="smallspacer"></td>
<td data-label="Жук-6а: минимальное количество попаданий">
<span class="val">{{ value.list_items_zhuk6_min }}</span>
</td>
<td data-label="Жук-6а: минимальное количество попаданий">
<span class="val">{{ value.list_items_zhuk6_avg }}</span>
</td>
<td data-label="Жук-6а: минимальное количество попаданий">
<span class="val">{{ value.list_items_zhuk6_max }}</span>
</td>
</tr>
</template>
</template>
</tbody>
</sorted-table>
`
Thanks for your work, that's cool But pls help me Errors: Error in render: "TypeError: Cannot read property 'values' of undefined" Property or method "sort" 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.
TypeError: Cannot read property 'values' of undefined at Proxy.render (eval at ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4b1571d4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/AmmoTable.vue?vue&type=template&id=66b074c0& (app.js:998),:84:41)
at VueComponent.Vue._render (vue.runtime.esm.js?2b0e:3548)
at VueComponent.updateComponent (vue.runtime.esm.js?2b0e:4066)
at Watcher.get (vue.runtime.esm.js?2b0e:4479)
at Watcher.run (vue.runtime.esm.js?2b0e:4554)
at flushSchedulerQueue (vue.runtime.esm.js?2b0e:4310)
at Array.eval (vue.runtime.esm.js?2b0e:1980)
at flushCallbacks (vue.runtime.esm.js?2b0e:1906)
logError @ vue.runtime.esm.js?2b0e:1888
globalHandleError @ vue.runtime.esm.js?2b0e:1879
handleError @ vue.runtime.esm.js?2b0e:1839
Vue._render @ vue.runtime.esm.js?2b0e:3550
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