Files
EdgeAdmin/web/public/js/components/server/http-stat-config-box.js

33 lines
795 B
JavaScript
Raw Normal View History

2020-09-20 14:48:35 +08:00
Vue.component("http-stat-config-box", {
props: ["v-stat-config", "v-is-location", "v-is-group"],
2020-09-20 14:48:35 +08:00
data: function () {
let stat = this.vStatConfig
if (stat == null) {
stat = {
2020-09-23 18:43:38 +08:00
isPrior: false,
2021-01-25 16:40:49 +08:00
isOn: false
2020-09-20 14:48:35 +08:00
}
}
return {
stat: stat
}
},
template: `<div>
<input type="hidden" name="statJSON" :value="JSON.stringify(stat)"/>
<table class="ui table definition selectable">
<prior-checkbox :v-config="stat" v-if="vIsLocation || vIsGroup" ></prior-checkbox>
<tbody v-show="(!vIsLocation && !vIsGroup) || stat.isPrior">
2020-09-23 18:43:38 +08:00
<tr>
2022-11-10 15:07:15 +08:00
<td class="title">启用统计</td>
2020-09-23 18:43:38 +08:00
<td>
<div class="ui checkbox">
<input type="checkbox" v-model="stat.isOn"/>
<label></label>
</div>
</td>
</tr>
</tbody>
2020-09-20 14:48:35 +08:00
</table>
<div class="margin"></div>
</div>`
})