dpzvc3-ui 3.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 +20 -0
- package/README.md +175 -0
- package/build-style.js +58 -0
- package/dist/dpzvc3.esm.js +17676 -0
- package/dist/dpzvc3.esm.js.map +1 -0
- package/dist/dpzvc3.esm.min.js +2 -0
- package/dist/dpzvc3.esm.min.js.map +1 -0
- package/dist/dpzvc3.js +15200 -0
- package/dist/dpzvc3.js.map +1 -0
- package/dist/dpzvc3.min.js +2 -0
- package/dist/dpzvc3.min.js.map +1 -0
- package/dist/styles/base/font.css +1 -0
- package/dist/styles/base/reset.css +1 -0
- package/dist/styles/base/variable.css +0 -0
- package/dist/styles/components/actionSheet.css +1 -0
- package/dist/styles/components/badge.css +1 -0
- package/dist/styles/components/button.css +1 -0
- package/dist/styles/components/card.css +1 -0
- package/dist/styles/components/cell-swipe.css +1 -0
- package/dist/styles/components/cell.css +1 -0
- package/dist/styles/components/checkBox.css +1 -0
- package/dist/styles/components/editor.css +1 -0
- package/dist/styles/components/header.css +1 -0
- package/dist/styles/components/indicator.css +1 -0
- package/dist/styles/components/loadmore.css +1 -0
- package/dist/styles/components/message.css +1 -0
- package/dist/styles/components/modal.css +1 -0
- package/dist/styles/components/number.css +1 -0
- package/dist/styles/components/picker.css +1 -0
- package/dist/styles/components/popup.css +1 -0
- package/dist/styles/components/progress.css +1 -0
- package/dist/styles/components/prompt.css +1 -0
- package/dist/styles/components/radioBox.css +1 -0
- package/dist/styles/components/slide-Bar.css +1 -0
- package/dist/styles/components/spinner.css +1 -0
- package/dist/styles/components/swipe.css +1 -0
- package/dist/styles/components/switchBar.css +1 -0
- package/dist/styles/components/tab.css +1 -0
- package/dist/styles/components/text.css +1 -0
- package/dist/styles/components/toTop.css +1 -0
- package/dist/styles/components/upload.css +1 -0
- package/dist/styles/dpzvc3.css +1 -0
- package/dist/styles/utils/1px.css +1 -0
- package/dist/styles/utils/animation.css +1 -0
- package/dist/styles/utils/nowrap.css +1 -0
- package/dist-prod/91.9d79b442ec3131707419.js +3 -0
- package/dist-prod/91.9d79b442ec3131707419.js.LICENSE.txt +25 -0
- package/dist-prod/91.9d79b442ec3131707419.js.map +1 -0
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js +2 -0
- package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js.map +1 -0
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js +2 -0
- package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js.map +1 -0
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js +2 -0
- package/dist-prod/button.28b491339fbba29c3f16.chunk.js.map +1 -0
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js +2 -0
- package/dist-prod/card.3ad847f07bebc1391125.chunk.js.map +1 -0
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js +2 -0
- package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js.map +1 -0
- package/dist-prod/cellswipe.53b0178e4638c201dcf1.chunk.js +2 -0
- package/dist-prod/cellswipe.53b0178e4638c201dcf1.chunk.js.map +1 -0
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js +2 -0
- package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js.map +1 -0
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js +2 -0
- package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js.map +1 -0
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js +2 -0
- package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js.map +1 -0
- package/dist-prod/index.html +19 -0
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js +2 -0
- package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js.map +1 -0
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js +2 -0
- package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js.map +1 -0
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js +2 -0
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js.map +1 -0
- package/dist-prod/message.e57fa263a214006f7191.chunk.js +2 -0
- package/dist-prod/message.e57fa263a214006f7191.chunk.js.map +1 -0
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js +2 -0
- package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js.map +1 -0
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js +2 -0
- package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js.map +1 -0
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js +2 -0
- package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js.map +1 -0
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js +2 -0
- package/dist-prod/progress.1e0d785044aecadc5615.chunk.js.map +1 -0
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js +2 -0
- package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js.map +1 -0
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js +2 -0
- package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js.map +1 -0
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js +2 -0
- package/dist-prod/rater.939e0e7e770728f684c3.chunk.js.map +1 -0
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js +2 -0
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js.map +1 -0
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js +2 -0
- package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js.map +1 -0
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js +2 -0
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js.map +1 -0
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js +2 -0
- package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js.map +1 -0
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js +2 -0
- package/dist-prod/tab.4c391211c41b7d12b585.chunk.js.map +1 -0
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js +2 -0
- package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js.map +1 -0
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js +2 -0
- package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js.map +1 -0
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js +2 -0
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js.map +1 -0
- package/images/IMG_2614 2 2.JPG +0 -0
- package/images/IMG_2614.JPG +0 -0
- package/images/IMG_2615 2.JPG +0 -0
- package/images/IMG_2615.JPG +0 -0
- package/package.json +113 -0
- package/postcss.config.js +5 -0
- package/src/components/Indicator/Indicator.vue +82 -0
- package/src/components/Indicator/index.js +86 -0
- package/src/components/Text/Number.vue +167 -0
- package/src/components/Text/index.js +7 -0
- package/src/components/Text/textBar.vue +122 -0
- package/src/components/action-sheet/actionSheet.vue +93 -0
- package/src/components/action-sheet/index.js +5 -0
- package/src/components/app.vue +61 -0
- package/src/components/badge/badge.vue +80 -0
- package/src/components/badge/index.js +5 -0
- package/src/components/button/button.vue +111 -0
- package/src/components/button/index.js +5 -0
- package/src/components/card/card.vue +49 -0
- package/src/components/card/index.js +5 -0
- package/src/components/cell/cell.vue +93 -0
- package/src/components/cell/index.js +5 -0
- package/src/components/cell-swipe/cell-swipe.vue +169 -0
- package/src/components/cell-swipe/index.js +5 -0
- package/src/components/checkBox/checkbox-group.vue +74 -0
- package/src/components/checkBox/checkbox.vue +117 -0
- package/src/components/checkBox/index.js +8 -0
- package/src/components/header/header.vue +130 -0
- package/src/components/header/index.js +5 -0
- package/src/components/loadMore/index.js +5 -0
- package/src/components/loadMore/loadmore.vue +258 -0
- package/src/components/message/confirm.js +60 -0
- package/src/components/message/index.js +111 -0
- package/src/components/message/message.vue +137 -0
- package/src/components/message/messageGroup.vue +82 -0
- package/src/components/modal/confirm.js +122 -0
- package/src/components/modal/index.js +52 -0
- package/src/components/modal/modal.vue +138 -0
- package/src/components/picker/area-picker/area-picker.vue +230 -0
- package/src/components/picker/area-picker/props.js +17 -0
- package/src/components/picker/date-picker/date-picker.vue +191 -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 +120 -0
- package/src/components/picker/normal-picker/props.js +20 -0
- package/src/components/picker/picker-slot.vue +217 -0
- package/src/components/picker/picker.vue +111 -0
- package/src/components/popup/index.js +5 -0
- package/src/components/popup/popup.vue +91 -0
- package/src/components/progress/index.js +5 -0
- package/src/components/progress/progress.vue +86 -0
- package/src/components/prompt/confirm.js +91 -0
- package/src/components/prompt/index.js +53 -0
- package/src/components/prompt/prompt.vue +125 -0
- package/src/components/radioBox/index.js +8 -0
- package/src/components/radioBox/radiobox-group.vue +66 -0
- package/src/components/radioBox/radiobox.vue +88 -0
- package/src/components/rater/index.js +5 -0
- package/src/components/rater/rater.vue +118 -0
- package/src/components/slideBar/index.js +6 -0
- package/src/components/slideBar/slideBar.vue +207 -0
- package/src/components/spinner/behavior/blade.vue +42 -0
- package/src/components/spinner/behavior/double-bounce.vue +38 -0
- package/src/components/spinner/behavior/fading-circle.vue +55 -0
- package/src/components/spinner/behavior/snake.vue +41 -0
- package/src/components/spinner/behavior/triple-bounce.vue +52 -0
- package/src/components/spinner/index.js +5 -0
- package/src/components/spinner/props.js +28 -0
- package/src/components/spinner/spinner.vue +78 -0
- package/src/components/swipe/index.js +5 -0
- package/src/components/swipe/swipe.vue +281 -0
- package/src/components/switchbar/index.js +5 -0
- package/src/components/switchbar/switchbar.vue +79 -0
- package/src/components/tab/index.js +6 -0
- package/src/components/tab/tab.vue +89 -0
- package/src/components/toTop/index.js +5 -0
- package/src/components/toTop/topTop.vue +78 -0
- package/src/components/upload/index.js +5 -0
- package/src/components/upload/upload.vue +166 -0
- package/src/config/config.js +16 -0
- package/src/directives/clickoutside.js +42 -0
- package/src/directives/tranferDom.js +66 -0
- package/src/index.js +149 -0
- package/src/lib/MegaPixImage.js +163 -0
- package/src/lib/MegaPixImageOld.js +153 -0
- package/src/lib/exif-js.js +235 -0
- package/src/lib/exif.js +789 -0
- package/src/main.js +31 -0
- package/src/mixin/emitter.js +72 -0
- package/src/mixin/input.js +41 -0
- package/src/router.js +36 -0
- package/src/styles/base/font.less +99 -0
- package/src/styles/base/reset.less +135 -0
- package/src/styles/base/variable.less +108 -0
- package/src/styles/components/actionSheet.less +43 -0
- package/src/styles/components/badge.less +81 -0
- package/src/styles/components/button.less +124 -0
- package/src/styles/components/card.less +31 -0
- package/src/styles/components/cell-swipe.less +20 -0
- package/src/styles/components/cell.less +75 -0
- package/src/styles/components/checkBox.less +113 -0
- package/src/styles/components/editor.less +3 -0
- package/src/styles/components/header.less +72 -0
- package/src/styles/components/indicator.less +39 -0
- package/src/styles/components/loadmore.less +48 -0
- package/src/styles/components/message.less +57 -0
- package/src/styles/components/modal.less +84 -0
- package/src/styles/components/number.less +60 -0
- package/src/styles/components/picker.less +152 -0
- package/src/styles/components/popup.less +46 -0
- package/src/styles/components/progress.less +52 -0
- package/src/styles/components/prompt.less +37 -0
- package/src/styles/components/radioBox.less +138 -0
- package/src/styles/components/slide-Bar.less +149 -0
- package/src/styles/components/spinner.less +329 -0
- package/src/styles/components/swipe.less +125 -0
- package/src/styles/components/switchBar.less +88 -0
- package/src/styles/components/tab.less +71 -0
- package/src/styles/components/text.less +82 -0
- package/src/styles/components/toTop.less +28 -0
- package/src/styles/components/upload.less +23 -0
- package/src/styles/index.less +38 -0
- package/src/styles/utils/1px.less +206 -0
- package/src/styles/utils/animation.less +165 -0
- package/src/styles/utils/nowrap.less +19 -0
- package/src/template/index.ejs +40 -0
- package/src/utils/util.js +202 -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 +46 -0
- package/src/views/Badge.vue +51 -0
- package/src/views/Button.vue +69 -0
- package/src/views/Card.vue +88 -0
- package/src/views/Cell.vue +30 -0
- package/src/views/CellSwipe.vue +68 -0
- package/src/views/CheckBox.vue +77 -0
- package/src/views/Header.vue +70 -0
- package/src/views/Indicator.vue +82 -0
- package/src/views/LoadMore.vue +73 -0
- package/src/views/Message.vue +61 -0
- package/src/views/Modal.vue +69 -0
- package/src/views/Picker.vue +140 -0
- package/src/views/Popup.vue +97 -0
- package/src/views/Progress.vue +47 -0
- package/src/views/Prompt.vue +43 -0
- package/src/views/RadioBox.vue +68 -0
- package/src/views/Rater.vue +49 -0
- package/src/views/SlideBar.vue +55 -0
- package/src/views/Spinner.vue +15 -0
- package/src/views/Swipe.vue +59 -0
- package/src/views/SwitchBar.vue +47 -0
- package/src/views/Tab.vue +53 -0
- package/src/views/Text.vue +93 -0
- package/src/views/ToTop.vue +17 -0
- package/src/views/Upload.vue +61 -0
- package/src/views/guide.vue +164 -0
- package/src/views/index.vue +554 -0
- package/webpack.base.config.js +65 -0
- package/webpack.dev.config.js +42 -0
- package/webpack.dist.dev.config.js +75 -0
- package/webpack.dist.prod.config.js +89 -0
- package/webpack.prod.config.js +51 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="CardDemo">
|
|
3
|
+
<!-- 基础卡片 -->
|
|
4
|
+
<Card width="80%">
|
|
5
|
+
<template #header>
|
|
6
|
+
<h3 class="item">
|
|
7
|
+
卡片头部
|
|
8
|
+
</h3>
|
|
9
|
+
</template>
|
|
10
|
+
<template #default>
|
|
11
|
+
<p class="item-main">
|
|
12
|
+
这里是卡片内容
|
|
13
|
+
</p>
|
|
14
|
+
</template>
|
|
15
|
+
<template #footer>
|
|
16
|
+
<span class="item">
|
|
17
|
+
<button @click="onClick">
|
|
18
|
+
操作按钮
|
|
19
|
+
</button>
|
|
20
|
+
</span>
|
|
21
|
+
</template>
|
|
22
|
+
</Card>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { ref } from 'vue'
|
|
28
|
+
// import Card from '../components/card'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'ViewCard',
|
|
32
|
+
setup () {
|
|
33
|
+
const count = ref(0)
|
|
34
|
+
|
|
35
|
+
const onClick = () => {
|
|
36
|
+
count.value += 1
|
|
37
|
+
console.log('点击了第一张卡片按钮', count.value)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const onClick2 = () => {
|
|
41
|
+
count.value += 2
|
|
42
|
+
console.log('点击了第二张卡片按钮', count.value)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
count,
|
|
47
|
+
onClick,
|
|
48
|
+
onClick2
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="less" scoped>
|
|
55
|
+
.CardDemo {
|
|
56
|
+
background: #4d4d4d;
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
.item {
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
}
|
|
71
|
+
.item-main {
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 200px;
|
|
74
|
+
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
}
|
|
79
|
+
button {
|
|
80
|
+
padding: 4px 12px;
|
|
81
|
+
background-color: #409eff;
|
|
82
|
+
color: #fff;
|
|
83
|
+
border: none;
|
|
84
|
+
border-radius: 4px;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Cell">
|
|
3
|
+
<Cell
|
|
4
|
+
title="Guide"
|
|
5
|
+
label="导航"
|
|
6
|
+
link="/guide"
|
|
7
|
+
value="跳转到导航页"
|
|
8
|
+
/>
|
|
9
|
+
<Cell
|
|
10
|
+
title="Index"
|
|
11
|
+
label="主页"
|
|
12
|
+
link="/guide"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'ViewCell'
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="less" scoped>
|
|
26
|
+
.Cell {
|
|
27
|
+
width: 100%;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="CellSwipe">
|
|
3
|
+
<CellSwipe
|
|
4
|
+
:right="right"
|
|
5
|
+
title="向左滑"
|
|
6
|
+
has-mask
|
|
7
|
+
/>
|
|
8
|
+
<CellSwipe
|
|
9
|
+
:left="left"
|
|
10
|
+
title="向右滑"
|
|
11
|
+
has-mask
|
|
12
|
+
/>
|
|
13
|
+
<template v-if="show">
|
|
14
|
+
<CellSwipe
|
|
15
|
+
:left="left"
|
|
16
|
+
:right="right"
|
|
17
|
+
title="删除测试"
|
|
18
|
+
has-mask
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup>
|
|
25
|
+
import { reactive, ref, getCurrentInstance } from 'vue'
|
|
26
|
+
import CellSwipe from '../components/cell-swipe'
|
|
27
|
+
|
|
28
|
+
const show = ref(true)
|
|
29
|
+
const { proxy } = getCurrentInstance() // 用于访问全局 Modal
|
|
30
|
+
|
|
31
|
+
const left = reactive([
|
|
32
|
+
{
|
|
33
|
+
content: '确定',
|
|
34
|
+
style: { backgroundColor: '#eee', color: '#fff' },
|
|
35
|
+
handleClick: () => {
|
|
36
|
+
proxy.$Modal.info({ body: '点击了确定' })
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
content: '删除',
|
|
41
|
+
style: { backgroundColor: 'red', color: '#fff' },
|
|
42
|
+
handleClick: () => {
|
|
43
|
+
proxy.$Modal.info({ body: '点击了删除' })
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
])
|
|
47
|
+
|
|
48
|
+
const right = reactive([
|
|
49
|
+
{
|
|
50
|
+
content: '确定',
|
|
51
|
+
style: { backgroundColor: '#eee', color: '#fff' },
|
|
52
|
+
handleClick: () => {
|
|
53
|
+
proxy.$Modal.info({ body: '点击了确定' })
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
content: '删除',
|
|
58
|
+
style: { backgroundColor: 'red', color: '#fff' },
|
|
59
|
+
handleClick: () => {
|
|
60
|
+
proxy.$Modal.info({ body: '点击了删除' })
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
])
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped>
|
|
67
|
+
/* 可自行添加样式 */
|
|
68
|
+
</style>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="CheckBox">
|
|
3
|
+
<p>checkbox 组合</p>
|
|
4
|
+
<div class="item">
|
|
5
|
+
<CheckBoxGroup v-model="data">
|
|
6
|
+
<CheckBox label="中国" />
|
|
7
|
+
<CheckBox label="美国" />
|
|
8
|
+
<CheckBox label="日本" />
|
|
9
|
+
</CheckBoxGroup>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="item">
|
|
13
|
+
value: {{ data }}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<p>单个 checkbox</p>
|
|
17
|
+
<div class="item">
|
|
18
|
+
<CheckBox
|
|
19
|
+
v-model="checked"
|
|
20
|
+
label="苹果"
|
|
21
|
+
@onChange="change"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="item">
|
|
26
|
+
checked: {{ checked }}
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<p>禁用的 checkbox</p>
|
|
30
|
+
<div class="item">
|
|
31
|
+
<CheckBox
|
|
32
|
+
label="玩具"
|
|
33
|
+
disable
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
import { defineComponent, ref } from 'vue'
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: 'ViewCheckBox',
|
|
44
|
+
|
|
45
|
+
setup () {
|
|
46
|
+
const data = ref(['中国'])
|
|
47
|
+
const checked = ref(false)
|
|
48
|
+
const change = (e) => {
|
|
49
|
+
console.log(e, 'e')
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
data,
|
|
53
|
+
change,
|
|
54
|
+
checked
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style lang="less" scoped>
|
|
61
|
+
.CheckBox {
|
|
62
|
+
padding-top: 100px;
|
|
63
|
+
|
|
64
|
+
p {
|
|
65
|
+
width: 100%;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
margin: 20px 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.item {
|
|
72
|
+
width: 100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Header">
|
|
3
|
+
<!-- 默认 Header -->
|
|
4
|
+
<div class="item">
|
|
5
|
+
<DpHeader
|
|
6
|
+
title="Header"
|
|
7
|
+
:fixed="fixed"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Header 右侧自定义 -->
|
|
12
|
+
<div class="item">
|
|
13
|
+
<DpHeader
|
|
14
|
+
title="Header"
|
|
15
|
+
:fixed="fixed"
|
|
16
|
+
>
|
|
17
|
+
<template #right>
|
|
18
|
+
<span @click="share">分享</span>
|
|
19
|
+
</template>
|
|
20
|
+
</DpHeader>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- Header 左右自定义 -->
|
|
24
|
+
<div class="item">
|
|
25
|
+
<DpHeader
|
|
26
|
+
title="Header"
|
|
27
|
+
:fixed="fixed"
|
|
28
|
+
>
|
|
29
|
+
<template #left>
|
|
30
|
+
<span>返回</span>
|
|
31
|
+
</template>
|
|
32
|
+
<template #right>
|
|
33
|
+
<span @click="share">分享</span>
|
|
34
|
+
</template>
|
|
35
|
+
</DpHeader>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
import { ref, getCurrentInstance } from 'vue'
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
name: 'ViewHeader',
|
|
45
|
+
setup () {
|
|
46
|
+
const { proxy } = getCurrentInstance()
|
|
47
|
+
const fixed = ref(false)
|
|
48
|
+
|
|
49
|
+
const share = () => {
|
|
50
|
+
// 假设 $Modal 已经在全局挂载
|
|
51
|
+
if (proxy) {
|
|
52
|
+
proxy.$Modal.confirm({
|
|
53
|
+
showHead: false,
|
|
54
|
+
body: '点击了分享'
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return { fixed, share }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
.item {
|
|
66
|
+
position: relative;
|
|
67
|
+
margin-bottom: 20px;
|
|
68
|
+
height: 50px;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Indicator">
|
|
3
|
+
<div class="item">
|
|
4
|
+
<VButton @click="blade">
|
|
5
|
+
blade
|
|
6
|
+
</VButton>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="item">
|
|
9
|
+
<VButton @click="snake">
|
|
10
|
+
snake
|
|
11
|
+
</VButton>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="item">
|
|
14
|
+
<VButton @click="circle">
|
|
15
|
+
circle
|
|
16
|
+
</VButton>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="item">
|
|
19
|
+
<VButton @click="bounce">
|
|
20
|
+
bounce
|
|
21
|
+
</VButton>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: 'ViewIndicator',
|
|
31
|
+
setup () {
|
|
32
|
+
const { proxy } = getCurrentInstance()
|
|
33
|
+
const removeAfterDelay = (duration = 3000) => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
proxy.$Indicator.remove()
|
|
36
|
+
}, duration)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const blade = () => {
|
|
40
|
+
proxy.$Indicator.blade()
|
|
41
|
+
removeAfterDelay()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const snake = () => {
|
|
45
|
+
proxy.$Indicator.snake()
|
|
46
|
+
removeAfterDelay()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const circle = () => {
|
|
50
|
+
proxy.$Indicator.circle()
|
|
51
|
+
removeAfterDelay()
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const bounce = () => {
|
|
55
|
+
proxy.$Indicator.bounce()
|
|
56
|
+
removeAfterDelay()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
blade,
|
|
61
|
+
snake,
|
|
62
|
+
circle,
|
|
63
|
+
bounce
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style lang="less" scoped>
|
|
70
|
+
.Indicator {
|
|
71
|
+
height: 100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-around;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: center;
|
|
76
|
+
|
|
77
|
+
.item {
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
width: 50%;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="LoadMore">
|
|
3
|
+
<LoadMore
|
|
4
|
+
ref="moreRef"
|
|
5
|
+
:refresh="topMethod"
|
|
6
|
+
height="100%"
|
|
7
|
+
:load-more="bottomMethod"
|
|
8
|
+
:has-more="hasMore"
|
|
9
|
+
@on-change-up-status="getStatus"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
v-for="(item, index) in loadmore"
|
|
13
|
+
:key="index"
|
|
14
|
+
style="width: 100%; height: 50px;"
|
|
15
|
+
>
|
|
16
|
+
{{ item }}
|
|
17
|
+
</div>
|
|
18
|
+
</LoadMore>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import { defineComponent, ref } from 'vue'
|
|
24
|
+
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
name: 'ViewLoadMore',
|
|
27
|
+
setup () {
|
|
28
|
+
const moreRef = ref(null)
|
|
29
|
+
const hasMore = ref(true)
|
|
30
|
+
const loadmore = ref(Array(16).fill('LoadMore'))
|
|
31
|
+
|
|
32
|
+
const topMethod = () => {
|
|
33
|
+
hasMore.value = true
|
|
34
|
+
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
if (moreRef.value && moreRef.value.onLoadOff) {
|
|
37
|
+
moreRef.value.onLoadOff()
|
|
38
|
+
}
|
|
39
|
+
}, 2000)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const bottomMethod = () => {
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
if (moreRef.value && moreRef.value.onLoadOff) {
|
|
45
|
+
moreRef.value.onLoadOff()
|
|
46
|
+
}
|
|
47
|
+
loadmore.value.push(...['LoadMore', 'LoadMore'])
|
|
48
|
+
}, 2000)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const getStatus = (val) => {
|
|
52
|
+
console.log(val)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
moreRef,
|
|
57
|
+
hasMore,
|
|
58
|
+
loadmore,
|
|
59
|
+
topMethod,
|
|
60
|
+
bottomMethod,
|
|
61
|
+
getStatus
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style lang="less" scoped>
|
|
68
|
+
.LoadMore {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
overflow: auto;
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Message">
|
|
3
|
+
<VButton
|
|
4
|
+
width="50%"
|
|
5
|
+
@click="showMessageTop"
|
|
6
|
+
>
|
|
7
|
+
Top
|
|
8
|
+
</VButton>
|
|
9
|
+
<VButton
|
|
10
|
+
width="50%"
|
|
11
|
+
@click="showMessage"
|
|
12
|
+
>
|
|
13
|
+
Center
|
|
14
|
+
</VButton>
|
|
15
|
+
<VButton
|
|
16
|
+
width="50%"
|
|
17
|
+
@click="showMessageBottom"
|
|
18
|
+
>
|
|
19
|
+
Bottom
|
|
20
|
+
</VButton>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import { getCurrentInstance } from 'vue'
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'ViewMessage',
|
|
29
|
+
setup () {
|
|
30
|
+
// 获取全局实例
|
|
31
|
+
const { proxy } = getCurrentInstance()
|
|
32
|
+
const showMessage = () => {
|
|
33
|
+
proxy.$Message.show({ text: '显示消息' })
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const showMessageTop = () => {
|
|
37
|
+
proxy.$Message.show({ text: '显示消息', position: 'top' })
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const showMessageBottom = () => {
|
|
41
|
+
proxy.$Message.show({ text: '显示消息', position: 'bottom' })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
showMessage,
|
|
46
|
+
showMessageTop,
|
|
47
|
+
showMessageBottom
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped>
|
|
54
|
+
.Message {
|
|
55
|
+
height: 100%;
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: space-around;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="Modal">
|
|
3
|
+
<VButton
|
|
4
|
+
width="50%"
|
|
5
|
+
@click="showInfo"
|
|
6
|
+
>
|
|
7
|
+
info
|
|
8
|
+
</VButton>
|
|
9
|
+
<VButton
|
|
10
|
+
width="50%"
|
|
11
|
+
@click="showConfirm"
|
|
12
|
+
>
|
|
13
|
+
confirm
|
|
14
|
+
</VButton>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import { getCurrentInstance } from 'vue'
|
|
20
|
+
import VButton from '../components/button'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'ViewModal',
|
|
24
|
+
components: { VButton },
|
|
25
|
+
setup () {
|
|
26
|
+
// 获取实例,用来访问全局属性 $Modal / $Message
|
|
27
|
+
const { proxy } = getCurrentInstance()
|
|
28
|
+
|
|
29
|
+
const showInfo = () => {
|
|
30
|
+
proxy.$Modal.info({
|
|
31
|
+
body: '这是内容',
|
|
32
|
+
onOk: function () {
|
|
33
|
+
proxy.$Message.show({ text: '点击了确定' })
|
|
34
|
+
// console.log('点击了确定')
|
|
35
|
+
},
|
|
36
|
+
onCancle: function () {
|
|
37
|
+
proxy.$Message.show({ text: '点击了取消' })
|
|
38
|
+
// console.log('点击了取消')
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const showConfirm = () => {
|
|
44
|
+
proxy.$Modal.confirm({
|
|
45
|
+
body: '这是内容',
|
|
46
|
+
onOk: function () {
|
|
47
|
+
proxy.$Message.show({ text: '点击了确定' })
|
|
48
|
+
// console.log('点击了确定')
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
showInfo,
|
|
55
|
+
showConfirm
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="less" scoped>
|
|
62
|
+
.Modal {
|
|
63
|
+
height: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-around;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
</style>
|