@atooyu/uxto-ui 1.1.39 → 1.1.40
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/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -4
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +11 -11
- package/package.json +1 -1
- package/src/components/u-popup/u-popup.vue +14 -2
package/dist/style.css
CHANGED
|
@@ -2058,7 +2058,7 @@ to {
|
|
|
2058
2058
|
color: #ffffff;
|
|
2059
2059
|
line-height: 1.4;
|
|
2060
2060
|
text-align: center;
|
|
2061
|
-
}.u-popup[data-v-
|
|
2061
|
+
}.u-popup[data-v-7b84ec59] {
|
|
2062
2062
|
position: fixed;
|
|
2063
2063
|
top: 0;
|
|
2064
2064
|
left: 0;
|
|
@@ -2066,7 +2066,7 @@ to {
|
|
|
2066
2066
|
bottom: 0;
|
|
2067
2067
|
z-index: 1000;
|
|
2068
2068
|
}
|
|
2069
|
-
.u-popup__overlay[data-v-
|
|
2069
|
+
.u-popup__overlay[data-v-7b84ec59] {
|
|
2070
2070
|
position: absolute;
|
|
2071
2071
|
top: 0;
|
|
2072
2072
|
left: 0;
|
|
@@ -2074,43 +2074,43 @@ to {
|
|
|
2074
2074
|
bottom: 0;
|
|
2075
2075
|
background-color: rgba(0, 0, 0, 0.7);
|
|
2076
2076
|
}
|
|
2077
|
-
.u-popup__content[data-v-
|
|
2077
|
+
.u-popup__content[data-v-7b84ec59] {
|
|
2078
2078
|
position: absolute;
|
|
2079
2079
|
background-color: #ffffff;
|
|
2080
2080
|
overflow: hidden;
|
|
2081
2081
|
}
|
|
2082
|
-
.u-popup__content--top[data-v-
|
|
2082
|
+
.u-popup__content--top[data-v-7b84ec59] {
|
|
2083
2083
|
top: 0;
|
|
2084
2084
|
left: 0;
|
|
2085
2085
|
right: 0;
|
|
2086
2086
|
}
|
|
2087
|
-
.u-popup__content--bottom[data-v-
|
|
2087
|
+
.u-popup__content--bottom[data-v-7b84ec59] {
|
|
2088
2088
|
bottom: 0;
|
|
2089
2089
|
left: 0;
|
|
2090
2090
|
right: 0;
|
|
2091
2091
|
}
|
|
2092
|
-
.u-popup__content--left[data-v-
|
|
2092
|
+
.u-popup__content--left[data-v-7b84ec59] {
|
|
2093
2093
|
left: 0;
|
|
2094
2094
|
top: 0;
|
|
2095
2095
|
bottom: 0;
|
|
2096
2096
|
width: 80%;
|
|
2097
2097
|
}
|
|
2098
|
-
.u-popup__content--right[data-v-
|
|
2098
|
+
.u-popup__content--right[data-v-7b84ec59] {
|
|
2099
2099
|
right: 0;
|
|
2100
2100
|
top: 0;
|
|
2101
2101
|
bottom: 0;
|
|
2102
2102
|
width: 80%;
|
|
2103
2103
|
}
|
|
2104
|
-
.u-popup__content--center[data-v-
|
|
2104
|
+
.u-popup__content--center[data-v-7b84ec59] {
|
|
2105
2105
|
top: 50%;
|
|
2106
2106
|
left: 50%;
|
|
2107
2107
|
transform: translate(-50%, -50%);
|
|
2108
2108
|
min-width: 280px;
|
|
2109
2109
|
}
|
|
2110
|
-
.u-popup__content--round[data-v-
|
|
2110
|
+
.u-popup__content--round[data-v-7b84ec59] {
|
|
2111
2111
|
border-radius: 12px;
|
|
2112
2112
|
}
|
|
2113
|
-
.u-popup__close[data-v-
|
|
2113
|
+
.u-popup__close[data-v-7b84ec59] {
|
|
2114
2114
|
position: absolute;
|
|
2115
2115
|
top: 12px;
|
|
2116
2116
|
right: 12px;
|
|
@@ -2121,7 +2121,7 @@ to {
|
|
|
2121
2121
|
justify-content: center;
|
|
2122
2122
|
z-index: 1;
|
|
2123
2123
|
}
|
|
2124
|
-
.u-popup__close-icon[data-v-
|
|
2124
|
+
.u-popup__close-icon[data-v-7b84ec59] {
|
|
2125
2125
|
font-size: 18px;
|
|
2126
2126
|
color: #969799;
|
|
2127
2127
|
}.u-code-input[data-v-9fffa23f] {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view v-if="
|
|
2
|
+
<view v-if="show" class="u-popup">
|
|
3
3
|
<view
|
|
4
4
|
class="u-popup__overlay"
|
|
5
5
|
@click="handleOverlayClick"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
type PopupPosition = 'top' | 'bottom' | 'left' | 'right' | 'center'
|
|
21
21
|
|
|
22
22
|
interface Props {
|
|
23
|
+
show?: boolean
|
|
23
24
|
visible?: boolean
|
|
24
25
|
position?: PopupPosition
|
|
25
26
|
closeable?: boolean
|
|
@@ -29,7 +30,8 @@ interface Props {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
const props = withDefaults(defineProps<Props>(), {
|
|
32
|
-
|
|
33
|
+
show: undefined,
|
|
34
|
+
visible: undefined,
|
|
33
35
|
position: 'bottom',
|
|
34
36
|
closeable: false,
|
|
35
37
|
closeOnClickOverlay: true,
|
|
@@ -38,10 +40,18 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
38
40
|
})
|
|
39
41
|
|
|
40
42
|
const emit = defineEmits<{
|
|
43
|
+
'update:show': [value: boolean]
|
|
41
44
|
'update:visible': [value: boolean]
|
|
42
45
|
close: []
|
|
43
46
|
}>()
|
|
44
47
|
|
|
48
|
+
// 支持 show 和 visible 两种方式
|
|
49
|
+
const isOpen = computed(() => {
|
|
50
|
+
if (props.show !== undefined) return props.show
|
|
51
|
+
if (props.visible !== undefined) return props.visible
|
|
52
|
+
return false
|
|
53
|
+
})
|
|
54
|
+
|
|
45
55
|
const handleOverlayClick = () => {
|
|
46
56
|
if (props.closeOnClickOverlay) {
|
|
47
57
|
handleClose()
|
|
@@ -49,12 +59,14 @@ const handleOverlayClick = () => {
|
|
|
49
59
|
}
|
|
50
60
|
|
|
51
61
|
const handleClose = () => {
|
|
62
|
+
emit('update:show', false)
|
|
52
63
|
emit('update:visible', false)
|
|
53
64
|
emit('close')
|
|
54
65
|
}
|
|
55
66
|
</script>
|
|
56
67
|
|
|
57
68
|
<script lang="ts">
|
|
69
|
+
import { computed } from 'vue'
|
|
58
70
|
export default {
|
|
59
71
|
options: {
|
|
60
72
|
virtualHost: true,
|