Files
EdgeAdmin/web/public/js/components/server/prior-checkbox.js

25 lines
563 B
JavaScript
Raw Normal View History

2020-09-23 18:43:38 +08:00
Vue.component("prior-checkbox", {
props: ["v-config"],
data: function () {
return {
isPrior: this.vConfig.isPrior
}
},
watch: {
isPrior: function (v) {
this.vConfig.isPrior = v
}
},
template: `<tbody>
<tr :class="{active:isPrior}">
<td class="title">打开独立配置</td>
<td>
<div class="ui toggle checkbox">
<input type="checkbox" v-model="isPrior"/>
<label class="red"></label>
</div>
<p class="comment"><strong v-if="isPrior">[已打开]</strong> </p>
</td>
</tr>
</tbody>`
})