y-design-ssr 0.2.0 → 0.2.2
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/libs/button/index.css +579 -1
- package/libs/button/index.mjs +111 -66
- package/libs/button/index.umd.js +203 -2
- package/libs/cell/index.css +1077 -1
- package/libs/cell/index.mjs +167 -104
- package/libs/cell/index.umd.js +300 -2
- package/libs/checkbox/index.css +1053 -1
- package/libs/checkbox/index.mjs +242 -127
- package/libs/checkbox/index.umd.js +369 -2
- package/libs/checkboxGroup/index.css +422 -1
- package/libs/checkboxGroup/index.mjs +173 -87
- package/libs/checkboxGroup/index.umd.js +265 -2
- package/libs/col/index.css +615 -1
- package/libs/col/index.mjs +246 -81
- package/libs/col/index.umd.js +305 -2
- package/libs/countdown/index.css +417 -1
- package/libs/countdown/index.mjs +179 -71
- package/libs/countdown/index.umd.js +231 -2
- package/libs/dialog/index.css +1405 -1
- package/libs/dialog/index.mjs +646 -476
- package/libs/dialog/index.umd.js +1128 -2
- package/libs/empty/index.css +457 -1
- package/libs/empty/index.mjs +91 -44
- package/libs/empty/index.umd.js +139 -2
- package/libs/form/index.css +477 -1
- package/libs/form/index.mjs +226 -126
- package/libs/form/index.umd.js +319 -2
- package/libs/formItem/index.css +477 -1
- package/libs/formItem/index.mjs +276 -126
- package/libs/formItem/index.umd.js +372 -2
- package/libs/icon/index.css +982 -1
- package/libs/icon/index.mjs +107 -58
- package/libs/icon/index.umd.js +186 -2
- package/libs/index.css +2902 -1
- package/libs/index.mjs +3785 -2344
- package/libs/index.umd.js +5509 -2
- package/libs/input/index.css +483 -1
- package/libs/input/index.mjs +183 -92
- package/libs/input/index.umd.js +274 -2
- package/libs/layout/index.css +684 -1
- package/libs/layout/index.mjs +230 -130
- package/libs/layout/index.umd.js +318 -2
- package/libs/list/index.css +440 -1
- package/libs/list/index.mjs +388 -207
- package/libs/list/index.umd.js +571 -2
- package/libs/loading/index.css +548 -1
- package/libs/loading/index.mjs +196 -118
- package/libs/loading/index.umd.js +321 -2
- package/libs/mask/index.css +426 -1
- package/libs/mask/index.mjs +131 -70
- package/libs/mask/index.umd.js +201 -2
- package/libs/popup/index.css +465 -1
- package/libs/popup/index.mjs +210 -134
- package/libs/popup/index.umd.js +358 -2
- package/libs/progress/index.css +488 -1
- package/libs/progress/index.mjs +200 -128
- package/libs/progress/index.umd.js +322 -2
- package/libs/pullrefresh/index.css +441 -1
- package/libs/pullrefresh/index.mjs +241 -111
- package/libs/pullrefresh/index.umd.js +302 -2
- package/libs/row/index.css +485 -1
- package/libs/row/index.mjs +181 -89
- package/libs/row/index.umd.js +237 -2
- package/libs/slider/index.css +558 -1
- package/libs/slider/index.mjs +356 -160
- package/libs/slider/index.umd.js +453 -2
- package/libs/stepper/index.css +489 -1
- package/libs/stepper/index.mjs +181 -101
- package/libs/stepper/index.umd.js +269 -2
- package/libs/swipe/index.css +506 -1
- package/libs/swipe/index.mjs +542 -259
- package/libs/swipe/index.umd.js +703 -2
- package/libs/swipeItem/index.css +424 -1
- package/libs/swipeItem/index.mjs +111 -52
- package/libs/swipeItem/index.umd.js +154 -2
- package/libs/switch/index.css +472 -1
- package/libs/switch/index.mjs +121 -62
- package/libs/switch/index.umd.js +200 -2
- package/libs/tab/index.mjs +131 -68
- package/libs/tab/index.umd.js +190 -1
- package/libs/tabs/index.css +514 -1
- package/libs/tabs/index.mjs +751 -410
- package/libs/tabs/index.umd.js +1020 -2
- package/libs/toast/index.css +1050 -1
- package/libs/toast/index.mjs +183 -114
- package/libs/toast/index.umd.js +306 -2
- package/libs/tooltip/index.css +514 -1
- package/libs/tooltip/index.mjs +293 -155
- package/libs/tooltip/index.umd.js +416 -2
- package/package.json +5 -4
- package/libs/button/package.json +0 -5
- package/libs/cell/package.json +0 -5
- package/libs/checkbox/package.json +0 -5
- package/libs/checkboxGroup/package.json +0 -5
- package/libs/col/package.json +0 -5
- package/libs/countdown/package.json +0 -5
- package/libs/dialog/package.json +0 -5
- package/libs/empty/package.json +0 -5
- package/libs/form/package.json +0 -5
- package/libs/formItem/package.json +0 -5
- package/libs/icon/package.json +0 -5
- package/libs/input/package.json +0 -5
- package/libs/layout/package.json +0 -5
- package/libs/list/package.json +0 -5
- package/libs/loading/package.json +0 -5
- package/libs/mask/package.json +0 -5
- package/libs/popup/package.json +0 -5
- package/libs/progress/package.json +0 -5
- package/libs/pullrefresh/package.json +0 -5
- package/libs/row/package.json +0 -5
- package/libs/slider/package.json +0 -5
- package/libs/stepper/package.json +0 -5
- package/libs/swipe/package.json +0 -5
- package/libs/swipeItem/package.json +0 -5
- package/libs/switch/package.json +0 -5
- package/libs/tab/package.json +0 -5
- package/libs/tabs/package.json +0 -5
- package/libs/toast/package.json +0 -5
- package/libs/tooltip/package.json +0 -5
|
@@ -1,11 +1,40 @@
|
|
|
1
|
-
import { ref
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
import { ref, reactive, defineComponent, getCurrentInstance, computed, onMounted, onUnmounted, createVNode } from "vue";
|
|
2
|
+
const getMods = (el, mods) => {
|
|
3
|
+
if (!mods) {
|
|
4
|
+
return "";
|
|
5
|
+
}
|
|
6
|
+
if (typeof mods === "string") {
|
|
7
|
+
return ` ${el}--${mods}`;
|
|
8
|
+
}
|
|
9
|
+
if (Array.isArray(mods)) {
|
|
10
|
+
return mods.reduce((acc, cur) => acc + getMods(el, cur), "");
|
|
11
|
+
}
|
|
12
|
+
return Object.keys(mods).reduce(
|
|
13
|
+
(acc, cur) => acc + (mods[cur] ? getMods(el, cur) : ""),
|
|
14
|
+
""
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
const createBEM = (block) => {
|
|
18
|
+
return (el, mods) => {
|
|
19
|
+
let _el = el;
|
|
20
|
+
let _mods = mods;
|
|
21
|
+
if (_el && typeof _el !== "string") {
|
|
22
|
+
_mods = _el;
|
|
23
|
+
_el = "";
|
|
24
|
+
}
|
|
25
|
+
_el = _el ? `${block}__${_el}` : block;
|
|
26
|
+
return `${_el}${getMods(_el, _mods)}`;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const createGlobalBem = () => {
|
|
30
|
+
return (el, mods) => {
|
|
31
|
+
if (!mods) {
|
|
32
|
+
return `y-${el}`;
|
|
33
|
+
}
|
|
34
|
+
return `${getMods(`y-${el}`, mods)}`;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const defaultLang = {
|
|
9
38
|
"pull-refresh": {
|
|
10
39
|
pulling: "下拉刷新...",
|
|
11
40
|
loosing: "释放刷新...",
|
|
@@ -16,59 +45,88 @@ const y = (t, n) => n ? typeof n == "string" ? ` ${t}--${n}` : Array.isArray(n)
|
|
|
16
45
|
"form-item": {
|
|
17
46
|
validateMessage: "请输入正确内容"
|
|
18
47
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
48
|
+
};
|
|
49
|
+
const lang = ref("zh-CN");
|
|
50
|
+
const langs = reactive({
|
|
51
|
+
"zh-CN": defaultLang
|
|
52
|
+
});
|
|
53
|
+
const locale$1 = {
|
|
22
54
|
text() {
|
|
23
|
-
return
|
|
55
|
+
return langs[lang.value];
|
|
24
56
|
},
|
|
25
|
-
use(
|
|
26
|
-
|
|
57
|
+
use(newLang, newConfigs) {
|
|
58
|
+
lang.value = newLang;
|
|
59
|
+
this.add({ [newLang]: newConfigs });
|
|
27
60
|
},
|
|
28
|
-
add(
|
|
29
|
-
Object.assign(
|
|
61
|
+
add(newConfigs = {}) {
|
|
62
|
+
Object.assign(langs, newConfigs);
|
|
30
63
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
64
|
+
};
|
|
65
|
+
const createNamespace = (name2) => {
|
|
66
|
+
const prefixedName = `y-${name2}`;
|
|
67
|
+
return [prefixedName, createBEM(prefixedName), createGlobalBem()];
|
|
68
|
+
};
|
|
69
|
+
const createLocale = (name2) => {
|
|
70
|
+
return locale$1.text()[name2];
|
|
71
|
+
};
|
|
72
|
+
const getAngle = (x1, y1, x2, y2) => {
|
|
73
|
+
const x = Math.abs(x1 - x2);
|
|
74
|
+
const y = Math.abs(y1 - y2);
|
|
75
|
+
const z = Math.sqrt(x * x + y * y);
|
|
76
|
+
return 90 - Math.round(Math.asin(y / z) / Math.PI * 180);
|
|
77
|
+
};
|
|
78
|
+
const hasInnerScroll = (e) => {
|
|
79
|
+
const currentTarget = e.currentTarget;
|
|
80
|
+
const target = e.target;
|
|
81
|
+
let bool = false;
|
|
82
|
+
if (currentTarget === target)
|
|
83
|
+
return bool;
|
|
84
|
+
const _hasInnerScroll = (t) => {
|
|
85
|
+
if (t.offsetHeight !== t.scrollHeight && t.scrollTop !== 0) {
|
|
86
|
+
bool = true;
|
|
87
|
+
} else if (t.parentElement && t.parentElement !== currentTarget) {
|
|
88
|
+
_hasInnerScroll(t.parentElement);
|
|
89
|
+
}
|
|
44
90
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
91
|
+
target && _hasInnerScroll(target);
|
|
92
|
+
return bool;
|
|
93
|
+
};
|
|
94
|
+
const [name, bem] = createNamespace("pull-refresh");
|
|
95
|
+
const locale = createLocale("pull-refresh");
|
|
96
|
+
const ANGLE = 30;
|
|
97
|
+
const ANIMATION_TIME = 0.5;
|
|
98
|
+
let RefreshStatus = /* @__PURE__ */ function(RefreshStatus2) {
|
|
99
|
+
RefreshStatus2["DEFUALT"] = "normal";
|
|
100
|
+
RefreshStatus2["PULLING"] = "pulling";
|
|
101
|
+
RefreshStatus2["LOOSING"] = "loosing";
|
|
102
|
+
RefreshStatus2["LOADING"] = "loading";
|
|
103
|
+
RefreshStatus2["SUCCESS"] = "success";
|
|
104
|
+
RefreshStatus2["FAILED"] = "failed";
|
|
105
|
+
return RefreshStatus2;
|
|
49
106
|
}({});
|
|
50
|
-
const
|
|
51
|
-
|
|
107
|
+
const getScale = (num) => num < 60 ? 1 : 1 - (num - 60) / 600;
|
|
108
|
+
const Pullrefresh = /* @__PURE__ */ defineComponent({
|
|
109
|
+
name,
|
|
52
110
|
props: {
|
|
53
111
|
pullingText: {
|
|
54
112
|
type: String,
|
|
55
|
-
default:
|
|
113
|
+
default: locale.pulling
|
|
56
114
|
},
|
|
57
115
|
loosingText: {
|
|
58
116
|
type: String,
|
|
59
|
-
default:
|
|
117
|
+
default: locale.loosing
|
|
60
118
|
},
|
|
61
119
|
loadingText: {
|
|
62
120
|
type: String,
|
|
63
|
-
default:
|
|
121
|
+
default: locale.loading
|
|
64
122
|
},
|
|
65
123
|
successText: {
|
|
66
124
|
type: String,
|
|
67
|
-
default:
|
|
125
|
+
default: locale.success
|
|
68
126
|
},
|
|
69
127
|
failedText: {
|
|
70
128
|
type: String,
|
|
71
|
-
default:
|
|
129
|
+
default: locale.failed
|
|
72
130
|
},
|
|
73
131
|
statusHeight: {
|
|
74
132
|
type: Number,
|
|
@@ -76,91 +134,163 @@ const Q = (t) => t < 60 ? 1 : 1 - (t - 60) / 600, A = /* @__PURE__ */ H({
|
|
|
76
134
|
},
|
|
77
135
|
disabled: {
|
|
78
136
|
type: Boolean,
|
|
79
|
-
default:
|
|
137
|
+
default: false
|
|
80
138
|
}
|
|
81
139
|
},
|
|
82
|
-
setup(
|
|
83
|
-
slots
|
|
84
|
-
emit
|
|
85
|
-
expose
|
|
140
|
+
setup(props, {
|
|
141
|
+
slots,
|
|
142
|
+
emit,
|
|
143
|
+
expose
|
|
86
144
|
}) {
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
145
|
+
const instance = getCurrentInstance();
|
|
146
|
+
let _startPosX = 0;
|
|
147
|
+
let _startPosY = 0;
|
|
148
|
+
let _transitionHeight = 0;
|
|
149
|
+
let $scroll = null;
|
|
150
|
+
const translateY = ref(0);
|
|
151
|
+
const transitionTime = ref(0);
|
|
152
|
+
const refreshStatus = ref(RefreshStatus.DEFUALT);
|
|
153
|
+
const children = computed(() => {
|
|
154
|
+
var _a;
|
|
155
|
+
const $el = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$el;
|
|
156
|
+
const $children = [...$el.childNodes];
|
|
157
|
+
return $children == null ? void 0 : $children.filter((node) => node.nodeType !== 3 || node.nodeValue !== "");
|
|
158
|
+
});
|
|
159
|
+
const callback = (status = "success") => {
|
|
160
|
+
refreshStatus.value = status;
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
translateY.value = 0;
|
|
163
|
+
}, 500);
|
|
164
|
+
setTimeout(() => {
|
|
165
|
+
refreshStatus.value = RefreshStatus.DEFUALT;
|
|
98
166
|
}, 1e3);
|
|
99
|
-
}, D = () => {
|
|
100
|
-
c.value = t.statusHeight, L.value = U, o.value = u.LOADING, r("load", G);
|
|
101
|
-
}, m = (e) => {
|
|
102
|
-
l = e instanceof TouchEvent ? e.touches[0].pageX : e.pageX, g = e instanceof TouchEvent ? e.touches[0].pageY : e.pageY, I.value.length !== 2 || I.value[1].nodeType === 3 ? N = s == null ? void 0 : s.vnode.el : N = I.value[1], !t.disabled && !w(e) && N.scrollTop === 0 && o.value === u.DEFUALT && (o.value = u.PULLING, c.value = 0, L.value = 0);
|
|
103
|
-
}, E = (e) => {
|
|
104
|
-
const i = e instanceof TouchEvent ? e.touches[0].pageX : e.pageX, v = e instanceof TouchEvent ? e.touches[0].pageY : e.pageY, d = q(l, g, i, v);
|
|
105
|
-
p = v - g, (o.value === u.PULLING || o.value === u.LOOSING) && p > 0 && d < K && (e.preventDefault(), c.value = p * Q(p), p > t.statusHeight && o.value === u.PULLING && (o.value = u.LOOSING));
|
|
106
|
-
}, f = (e) => {
|
|
107
|
-
o.value === u.LOOSING ? (c.value = t.statusHeight, L.value = U, o.value = u.LOADING, r("load", G, e)) : o.value === u.PULLING && (c.value = 0, o.value = u.DEFUALT);
|
|
108
167
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
168
|
+
const refresh = () => {
|
|
169
|
+
translateY.value = props.statusHeight;
|
|
170
|
+
transitionTime.value = ANIMATION_TIME;
|
|
171
|
+
refreshStatus.value = RefreshStatus.LOADING;
|
|
172
|
+
emit("load", callback);
|
|
173
|
+
};
|
|
174
|
+
const touchStart = (e) => {
|
|
175
|
+
_startPosX = e instanceof TouchEvent ? e.touches[0].pageX : e.pageX;
|
|
176
|
+
_startPosY = e instanceof TouchEvent ? e.touches[0].pageY : e.pageY;
|
|
177
|
+
if (children.value.length !== 2 || children.value[1].nodeType === 3) {
|
|
178
|
+
$scroll = instance == null ? void 0 : instance.vnode.el;
|
|
179
|
+
} else {
|
|
180
|
+
$scroll = children.value[1];
|
|
181
|
+
}
|
|
182
|
+
if (!props.disabled && !hasInnerScroll(e) && $scroll.scrollTop === 0 && refreshStatus.value === RefreshStatus.DEFUALT) {
|
|
183
|
+
refreshStatus.value = RefreshStatus.PULLING;
|
|
184
|
+
translateY.value = 0;
|
|
185
|
+
transitionTime.value = 0;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const touchMove = (e) => {
|
|
189
|
+
const x = e instanceof TouchEvent ? e.touches[0].pageX : e.pageX;
|
|
190
|
+
const y = e instanceof TouchEvent ? e.touches[0].pageY : e.pageY;
|
|
191
|
+
const angle = getAngle(_startPosX, _startPosY, x, y);
|
|
192
|
+
_transitionHeight = y - _startPosY;
|
|
193
|
+
if ((refreshStatus.value === RefreshStatus.PULLING || refreshStatus.value === RefreshStatus.LOOSING) && _transitionHeight > 0 && angle < ANGLE) {
|
|
194
|
+
e.preventDefault();
|
|
195
|
+
translateY.value = _transitionHeight * getScale(_transitionHeight);
|
|
196
|
+
if (_transitionHeight > props.statusHeight && refreshStatus.value === RefreshStatus.PULLING) {
|
|
197
|
+
refreshStatus.value = RefreshStatus.LOOSING;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const touchEnd = (e) => {
|
|
202
|
+
if (refreshStatus.value === RefreshStatus.LOOSING) {
|
|
203
|
+
translateY.value = props.statusHeight;
|
|
204
|
+
transitionTime.value = ANIMATION_TIME;
|
|
205
|
+
refreshStatus.value = RefreshStatus.LOADING;
|
|
206
|
+
emit("load", callback, e);
|
|
207
|
+
} else if (refreshStatus.value === RefreshStatus.PULLING) {
|
|
208
|
+
translateY.value = 0;
|
|
209
|
+
refreshStatus.value = RefreshStatus.DEFUALT;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
onMounted(() => {
|
|
213
|
+
const $el = instance == null ? void 0 : instance.vnode.el;
|
|
214
|
+
$el == null ? void 0 : $el.addEventListener("touchstart", touchStart, {
|
|
215
|
+
passive: false
|
|
216
|
+
});
|
|
217
|
+
$el == null ? void 0 : $el.addEventListener("touchmove", touchMove, {
|
|
218
|
+
passive: false
|
|
219
|
+
});
|
|
220
|
+
$el == null ? void 0 : $el.addEventListener("touchend", touchEnd, {
|
|
221
|
+
passive: false
|
|
222
|
+
});
|
|
223
|
+
$el == null ? void 0 : $el.addEventListener("mousedown", touchStart, {
|
|
224
|
+
passive: false
|
|
225
|
+
});
|
|
226
|
+
$el == null ? void 0 : $el.addEventListener("mousemove", touchMove, {
|
|
227
|
+
passive: false
|
|
228
|
+
});
|
|
229
|
+
$el == null ? void 0 : $el.addEventListener("mouseup", touchEnd, {
|
|
230
|
+
passive: false
|
|
231
|
+
});
|
|
232
|
+
$el == null ? void 0 : $el.addEventListener("mouseout", touchEnd, {
|
|
233
|
+
passive: false
|
|
125
234
|
});
|
|
126
|
-
}), X(() => {
|
|
127
|
-
const e = s == null ? void 0 : s.vnode.el;
|
|
128
|
-
e == null || e.removeEventListener("touchstart", m), e == null || e.removeEventListener("touchmove", E), e == null || e.removeEventListener("touchend", f), e == null || e.removeEventListener("mousedown", m), e == null || e.removeEventListener("mousemove", E), e == null || e.removeEventListener("mouseup", f), e == null || e.removeEventListener("mouseout", f);
|
|
129
235
|
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
236
|
+
onUnmounted(() => {
|
|
237
|
+
const $el = instance == null ? void 0 : instance.vnode.el;
|
|
238
|
+
$el == null ? void 0 : $el.removeEventListener("touchstart", touchStart);
|
|
239
|
+
$el == null ? void 0 : $el.removeEventListener("touchmove", touchMove);
|
|
240
|
+
$el == null ? void 0 : $el.removeEventListener("touchend", touchEnd);
|
|
241
|
+
$el == null ? void 0 : $el.removeEventListener("mousedown", touchStart);
|
|
242
|
+
$el == null ? void 0 : $el.removeEventListener("mousemove", touchMove);
|
|
243
|
+
$el == null ? void 0 : $el.removeEventListener("mouseup", touchEnd);
|
|
244
|
+
$el == null ? void 0 : $el.removeEventListener("mouseout", touchEnd);
|
|
245
|
+
});
|
|
246
|
+
const _renderStatus = () => {
|
|
247
|
+
var _a;
|
|
248
|
+
if (refreshStatus.value === RefreshStatus.DEFUALT)
|
|
249
|
+
return null;
|
|
250
|
+
if (slots[refreshStatus.value])
|
|
251
|
+
return (_a = slots[refreshStatus.value]) == null ? void 0 : _a.call(slots);
|
|
252
|
+
return createVNode("p", null, [props[`${refreshStatus.value}Text`]]);
|
|
133
253
|
};
|
|
134
|
-
|
|
135
|
-
refresh
|
|
136
|
-
})
|
|
137
|
-
|
|
254
|
+
expose({
|
|
255
|
+
refresh
|
|
256
|
+
});
|
|
257
|
+
return () => {
|
|
258
|
+
var _a;
|
|
138
259
|
const {
|
|
139
|
-
statusHeight
|
|
140
|
-
} =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
260
|
+
statusHeight
|
|
261
|
+
} = props;
|
|
262
|
+
const height = translateY.value > statusHeight ? statusHeight : translateY.value;
|
|
263
|
+
const transition = `all ${transitionTime.value}s ease 0s`;
|
|
264
|
+
const translate = `translate3d(0, ${-translateY.value}px, 0)`;
|
|
265
|
+
return createVNode("div", {
|
|
266
|
+
"class": bem(),
|
|
267
|
+
"style": {
|
|
268
|
+
WebkitTransform: `translate3d(0, ${translateY.value}px, 0)`,
|
|
269
|
+
transform: `translate3d(0, ${translateY.value}px, 0)`,
|
|
270
|
+
transition
|
|
147
271
|
}
|
|
148
|
-
}, [
|
|
149
|
-
class:
|
|
150
|
-
style: {
|
|
151
|
-
height: `${
|
|
152
|
-
WebkitTransform: `${
|
|
153
|
-
transform: `${
|
|
154
|
-
transition
|
|
272
|
+
}, [createVNode("div", {
|
|
273
|
+
"class": bem("status"),
|
|
274
|
+
"style": {
|
|
275
|
+
height: `${height}px`,
|
|
276
|
+
WebkitTransform: `${translate} scale(${height / statusHeight})`,
|
|
277
|
+
transform: `${translate} scale(${height / statusHeight})`,
|
|
278
|
+
transition
|
|
155
279
|
}
|
|
156
|
-
}, [
|
|
280
|
+
}, [_renderStatus()]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
157
281
|
};
|
|
158
282
|
}
|
|
159
283
|
});
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
284
|
+
const reset = "";
|
|
285
|
+
const libs = "";
|
|
286
|
+
const font = "";
|
|
287
|
+
const animation = "";
|
|
288
|
+
const theme = "";
|
|
289
|
+
const style = "";
|
|
290
|
+
Pullrefresh.install = (Vue) => {
|
|
291
|
+
const { name: name2 } = Pullrefresh;
|
|
292
|
+
Vue.component(name2, Pullrefresh);
|
|
163
293
|
};
|
|
164
294
|
export {
|
|
165
|
-
|
|
295
|
+
Pullrefresh as default
|
|
166
296
|
};
|