1.4.5.2
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加带宽区间</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100" ref="focus"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最低带宽 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minMB" maxlength="12" style="width:10em" v-model="minMB" autocomplete="off"/>
|
||||
<span class="ui label">Mbps</span>
|
||||
</div>
|
||||
<p class="comment">使用比特作为最小单位。<span v-if="minSize.length > 0">相当于:{{minSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最高带宽 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="maxMB" maxlength="12" style="width:10em" v-model="maxMB" autocomplete="off"/>
|
||||
<span class="ui label">Mbps</span>
|
||||
</div>
|
||||
<p class="comment">使用比特作为最小单位,0表示没有限制。<span v-if="maxSize.length > 0">相当于:{{maxSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,29 @@
|
||||
Tea.context(function () {
|
||||
this.minMB = ""
|
||||
this.minSize = ""
|
||||
|
||||
this.maxMB = ""
|
||||
this.maxSize = ""
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("minMB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v <= 0) {
|
||||
that.minSize = ""
|
||||
} else {
|
||||
that.minSize = teaweb.formatBits(v * Math.pow(1024, 2))
|
||||
}
|
||||
})
|
||||
this.$watch("maxMB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v < 0) {
|
||||
that.maxSize = ""
|
||||
} else if (v == 0) {
|
||||
that.maxSize = "∞"
|
||||
} else {
|
||||
that.maxSize = teaweb.formatBits(v * Math.pow(1024, 2))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
h3 var {
|
||||
font-style: normal;
|
||||
}
|
||||
/*# sourceMappingURL=createPopup.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AAAA,EAAG;EACF,kBAAA","file":"createPopup.css"}
|
||||
@@ -0,0 +1,36 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加流量区间</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100" ref="focus"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最低流量 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minGB" maxlength="12" style="width:10em" v-model="minGB" autocomplete="off"/>
|
||||
<span class="ui label">GiB</span>
|
||||
</div>
|
||||
<p class="comment">使用字节作为最小单位。<span v-if="minSize.length > 0">相当于:{{minSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最高流量 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="maxGB" maxlength="12" style="width:10em" v-model="maxGB" autocomplete="off"/>
|
||||
<span class="ui label">GiB</span>
|
||||
</div>
|
||||
<p class="comment">使用字节作为最小单位,0表示没有限制。<span v-if="maxSize.length > 0">相当于:{{maxSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,29 @@
|
||||
Tea.context(function () {
|
||||
this.minGB = ""
|
||||
this.minSize = ""
|
||||
|
||||
this.maxGB = ""
|
||||
this.maxSize = ""
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("minGB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v <= 0) {
|
||||
that.minSize = ""
|
||||
} else {
|
||||
that.minSize = teaweb.formatBytes(v * Math.pow(1024, 3))
|
||||
}
|
||||
})
|
||||
this.$watch("maxGB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v < 0) {
|
||||
that.maxSize = ""
|
||||
} else if (v == 0) {
|
||||
that.maxSize = "∞"
|
||||
} else {
|
||||
that.maxSize = teaweb.formatBytes(v * Math.pow(1024, 3))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
h3 var {
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改带宽区间</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="itemId" :value="item.id"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100" ref="focus" v-model="item.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最低带宽 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minMB" maxlength="12" style="width:10em" v-model="minMB" autocomplete="off"/>
|
||||
<span class="ui label">Mbps</span>
|
||||
</div>
|
||||
<p class="comment">使用比特作为最小单位。<span v-if="minSize.length > 0">相当于:{{minSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最高带宽 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="maxMB" maxlength="12" style="width:10em" v-model="maxMB" autocomplete="off"/>
|
||||
<span class="ui label">Mbps</span>
|
||||
</div>
|
||||
<p class="comment">使用比特作为最小单位,0表示没有限制。<span v-if="maxSize.length > 0">相当于:{{maxSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,32 @@
|
||||
Tea.context(function () {
|
||||
this.minMB = 0
|
||||
this.minSize = ""
|
||||
|
||||
this.maxMB = 0
|
||||
this.maxSize = ""
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("minMB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v <= 0) {
|
||||
that.minSize = ""
|
||||
} else {
|
||||
that.minSize = teaweb.formatBits(v * Math.pow(1024, 2))
|
||||
}
|
||||
})
|
||||
this.$watch("maxMB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v < 0) {
|
||||
that.maxSize = ""
|
||||
} else if (v == 0) {
|
||||
that.maxSize = "∞"
|
||||
} else {
|
||||
that.maxSize = teaweb.formatBits(v * Math.pow(1024, 2))
|
||||
}
|
||||
})
|
||||
|
||||
this.minMB = this.item.minMB
|
||||
this.maxMB = this.item.maxMB
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,37 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>修改流量区间</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="itemId" :value="item.id"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100" ref="focus" v-model="item.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最低流量 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="minGB" maxlength="12" style="width:10em" v-model="minGB" autocomplete="off"/>
|
||||
<span class="ui label">GiB</span>
|
||||
</div>
|
||||
<p class="comment">使用字节作为最小单位。<span v-if="minSize.length > 0">相当于:{{minSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最高流量 *</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="maxGB" maxlength="12" style="width:10em" v-model="maxGB" autocomplete="off"/>
|
||||
<span class="ui label">GiB</span>
|
||||
</div>
|
||||
<p class="comment">使用字节作为最小单位,0表示没有限制。<span v-if="maxSize.length > 0">相当于:{{maxSize}}。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,32 @@
|
||||
Tea.context(function () {
|
||||
this.minGB = 0
|
||||
this.minSize = ""
|
||||
|
||||
this.maxGB = 0
|
||||
this.maxSize = ""
|
||||
|
||||
this.$delay(function () {
|
||||
let that = this
|
||||
this.$watch("minGB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v <= 0) {
|
||||
that.minSize = ""
|
||||
} else {
|
||||
that.minSize = teaweb.formatBytes(v * Math.pow(1024, 3))
|
||||
}
|
||||
})
|
||||
this.$watch("maxGB", function (v) {
|
||||
v = parseInt(v)
|
||||
if (isNaN(v) || v < 0) {
|
||||
that.maxSize = ""
|
||||
} else if (v == 0) {
|
||||
that.maxSize = "∞"
|
||||
} else {
|
||||
that.maxSize = teaweb.formatBytes(v * Math.pow(1024, 3))
|
||||
}
|
||||
})
|
||||
|
||||
this.minGB = this.item.minGB
|
||||
this.maxGB = this.item.maxGB
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user