@dcloudio/uni-components 0.0.1-nvue3.3030820220125001
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 +202 -0
- package/index.js +0 -0
- package/lib/custom-tab-bar/custom-tab-bar.vue +126 -0
- package/lib/navigation-bar/navigation-bar.vue +159 -0
- package/lib/page-meta/page-meta.vue +205 -0
- package/lib/page-meta-head/page-meta-head.vue +10 -0
- package/lib/uni-match-media/uni-match-media.vue +73 -0
- package/lib/unicloud-db/i18n/en.json +6 -0
- package/lib/unicloud-db/i18n/es.json +6 -0
- package/lib/unicloud-db/i18n/fr.json +6 -0
- package/lib/unicloud-db/i18n/index.js +12 -0
- package/lib/unicloud-db/i18n/zh-Hans.json +6 -0
- package/lib/unicloud-db/i18n/zh-Hant.json +6 -0
- package/lib/unicloud-db/unicloud-db.vue +626 -0
- package/package.json +24 -0
- package/style/button.css +264 -0
- package/style/canvas.css +14 -0
- package/style/checkbox-group.css +7 -0
- package/style/checkbox.css +56 -0
- package/style/editor.css +393 -0
- package/style/form.css +0 -0
- package/style/icon.css +9 -0
- package/style/image.css +33 -0
- package/style/input.css +87 -0
- package/style/label.css +3 -0
- package/style/movable-area.css +10 -0
- package/style/movable-view.css +13 -0
- package/style/navigator.css +45 -0
- package/style/picker-view-column.css +99 -0
- package/style/picker-view.css +14 -0
- package/style/progress.css +25 -0
- package/style/radio-group.css +6 -0
- package/style/radio.css +53 -0
- package/style/resize-sensor.css +33 -0
- package/style/rich-text.css +0 -0
- package/style/scroll-view.css +90 -0
- package/style/slider.css +89 -0
- package/style/swiper-item.css +13 -0
- package/style/swiper.css +85 -0
- package/style/switch.css +111 -0
- package/style/text.css +8 -0
- package/style/textarea.css +79 -0
- package/style/view.css +6 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view v-show="matches">
|
|
3
|
+
<slot />
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
let mediaQueryObserver
|
|
9
|
+
export default {
|
|
10
|
+
name: 'UniMatchMedia',
|
|
11
|
+
props: {
|
|
12
|
+
width: {
|
|
13
|
+
type: [Number, String],
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
16
|
+
minWidth: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: ''
|
|
19
|
+
},
|
|
20
|
+
maxWidth: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: ''
|
|
23
|
+
},
|
|
24
|
+
height: {
|
|
25
|
+
type: [Number, String],
|
|
26
|
+
default: ''
|
|
27
|
+
},
|
|
28
|
+
minHeight: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: ''
|
|
31
|
+
},
|
|
32
|
+
maxHeight: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: ''
|
|
35
|
+
},
|
|
36
|
+
orientation: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ''
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
data () {
|
|
43
|
+
return {
|
|
44
|
+
matches: true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
mounted () {
|
|
49
|
+
mediaQueryObserver = uni.createMediaQueryObserver(this)
|
|
50
|
+
mediaQueryObserver.observe({
|
|
51
|
+
width: this.width,
|
|
52
|
+
maxWidth: this.maxWidth,
|
|
53
|
+
minWidth: this.minWidth,
|
|
54
|
+
height: this.height,
|
|
55
|
+
minHeight: this.minHeight,
|
|
56
|
+
maxHeight: this.maxHeight,
|
|
57
|
+
orientation: this.orientation
|
|
58
|
+
}, matches => {
|
|
59
|
+
this.matches = matches
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
destroyed () {
|
|
64
|
+
mediaQueryObserver.disconnect()
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
view {
|
|
71
|
+
display: block;
|
|
72
|
+
}
|
|
73
|
+
</style>
|