Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit d186493

Browse files
author
MenglinChen
committed
edit [b-range-demo]
1 parent cbba13d commit d186493

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<template>
2+
<div class="Form">
3+
<h2>b-hidden(hidden 为隐藏元素)</h2>
4+
<hr>
5+
<div class="row">
6+
<font class="col-1">default:</font>
7+
<b-hidden class="col-11" v-model="value"></b-hidden>
8+
</div>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import BHidden from '@/components/base/Bootstrap/Form/b-hidden.vue'
14+
15+
export default {
16+
name: 'b-hidden-demo',
17+
components: { BHidden, },
18+
data () {
19+
return {
20+
value: 'uid',
21+
}
22+
}
23+
}
24+
</script>

View/src/Pages/Demo/Form/b-range-demo.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
<font class="col-1">info:</font>
1515
<b-range class="col-11" info="info text"></b-range>
1616
</div>
17+
<div class="row">
18+
<font class="col-1">prompt:</font>
19+
<b-range class="col-11" prompt></b-range>
20+
</div>
21+
<div class="row">
22+
<font class="col-1">info<br />prompt:</font>
23+
<b-range class="col-11" info="info text" prompt></b-range>
24+
</div>
1725
<div class="row">
1826
<font class="col-1">disabled:</font>
1927
<b-range class="col-11" disabled></b-range>

View/src/components/base/Bootstrap/Form/b-range.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default {
5858
return !isNaN(value)
5959
},
6060
},
61+
prompt: Boolean,
6162
info: utilities.props.value,
6263
minValue: utilities.props.value,
6364
maxValue: utilities.props.value,
@@ -87,7 +88,7 @@ export default {
8788
return this.maxValue ? this.maxValue : Number(this.max)
8889
},
8990
message: function () {
90-
return `${this.select} ${this.info}`
91+
return this.prompt ? `${this.select} ${this.info}` : this.info
9192
},
9293
},
9394
}

View/src/router/Subsystem/Demo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515
{ path: 'b-switch', name: 'b-switch', component: async () => await import(/* webpackChunkName: "form" */'@/Pages/Demo/Form/b-switch-demo.vue'), },
1616
{ path: 'b-range', name: 'b-range', component: async () => await import(/* webpackChunkName: "form" */'@/Pages/Demo/Form/b-range-demo.vue'), },
1717
{ path: 'b-select', name: 'b-select', component: async () => await import(/* webpackChunkName: "form" */'@/Pages/Demo/Form/b-select-demo.vue'), },
18+
// { path: 'b-hidden', name: 'b-hidden', component: async () => await import(/* webpackChunkName: "form" */'@/Pages/Demo/Form/b-hidden-demo.vue'), },
1819
]
1920
}
2021
],

0 commit comments

Comments
 (0)