dpzvc-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/build-style.js +42 -0
- package/dist/dpzvc.js +17605 -0
- package/dist/styles/dpzvc.css +1 -0
- package/dist-prod/index.html +26 -0
- package/dist-prod/main.js +1 -0
- package/dist-prod/vendor.bundle.js +1 -0
- package/package.json +88 -0
- package/src/components/Indicator/Indicator.vue +77 -0
- package/src/components/Indicator/index.js +153 -0
- package/src/components/Text/Number.vue +201 -0
- package/src/components/Text/index.js +7 -0
- package/src/components/Text/textBar.vue +142 -0
- package/src/components/action-sheet/actionSheet.vue +91 -0
- package/src/components/action-sheet/index.js +5 -0
- package/src/components/app.vue +66 -0
- package/src/components/badge/badge.vue +77 -0
- package/src/components/badge/index.js +5 -0
- package/src/components/button/button.vue +122 -0
- package/src/components/button/index.js +5 -0
- package/src/components/card/card.vue +59 -0
- package/src/components/card/index.js +5 -0
- package/src/components/cell/cell.vue +103 -0
- package/src/components/cell/index.js +5 -0
- package/src/components/cell-swipe/cell-swipe.vue +148 -0
- package/src/components/cell-swipe/index.js +5 -0
- package/src/components/checkBox/checkbox-group.vue +76 -0
- package/src/components/checkBox/checkbox.vue +107 -0
- package/src/components/checkBox/index.js +8 -0
- package/src/components/header/header.vue +82 -0
- package/src/components/header/index.js +5 -0
- package/src/components/loadMore/index.js +5 -0
- package/src/components/loadMore/loadmore.vue +293 -0
- package/src/components/message/confirm.js +52 -0
- package/src/components/message/index.js +132 -0
- package/src/components/message/message.vue +135 -0
- package/src/components/message/messageGroup.vue +74 -0
- package/src/components/modal/confirm.js +161 -0
- package/src/components/modal/index.js +63 -0
- package/src/components/modal/modal.vue +144 -0
- package/src/components/picker/area-picker/area-picker.vue +223 -0
- package/src/components/picker/area-picker/props.js +17 -0
- package/src/components/picker/date-picker/date-picker.vue +291 -0
- package/src/components/picker/date-picker/props.js +24 -0
- package/src/components/picker/index.js +5 -0
- package/src/components/picker/normal-picker/normal-picker.vue +107 -0
- package/src/components/picker/normal-picker/props.js +20 -0
- package/src/components/picker/picker-slot.vue +206 -0
- package/src/components/picker/picker.vue +111 -0
- package/src/components/popup/index.js +5 -0
- package/src/components/popup/popup.vue +117 -0
- package/src/components/progress/index.js +5 -0
- package/src/components/progress/progress.vue +77 -0
- package/src/components/prompt/confirm.js +174 -0
- package/src/components/prompt/index.js +50 -0
- package/src/components/prompt/prompt.vue +166 -0
- package/src/components/radioBox/index.js +8 -0
- package/src/components/radioBox/radiobox-group.vue +74 -0
- package/src/components/radioBox/radiobox.vue +117 -0
- package/src/components/rater/index.js +5 -0
- package/src/components/rater/rater.vue +164 -0
- package/src/components/slideBar/index.js +6 -0
- package/src/components/slideBar/slideBar.vue +269 -0
- package/src/components/spinner/behavior/blade.vue +22 -0
- package/src/components/spinner/behavior/double-bounce.vue +22 -0
- package/src/components/spinner/behavior/fading-circle.vue +37 -0
- package/src/components/spinner/behavior/snake.vue +32 -0
- package/src/components/spinner/behavior/triple-bounce.vue +41 -0
- package/src/components/spinner/index.js +5 -0
- package/src/components/spinner/props.js +25 -0
- package/src/components/spinner/spinner.vue +74 -0
- package/src/components/swipe/index.js +5 -0
- package/src/components/swipe/swipe.vue +399 -0
- package/src/components/switchbar/index.js +5 -0
- package/src/components/switchbar/switchbar.vue +83 -0
- package/src/components/tab/index.js +6 -0
- package/src/components/tab/tab.vue +95 -0
- package/src/components/toTop/index.js +5 -0
- package/src/components/toTop/topTop.vue +76 -0
- package/src/components/upload/index.js +5 -0
- package/src/components/upload/upload.vue +200 -0
- package/src/config/config.js +17 -0
- package/src/directives/clickoutside.js +32 -0
- package/src/directives/tranferDom.js +65 -0
- package/src/index.js +83 -0
- package/src/lib/MegaPixImage.js +253 -0
- package/src/lib/exif.js +808 -0
- package/src/main.js +76 -0
- package/src/mixin/emitter.js +41 -0
- package/src/mixin/input.js +41 -0
- package/src/router.js +229 -0
- package/src/styles/base/font.less +99 -0
- package/src/styles/base/reset.less +69 -0
- package/src/styles/base/variable.less +108 -0
- package/src/styles/components/actionSheet.less +43 -0
- package/src/styles/components/badge.less +79 -0
- package/src/styles/components/button.less +123 -0
- package/src/styles/components/card.less +31 -0
- package/src/styles/components/cell-swipe.less +20 -0
- package/src/styles/components/cell.less +71 -0
- package/src/styles/components/checkBox.less +111 -0
- package/src/styles/components/editor.less +3 -0
- package/src/styles/components/header.less +70 -0
- package/src/styles/components/indicator.less +37 -0
- package/src/styles/components/loadmore.less +48 -0
- package/src/styles/components/message.less +57 -0
- package/src/styles/components/modal.less +82 -0
- package/src/styles/components/number.less +58 -0
- package/src/styles/components/picker.less +150 -0
- package/src/styles/components/popup.less +46 -0
- package/src/styles/components/progress.less +50 -0
- package/src/styles/components/prompt.less +37 -0
- package/src/styles/components/radioBox.less +136 -0
- package/src/styles/components/slide-Bar.less +147 -0
- package/src/styles/components/spinner.less +328 -0
- package/src/styles/components/swipe.less +125 -0
- package/src/styles/components/switchBar.less +88 -0
- package/src/styles/components/tab.less +69 -0
- package/src/styles/components/text.less +80 -0
- package/src/styles/components/toTop.less +26 -0
- package/src/styles/components/upload.less +23 -0
- package/src/styles/index.less +38 -0
- package/src/styles/utils/1px.less +204 -0
- package/src/styles/utils/animation.less +131 -0
- package/src/styles/utils/nowrap.less +19 -0
- package/src/template/index.ejs +26 -0
- package/src/utils/util.js +203 -0
- package/src/vconsole-resources.min.js +6 -0
- package/src/vconsole-sources.min.js +6 -0
- package/src/vconsole.min.js +7 -0
- package/src/views/ActionSheet.vue +33 -0
- package/src/views/Badge.vue +40 -0
- package/src/views/Button.vue +40 -0
- package/src/views/Card.vue +52 -0
- package/src/views/Cell.vue +21 -0
- package/src/views/CellSwipe.vue +85 -0
- package/src/views/CheckBox.vue +53 -0
- package/src/views/Header.vue +47 -0
- package/src/views/Indicator.vue +69 -0
- package/src/views/LoadMore.vue +54 -0
- package/src/views/Message.vue +42 -0
- package/src/views/Modal.vue +32 -0
- package/src/views/Picker.vue +50 -0
- package/src/views/Popup.vue +87 -0
- package/src/views/Progress.vue +32 -0
- package/src/views/Prompt.vue +31 -0
- package/src/views/RadioBox.vue +55 -0
- package/src/views/Rater.vue +39 -0
- package/src/views/SlideBar.vue +47 -0
- package/src/views/Spinner.vue +15 -0
- package/src/views/Swipe.vue +34 -0
- package/src/views/SwitchBar.vue +36 -0
- package/src/views/Tab.vue +41 -0
- package/src/views/Text.vue +64 -0
- package/src/views/ToTop.vue +17 -0
- package/src/views/Upload.vue +44 -0
- package/src/views/guide.vue +159 -0
- package/src/views/index.vue +435 -0
- package/webpack.base.config.js +74 -0
- package/webpack.dev.config.js +67 -0
- package/webpack.dist.dev.config.js +44 -0
- package/webpack.dist.prod.config.js +50 -0
- package/webpack.prod.config.js +72 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Message">
|
|
3
|
+
<VButton width="50%" @click="showMessageTop">
|
|
4
|
+
Top
|
|
5
|
+
</VButton>
|
|
6
|
+
<VButton width="50%" @click="showMessage">
|
|
7
|
+
Center
|
|
8
|
+
</VButton>
|
|
9
|
+
<VButton width="50%" @click="showMessageBottom">
|
|
10
|
+
Bottom
|
|
11
|
+
</VButton>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
name: "message",
|
|
18
|
+
methods:{
|
|
19
|
+
showMessage(){
|
|
20
|
+
this.$Message.show({text: '显示消息'});
|
|
21
|
+
|
|
22
|
+
},
|
|
23
|
+
showMessageTop(){
|
|
24
|
+
this.$Message.show({text: '显示消息',position:'top'});
|
|
25
|
+
},
|
|
26
|
+
showMessageBottom(){
|
|
27
|
+
this.$Message.show({text: '显示消息',position:'bottom'});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped>
|
|
35
|
+
.Message {
|
|
36
|
+
height: 100%;
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: space-around;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Modal">
|
|
3
|
+
<VButton width="50%" @click="showInfo">info</VButton>
|
|
4
|
+
<VButton width="50%" @click="showConfirm">confirm</VButton>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: "modal",
|
|
11
|
+
methods:{
|
|
12
|
+
showInfo(){
|
|
13
|
+
this.$Modal.info({body:'这是内容',onOk:function(){EventBus.$Message.show({text:'点击了确定'})},onCancle:function () {
|
|
14
|
+
EventBus.$Message.show({text:'点击了取消'})
|
|
15
|
+
}})
|
|
16
|
+
},
|
|
17
|
+
showConfirm(){
|
|
18
|
+
this.$Modal.confirm({body:'这是内容',onOk:function(){EventBus.$Message.show({text:'点击了确定'})},})
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="less" scoped>
|
|
25
|
+
.Modal {
|
|
26
|
+
height: 100%;
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: space-around;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Picker">
|
|
3
|
+
<Picker type="AreaPicker" v-model="AreaVisible" @sure="pickerSure" @cancle="pickerCancle" ></Picker>
|
|
4
|
+
<Picker type="DatePicker" date-value="2018/1/1" v-model="DateVisible" @sure="pickerSure" @cancle="pickerCancle" ></Picker>
|
|
5
|
+
|
|
6
|
+
<div class="item">
|
|
7
|
+
<VButton width="40%" @click="DateVisible = true">日期选择器</VButton>
|
|
8
|
+
<VButton width="40%" @click="AreaVisible = true">地区选择器</VButton>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: "picker",
|
|
17
|
+
data(){
|
|
18
|
+
return {
|
|
19
|
+
AreaVisible:false,
|
|
20
|
+
DateVisible:false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods:{
|
|
24
|
+
pickerSure(value){
|
|
25
|
+
console.log(value)
|
|
26
|
+
this.$Modal.confirm({body: value.formArea || value.formatDate,});
|
|
27
|
+
},
|
|
28
|
+
pickerCancle(){
|
|
29
|
+
this.$Message.show({text: '您选择了取消'});
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
//TODO NormalPicker
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="less" scoped>
|
|
38
|
+
.Picker {
|
|
39
|
+
position: relative;
|
|
40
|
+
height: 100%;
|
|
41
|
+
|
|
42
|
+
.item {
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-around;
|
|
46
|
+
align-items: center;
|
|
47
|
+
padding: 50px 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
|
|
2
|
+
<template>
|
|
3
|
+
<div class="Popup">
|
|
4
|
+
<VButton width="50%" @click.native="showPop('top')">
|
|
5
|
+
Top
|
|
6
|
+
</VButton>
|
|
7
|
+
<VButton width="50%" @click.native="showPop('right')">
|
|
8
|
+
Right
|
|
9
|
+
</VButton>
|
|
10
|
+
<VButton width="50%" @click.native="showPop('bottom')">
|
|
11
|
+
Bottom
|
|
12
|
+
</VButton>
|
|
13
|
+
<VButton width="50%" @click.native="showPop('left')">
|
|
14
|
+
Left
|
|
15
|
+
</VButton>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<Popup v-model="show" :position="side" :width="width" :height="height" show-mask="">
|
|
19
|
+
|
|
20
|
+
</Popup>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: "popup",
|
|
28
|
+
data(){
|
|
29
|
+
return {
|
|
30
|
+
side:'top',
|
|
31
|
+
show:false,
|
|
32
|
+
sideList:['top','right','bottom','left'],
|
|
33
|
+
width:'100%',
|
|
34
|
+
height:'100%'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
methods:{
|
|
39
|
+
showPop(side){
|
|
40
|
+
this.show = false
|
|
41
|
+
this.$nextTick(()=>{
|
|
42
|
+
|
|
43
|
+
if (this.sideList.indexOf(side) < 0) side = 'top'
|
|
44
|
+
|
|
45
|
+
switch (side){
|
|
46
|
+
case 'top':
|
|
47
|
+
this.width = '100%'
|
|
48
|
+
this.height = 0
|
|
49
|
+
break
|
|
50
|
+
case 'right':
|
|
51
|
+
this.width = '70%'
|
|
52
|
+
this.height = '100%'
|
|
53
|
+
break
|
|
54
|
+
case 'bottom':
|
|
55
|
+
this.width = '100%'
|
|
56
|
+
this.height = '70%'
|
|
57
|
+
break;
|
|
58
|
+
case 'left':
|
|
59
|
+
this.width = '70%'
|
|
60
|
+
this.height = '100%'
|
|
61
|
+
break
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
this.side = side
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
setTimeout(()=>{
|
|
69
|
+
this.show = true
|
|
70
|
+
},350)
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style scoped>
|
|
79
|
+
|
|
80
|
+
.Popup {
|
|
81
|
+
height: 100%;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
justify-content: space-around;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Progress">
|
|
3
|
+
<Progress v-model="progress" :barHeight="barHeight"></Progress>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "progress",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
progress:0,
|
|
13
|
+
barHeight:5
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
mounted(){
|
|
17
|
+
var timer = setInterval(()=>{
|
|
18
|
+
this.progress+= 1
|
|
19
|
+
if (this.progress >= 100) {
|
|
20
|
+
clearInterval(timer)
|
|
21
|
+
time = null
|
|
22
|
+
}
|
|
23
|
+
},100)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style lang="less" scoped>
|
|
29
|
+
.Progress {
|
|
30
|
+
padding-top: 50px;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Prompt">
|
|
3
|
+
<VButton width="50%" @click="showPrompt">弹出Prompt</VButton>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "prompt",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
methods:{
|
|
16
|
+
showPrompt(){
|
|
17
|
+
this.$Prompt.info({title:'Prompt',spec:'ccc',text:'vvvv'})
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="less" scoped>
|
|
25
|
+
.Prompt {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="RadioBox">
|
|
3
|
+
<p>radio组合</p>
|
|
4
|
+
<div class="item">
|
|
5
|
+
<Radio-group v-model="radio" >
|
|
6
|
+
<Radio label="中国"></Radio>
|
|
7
|
+
<Radio label="美国"></Radio>
|
|
8
|
+
<Radio label="日本"></Radio>
|
|
9
|
+
</Radio-group>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="item">value:{{radio}}</div>
|
|
13
|
+
<p>单个Radio</p>
|
|
14
|
+
<Radio label="苹果" v-model="checked"></Radio>
|
|
15
|
+
<div class="item">checked:{{checked}}</div>
|
|
16
|
+
<p>禁用的Radio</p>
|
|
17
|
+
<div class="item"><Radio label="玩具" disable></Radio></div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: "radio-box",
|
|
25
|
+
data(){
|
|
26
|
+
return {
|
|
27
|
+
checked:false,
|
|
28
|
+
radio:'',
|
|
29
|
+
|
|
30
|
+
visible: true,
|
|
31
|
+
Radioed:false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="less" scoped>
|
|
39
|
+
.RadioBox {
|
|
40
|
+
padding-top: 100px;
|
|
41
|
+
p {
|
|
42
|
+
width: 100%;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
margin: 20px 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.item{
|
|
49
|
+
width: 100%;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Rater">
|
|
3
|
+
<p>可点击评分</p>
|
|
4
|
+
<Rater v-model="rate"></Rater>
|
|
5
|
+
<span>{{rate}}</span>
|
|
6
|
+
<p>不可点击评分</p>
|
|
7
|
+
<Rater v-model="disabledRate" disabled></Rater>
|
|
8
|
+
<span>{{disabledRate}}</span>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: "rater",
|
|
15
|
+
data(){
|
|
16
|
+
return {
|
|
17
|
+
rate:0,
|
|
18
|
+
disabledRate:4.5
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="less" scoped>
|
|
25
|
+
.Rater {
|
|
26
|
+
width: 100%;
|
|
27
|
+
padding-top: 50px;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
p {
|
|
33
|
+
text-indent: 10px;
|
|
34
|
+
font-weight: bold;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
margin: 10px 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div clas="SlideBar">
|
|
3
|
+
<Slide-bar :list="items" :flex="false" index="1" :can-drag="false" height="100%" scroll-height='50px'
|
|
4
|
+
:is-fixed-header="true">
|
|
5
|
+
|
|
6
|
+
<div slot="slot-item-0" style="height:100%;flex: 1;background:red;overflow: scroll">
|
|
7
|
+
<div style="height: 40px;width: 100%;background-color: blue;"></div>
|
|
8
|
+
<div style="height: 40px;width: 100%;background-color: blue;"></div>
|
|
9
|
+
<div style="height: 40px;width: 100%;background-color: blue;"></div>
|
|
10
|
+
<div style="height: 40px;width: 100%;background-color: blue;"></div>
|
|
11
|
+
<div style="height: 40px;width: 100%;background-color: blue;"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div slot="slot-item-1" style="height:200px;flex: 1;background:yellow">
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
<div slot="slot-item-2" style="height:200px;flex: 1;background:black"></div>
|
|
17
|
+
</Slide-bar>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: "slide-bar",
|
|
24
|
+
data(){
|
|
25
|
+
return {
|
|
26
|
+
items:[{
|
|
27
|
+
|
|
28
|
+
name: "选项一",
|
|
29
|
+
|
|
30
|
+
}, {
|
|
31
|
+
name: "选项二",
|
|
32
|
+
|
|
33
|
+
}, {
|
|
34
|
+
name: "选项三",
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style lang="less" scoped>
|
|
44
|
+
.SlideBar {
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="swipe">
|
|
3
|
+
<Swipe :multiple="false" :list="files">
|
|
4
|
+
<template slot-scope="props">
|
|
5
|
+
|
|
6
|
+
<div>
|
|
7
|
+
<img :src="props.item.image"/>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
</template>
|
|
11
|
+
</Swipe>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
//TODO multiple
|
|
17
|
+
export default {
|
|
18
|
+
name: "swipe",
|
|
19
|
+
data(){
|
|
20
|
+
return {
|
|
21
|
+
files:[{"id":521,"ad_id":10,"name":"\u73a9\u8f6c\u5927\u6570\u636e\u5206\u6790\uff01Spark2.X+Python \u7cbe\u534e\u5b9e\u6218\u8bfe\u7a0b","image":"https:\/\/o74ly5e8r.qnssl.com\/9MhSVW1gJD.png","background":{"color":""},"link":"https:\/\/edu.hellobi.com\/course\/222","sort":0,"meta":"","created_at":"2017-12-21 09:48:29","updated_at":"2017-12-21 09:48:29","deleted_at":null},{"id":506,"ad_id":10,"name":"\u6570\u636e\u5206\u6790\u62a5\u544a\u5236\u4f5c\u79d8\u7c4d\u5347\u7ea7\u7248","image":"https:\/\/o74ly5e8r.qnssl.com\/EAbxDnBMcX.png","background":{"color":""},"link":"https:\/\/edu.hellobi.com\/course\/132","sort":1,"meta":"","created_at":"2017-10-31 09:43:15","updated_at":"2017-12-21 09:46:16","deleted_at":null},{"id":504,"ad_id":10,"name":"\u72ec\u4e00\u65e0\u4e8c\u7684\u6570\u636e\u4ed3\u5e93\u5efa\u6a21\u6307\u5357\u7cfb\u5217\u6559\u7a0b\u5347\u7ea7\u7248 \uff08\u8fde\u8f7d\u4e2d\uff09","image":"https:\/\/o74ly5e8r.qnssl.com\/dmJqsjtLNS.png","background":{"color":""},"link":"https:\/\/edu.hellobi.com\/course\/102","sort":2,"meta":"","created_at":"2017-10-18 09:35:05","updated_at":"2017-12-21 09:50:03","deleted_at":null}]
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="less" scoped>
|
|
30
|
+
.Swipe {
|
|
31
|
+
padding-top: 100px;
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="SwitchBar">
|
|
3
|
+
<SwitchBar v-model="checkLarge" size="large"></SwitchBar>
|
|
4
|
+
<span>large</span>
|
|
5
|
+
<SwitchBar v-model="checkSmall" size="small"></SwitchBar>
|
|
6
|
+
<span>small</span>
|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "switch-bar",
|
|
14
|
+
data(){
|
|
15
|
+
return {
|
|
16
|
+
checkLarge:false,
|
|
17
|
+
checkSmall:false
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style lang="less" scoped>
|
|
24
|
+
.SwitchBar {
|
|
25
|
+
padding-top: 100px;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-around;
|
|
28
|
+
align-items: center;
|
|
29
|
+
height: 100%;
|
|
30
|
+
p {
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
align-self: flex-start;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Tab">
|
|
3
|
+
<Tab :items="items" :index="index" :border="hasBorder" :styles="styles"></Tab>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "tab",
|
|
10
|
+
data(){
|
|
11
|
+
return {
|
|
12
|
+
items:[
|
|
13
|
+
{
|
|
14
|
+
path:'/guide',
|
|
15
|
+
name:'首页',
|
|
16
|
+
iconCur:'<span class="iconfont icon-shangcheng"></span>',
|
|
17
|
+
icon:'<span class="iconfont icon-shangcheng"></span>'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
path:'/guide',
|
|
21
|
+
name:'首页',
|
|
22
|
+
iconCur:'<span class="iconfont icon-shangcheng"></span>',
|
|
23
|
+
icon:'<span class="iconfont icon-shangcheng"></span>',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
index:0,
|
|
27
|
+
hasBorder:true,
|
|
28
|
+
styles:{
|
|
29
|
+
bottom:0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
.Tab {
|
|
38
|
+
height:100%;
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Text">
|
|
3
|
+
<div class="item">
|
|
4
|
+
<p class="title">Number</p>
|
|
5
|
+
<Number v-model="number" :min="min" :max="max" :focus="focus" :step="step"></Number>
|
|
6
|
+
<span class="value">value:{{number}}</span>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div class="item">
|
|
10
|
+
<p class="title">TextBar</p>
|
|
11
|
+
<TextBar v-model="text" type="text"></TextBar>
|
|
12
|
+
<span class="value">value:{{text}}</span>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="item">
|
|
18
|
+
<p class="title">TextBar</p>
|
|
19
|
+
<TextBar v-model="texts" type="textarea" :maxlength="9"></TextBar>
|
|
20
|
+
<span class="value">value:{{texts}}</span>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
name: "text",
|
|
30
|
+
data(){
|
|
31
|
+
return {
|
|
32
|
+
number: 1,
|
|
33
|
+
min: 1,
|
|
34
|
+
max: 10,
|
|
35
|
+
step: 2,
|
|
36
|
+
focus: true,
|
|
37
|
+
text:'请输入',
|
|
38
|
+
texts: '正在输入....'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="less" scoped>
|
|
45
|
+
.Text {
|
|
46
|
+
height: 100%;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
justify-content: space-around;
|
|
50
|
+
align-items: center;
|
|
51
|
+
.item {
|
|
52
|
+
width: 50%;
|
|
53
|
+
.title {
|
|
54
|
+
margin-bottom:10px;
|
|
55
|
+
font-weight: bold;
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
.value {
|
|
59
|
+
margin-top:10px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Upload">
|
|
3
|
+
|
|
4
|
+
<Upload :multiple="true" @on-change-file="onChangeFile" ref="upload"></Upload>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
<template v-if="files.length">
|
|
8
|
+
|
|
9
|
+
<img :src="item.base64" v-for="item in files"/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
name: "upload",
|
|
18
|
+
data(){
|
|
19
|
+
return {
|
|
20
|
+
files:[]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
methods:{
|
|
24
|
+
onChangeFile(files){
|
|
25
|
+
this.files = files
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="less" scoped>
|
|
33
|
+
.Upload {
|
|
34
|
+
height:100%;
|
|
35
|
+
.upload-box {
|
|
36
|
+
width:200px;
|
|
37
|
+
height:100px;
|
|
38
|
+
background: #008cee;
|
|
39
|
+
color: #ffffff;
|
|
40
|
+
text-align: center;
|
|
41
|
+
line-height: 100px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|