@hlw-uni/mp-vue 1.0.3 → 1.0.5
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/components/hlw-menu-list/{index.d.ts → types.d.ts} +0 -2
- package/dist/index.d.ts +8 -4
- package/dist/index.js +301 -113
- package/dist/index.mjs +302 -114
- package/dist/style.css +199 -0
- package/package.json +4 -2
- package/src/components/hlw-avatar/index.vue +64 -3
- package/src/components/hlw-card/index.vue +61 -0
- package/src/components/hlw-empty/index.vue +40 -3
- package/src/components/hlw-header/index.vue +138 -0
- package/src/components/hlw-loading/index.vue +40 -3
- package/src/components/hlw-menu-list/index.vue +93 -3
- package/src/components/hlw-menu-list/types.ts +8 -0
- package/src/components/hlw-page/index.vue +64 -0
- package/src/index.ts +8 -4
- package/dist/components/hlw-avatar/index.d.ts +0 -7
- package/dist/components/hlw-empty/index.d.ts +0 -2
- package/dist/components/hlw-loading/index.d.ts +0 -2
- package/src/components/hlw-avatar/index.ts +0 -52
- package/src/components/hlw-empty/index.ts +0 -34
- package/src/components/hlw-loading/index.ts +0 -29
- package/src/components/hlw-menu-list/index.ts +0 -64
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, useSlots } from "vue";
|
|
2
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, createElementBlock, normalizeClass, createElementVNode, toDisplayString, renderSlot, createCommentVNode, useSlots, normalizeStyle, unref, Fragment, renderList, createVNode, withCtx } from "vue";
|
|
2
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3
3
|
...{ name: "HlwAd" },
|
|
4
4
|
__name: "index",
|
|
5
5
|
props: {
|
|
@@ -30,114 +30,265 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const _hoisted_1$6 = ["src"];
|
|
34
|
+
const _hoisted_2$6 = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "hlw-avatar__placeholder"
|
|
37
|
+
};
|
|
38
|
+
const _hoisted_3$4 = { class: "hlw-avatar__initial" };
|
|
39
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
40
|
+
__name: "index",
|
|
35
41
|
props: {
|
|
36
|
-
src: {
|
|
37
|
-
name: {
|
|
38
|
-
size: {
|
|
42
|
+
src: {},
|
|
43
|
+
name: {},
|
|
44
|
+
size: {}
|
|
39
45
|
},
|
|
40
|
-
setup(
|
|
46
|
+
setup(__props) {
|
|
47
|
+
const props = __props;
|
|
41
48
|
const loadError = ref(false);
|
|
42
49
|
const initial = computed(() => {
|
|
43
50
|
if (!props.name)
|
|
44
51
|
return "?";
|
|
45
52
|
return props.name.charAt(0).toUpperCase();
|
|
46
53
|
});
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return openBlock(), createElementBlock("view", {
|
|
56
|
+
class: normalizeClass(`hlw-avatar hlw-avatar--${__props.size ?? "medium"}`)
|
|
57
|
+
}, [
|
|
58
|
+
__props.src && !loadError.value ? (openBlock(), createElementBlock("image", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "hlw-avatar__image",
|
|
61
|
+
src: __props.src,
|
|
62
|
+
mode: "aspectFill",
|
|
63
|
+
onError: _cache[0] || (_cache[0] = ($event) => loadError.value = true)
|
|
64
|
+
}, null, 40, _hoisted_1$6)) : (openBlock(), createElementBlock("view", _hoisted_2$6, [
|
|
65
|
+
createElementVNode("text", _hoisted_3$4, toDisplayString(initial.value), 1)
|
|
66
|
+
]))
|
|
67
|
+
], 2);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const _export_sfc = (sfc, props) => {
|
|
72
|
+
const target = sfc.__vccOpts || sfc;
|
|
73
|
+
for (const [key, val] of props) {
|
|
74
|
+
target[key] = val;
|
|
75
|
+
}
|
|
76
|
+
return target;
|
|
77
|
+
};
|
|
78
|
+
const index$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7e8f98a5"]]);
|
|
79
|
+
const _hoisted_1$5 = { class: "hlw-card" };
|
|
80
|
+
const _hoisted_2$5 = {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "hlw-card-header"
|
|
83
|
+
};
|
|
84
|
+
const _hoisted_3$3 = { class: "flex items-center justify-between px-5 py-4 border-0 border-b border-dashed border-slate-200 bg-slate-50/30" };
|
|
85
|
+
const _hoisted_4$2 = { key: 0 };
|
|
86
|
+
const _hoisted_5$1 = { class: "text-sm font-bold text-slate-800 flex items-center gap-2 tracking-wide" };
|
|
87
|
+
const _hoisted_6$1 = { key: 1 };
|
|
88
|
+
const _hoisted_7$1 = {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: "text-[10px] text-slate-400 bg-slate-50 px-2 py-1 rounded border border-slate-100 tracking-wide"
|
|
91
|
+
};
|
|
92
|
+
const _hoisted_8 = { class: "hlw-card-body" };
|
|
93
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
94
|
+
...{
|
|
95
|
+
options: {
|
|
96
|
+
styleIsolation: "shared",
|
|
97
|
+
virtualHost: true
|
|
49
98
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
99
|
+
},
|
|
100
|
+
__name: "index",
|
|
101
|
+
props: {
|
|
102
|
+
title: { default: "" },
|
|
103
|
+
icon: { default: "" },
|
|
104
|
+
iconColor: { default: "" },
|
|
105
|
+
extra: { default: "" }
|
|
106
|
+
},
|
|
107
|
+
setup(__props) {
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return openBlock(), createElementBlock("view", _hoisted_1$5, [
|
|
110
|
+
_ctx.$slots.header || __props.title || __props.icon || _ctx.$slots["header-left"] || _ctx.$slots["header-right"] ? (openBlock(), createElementBlock("view", _hoisted_2$5, [
|
|
111
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
112
|
+
createElementVNode("view", _hoisted_3$3, [
|
|
113
|
+
_ctx.$slots["header-left"] || __props.title || __props.icon ? (openBlock(), createElementBlock("view", _hoisted_4$2, [
|
|
114
|
+
renderSlot(_ctx.$slots, "header-left", {}, () => [
|
|
115
|
+
createElementVNode("view", _hoisted_5$1, [
|
|
116
|
+
__props.icon ? (openBlock(), createElementBlock("text", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: normalizeClass([__props.icon, __props.iconColor])
|
|
119
|
+
}, null, 2)) : createCommentVNode("", true),
|
|
120
|
+
createElementVNode("text", null, toDisplayString(__props.title), 1)
|
|
121
|
+
])
|
|
122
|
+
], true)
|
|
123
|
+
])) : createCommentVNode("", true),
|
|
124
|
+
_ctx.$slots["header-right"] || __props.extra ? (openBlock(), createElementBlock("view", _hoisted_6$1, [
|
|
125
|
+
renderSlot(_ctx.$slots, "header-right", {}, () => [
|
|
126
|
+
__props.extra ? (openBlock(), createElementBlock("text", _hoisted_7$1, toDisplayString(__props.extra), 1)) : createCommentVNode("", true)
|
|
127
|
+
], true)
|
|
128
|
+
])) : createCommentVNode("", true)
|
|
68
129
|
])
|
|
69
|
-
)
|
|
130
|
+
], true)
|
|
131
|
+
])) : createCommentVNode("", true),
|
|
132
|
+
createElementVNode("view", _hoisted_8, [
|
|
133
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
70
134
|
])
|
|
71
|
-
);
|
|
135
|
+
]);
|
|
72
136
|
};
|
|
73
137
|
}
|
|
74
138
|
});
|
|
75
|
-
const index$
|
|
76
|
-
|
|
139
|
+
const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-787fc3a7"]]);
|
|
140
|
+
const _hoisted_1$4 = { class: "hlw-empty" };
|
|
141
|
+
const _hoisted_2$4 = ["src"];
|
|
142
|
+
const _hoisted_3$2 = {
|
|
143
|
+
key: 1,
|
|
144
|
+
class: "hlw-empty__icon"
|
|
145
|
+
};
|
|
146
|
+
const _hoisted_4$1 = { class: "hlw-empty__text" };
|
|
147
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
148
|
+
__name: "index",
|
|
77
149
|
props: {
|
|
78
|
-
text: {
|
|
79
|
-
image: {
|
|
150
|
+
text: {},
|
|
151
|
+
image: {}
|
|
80
152
|
},
|
|
81
|
-
setup(
|
|
82
|
-
|
|
83
|
-
|
|
153
|
+
setup(__props) {
|
|
154
|
+
return (_ctx, _cache) => {
|
|
155
|
+
return openBlock(), createElementBlock("view", _hoisted_1$4, [
|
|
156
|
+
__props.image ? (openBlock(), createElementBlock("image", {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: "hlw-empty__image",
|
|
159
|
+
src: __props.image,
|
|
160
|
+
mode: "aspectFit"
|
|
161
|
+
}, null, 8, _hoisted_2$4)) : (openBlock(), createElementBlock("text", _hoisted_3$2, "📦")),
|
|
162
|
+
createElementVNode("text", _hoisted_4$1, toDisplayString(__props.text || "暂无数据"), 1),
|
|
163
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
164
|
+
]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-72364322"]]);
|
|
169
|
+
const _hoisted_1$3 = { class: "header-title" };
|
|
170
|
+
const _hoisted_2$3 = {
|
|
171
|
+
key: 0,
|
|
172
|
+
class: "header-title"
|
|
173
|
+
};
|
|
174
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
175
|
+
__name: "index",
|
|
176
|
+
props: {
|
|
177
|
+
extraHeight: { default: 0 },
|
|
178
|
+
bgClass: { default: "" },
|
|
179
|
+
isBack: { type: Boolean, default: false },
|
|
180
|
+
title: { default: "" }
|
|
181
|
+
},
|
|
182
|
+
emits: ["back"],
|
|
183
|
+
setup(__props, { emit: __emit }) {
|
|
184
|
+
const getNavBarContentHeight = () => {
|
|
84
185
|
var _a;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
186
|
+
try {
|
|
187
|
+
const menuInfo = (_a = uni.getMenuButtonBoundingClientRect) == null ? void 0 : _a.call(uni);
|
|
188
|
+
if (!menuInfo)
|
|
189
|
+
return 44;
|
|
190
|
+
const systemInfo = uni.getSystemInfoSync();
|
|
191
|
+
return (menuInfo.top - systemInfo.statusBarHeight) * 2 + menuInfo.height;
|
|
192
|
+
} catch {
|
|
193
|
+
return 44;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const getStatusBarHeight = () => {
|
|
197
|
+
try {
|
|
198
|
+
const systemInfo = uni.getSystemInfoSync();
|
|
199
|
+
return systemInfo.statusBarHeight || 20;
|
|
200
|
+
} catch {
|
|
201
|
+
return 20;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const NAV_BAR_CONTENT_HEIGHT = getNavBarContentHeight();
|
|
205
|
+
const props = __props;
|
|
206
|
+
const emit = __emit;
|
|
207
|
+
const handleBack = () => {
|
|
208
|
+
emit("back");
|
|
209
|
+
uni.navigateBack({ delta: 1 });
|
|
210
|
+
};
|
|
211
|
+
const slots = useSlots();
|
|
212
|
+
const hasBgSlot = computed(() => !props.isBack && !!slots.bg);
|
|
213
|
+
const statusBarHeight = ref(getStatusBarHeight());
|
|
214
|
+
const totalNavBarHeight = computed(() => statusBarHeight.value + NAV_BAR_CONTENT_HEIGHT + props.extraHeight);
|
|
215
|
+
return (_ctx, _cache) => {
|
|
216
|
+
return openBlock(), createElementBlock("view", {
|
|
217
|
+
class: "hlw-header",
|
|
218
|
+
style: normalizeStyle({ height: totalNavBarHeight.value + "px" })
|
|
219
|
+
}, [
|
|
220
|
+
createElementVNode("view", {
|
|
221
|
+
class: normalizeClass(["header-bg-layer", hasBgSlot.value ? "" : props.bgClass])
|
|
222
|
+
}, [
|
|
223
|
+
!props.isBack ? renderSlot(_ctx.$slots, "bg", { key: 0 }, void 0, true) : createCommentVNode("", true)
|
|
224
|
+
], 2),
|
|
225
|
+
createElementVNode("view", {
|
|
226
|
+
class: "status-bar-spacer",
|
|
227
|
+
style: normalizeStyle({ height: statusBarHeight.value + "px" })
|
|
228
|
+
}, null, 4),
|
|
229
|
+
createElementVNode("view", {
|
|
230
|
+
class: "header-content-area",
|
|
231
|
+
style: normalizeStyle({ height: unref(NAV_BAR_CONTENT_HEIGHT) + "px" })
|
|
232
|
+
}, [
|
|
233
|
+
props.isBack ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
234
|
+
createElementVNode("view", {
|
|
235
|
+
class: "header-back",
|
|
236
|
+
onClick: handleBack
|
|
237
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
238
|
+
createElementVNode("text", { class: "iconfont icon-back" }, null, -1)
|
|
239
|
+
])]),
|
|
240
|
+
createElementVNode("view", _hoisted_1$3, toDisplayString(props.title), 1),
|
|
241
|
+
_cache[1] || (_cache[1] = createElementVNode("view", { class: "header-placeholder" }, null, -1))
|
|
242
|
+
], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
|
|
243
|
+
props.title ? (openBlock(), createElementBlock("view", _hoisted_2$3, toDisplayString(props.title), 1)) : createCommentVNode("", true)
|
|
244
|
+
], true)
|
|
245
|
+
], 4)
|
|
246
|
+
], 4);
|
|
103
247
|
};
|
|
104
248
|
}
|
|
105
249
|
});
|
|
106
|
-
const index$
|
|
107
|
-
|
|
250
|
+
const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e6af34e4"]]);
|
|
251
|
+
const _hoisted_1$2 = { class: "hlw-loading" };
|
|
252
|
+
const _hoisted_2$2 = {
|
|
253
|
+
key: 0,
|
|
254
|
+
class: "hlw-loading__text"
|
|
255
|
+
};
|
|
256
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
257
|
+
__name: "index",
|
|
108
258
|
props: {
|
|
109
|
-
text: {
|
|
259
|
+
text: {}
|
|
110
260
|
},
|
|
111
|
-
setup(
|
|
112
|
-
return () => {
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
(
|
|
116
|
-
|
|
117
|
-
h("view", { key: i + 1, class: "hlw-loading__dot" })
|
|
118
|
-
)
|
|
119
|
-
);
|
|
120
|
-
return (
|
|
121
|
-
// @ts-ignore
|
|
122
|
-
h("view", { class: "hlw-loading" }, [
|
|
123
|
-
// @ts-ignore
|
|
124
|
-
h("view", { class: "hlw-loading__spinner" }, dots),
|
|
125
|
-
props.text ? (
|
|
126
|
-
// @ts-ignore
|
|
127
|
-
h("text", { class: "hlw-loading__text" }, props.text)
|
|
128
|
-
) : null
|
|
129
|
-
])
|
|
130
|
-
);
|
|
261
|
+
setup(__props) {
|
|
262
|
+
return (_ctx, _cache) => {
|
|
263
|
+
return openBlock(), createElementBlock("view", _hoisted_1$2, [
|
|
264
|
+
_cache[0] || (_cache[0] = createElementVNode("view", { class: "hlw-loading__spinner" }, null, -1)),
|
|
265
|
+
__props.text ? (openBlock(), createElementBlock("text", _hoisted_2$2, toDisplayString(__props.text), 1)) : createCommentVNode("", true)
|
|
266
|
+
]);
|
|
131
267
|
};
|
|
132
268
|
}
|
|
133
269
|
});
|
|
134
|
-
const index =
|
|
135
|
-
|
|
270
|
+
const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-14242381"]]);
|
|
271
|
+
const _hoisted_1$1 = { class: "hlw-menu-list" };
|
|
272
|
+
const _hoisted_2$1 = ["onTap"];
|
|
273
|
+
const _hoisted_3$1 = { class: "hlw-menu-list__left" };
|
|
274
|
+
const _hoisted_4 = {
|
|
275
|
+
key: 0,
|
|
276
|
+
class: "hlw-menu-list__icon"
|
|
277
|
+
};
|
|
278
|
+
const _hoisted_5 = { class: "hlw-menu-list__label" };
|
|
279
|
+
const _hoisted_6 = { class: "hlw-menu-list__right" };
|
|
280
|
+
const _hoisted_7 = {
|
|
281
|
+
key: 0,
|
|
282
|
+
class: "hlw-menu-list__value"
|
|
283
|
+
};
|
|
284
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
285
|
+
__name: "index",
|
|
136
286
|
props: {
|
|
137
|
-
items: {
|
|
287
|
+
items: {}
|
|
138
288
|
},
|
|
139
289
|
emits: ["click"],
|
|
140
|
-
setup(
|
|
290
|
+
setup(__props, { emit: __emit }) {
|
|
291
|
+
const emit = __emit;
|
|
141
292
|
function onTap(item) {
|
|
142
293
|
if (item.url) {
|
|
143
294
|
uni.navigateTo({ url: item.url });
|
|
@@ -146,44 +297,81 @@ const index = defineComponent({
|
|
|
146
297
|
}
|
|
147
298
|
emit("click", item);
|
|
148
299
|
}
|
|
149
|
-
return () => {
|
|
150
|
-
|
|
151
|
-
(item) =>
|
|
152
|
-
|
|
153
|
-
h("view", {
|
|
154
|
-
class: "hlw-menu-list__item",
|
|
300
|
+
return (_ctx, _cache) => {
|
|
301
|
+
return openBlock(), createElementBlock("view", _hoisted_1$1, [
|
|
302
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
303
|
+
return openBlock(), createElementBlock("view", {
|
|
155
304
|
key: item.key,
|
|
156
|
-
|
|
305
|
+
class: "hlw-menu-list__item",
|
|
306
|
+
onTap: ($event) => onTap(item)
|
|
157
307
|
}, [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
item.
|
|
161
|
-
// @ts-ignore
|
|
162
|
-
h("text", { class: "hlw-menu-list__icon" }, item.icon)
|
|
163
|
-
) : null,
|
|
164
|
-
// @ts-ignore
|
|
165
|
-
h("text", { class: "hlw-menu-list__label" }, item.label)
|
|
308
|
+
createElementVNode("view", _hoisted_3$1, [
|
|
309
|
+
item.icon ? (openBlock(), createElementBlock("text", _hoisted_4, toDisplayString(item.icon), 1)) : createCommentVNode("", true),
|
|
310
|
+
createElementVNode("text", _hoisted_5, toDisplayString(item.label), 1)
|
|
166
311
|
]),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
// @ts-ignore
|
|
171
|
-
h("text", { class: "hlw-menu-list__value" }, item.value)
|
|
172
|
-
) : null,
|
|
173
|
-
// @ts-ignore
|
|
174
|
-
h("text", { class: "hlw-menu-list__arrow" }, "›")
|
|
312
|
+
createElementVNode("view", _hoisted_6, [
|
|
313
|
+
item.value ? (openBlock(), createElementBlock("text", _hoisted_7, toDisplayString(item.value), 1)) : createCommentVNode("", true),
|
|
314
|
+
_cache[0] || (_cache[0] = createElementVNode("text", { class: "hlw-menu-list__arrow" }, "›", -1))
|
|
175
315
|
])
|
|
176
|
-
])
|
|
177
|
-
)
|
|
178
|
-
);
|
|
179
|
-
|
|
316
|
+
], 40, _hoisted_2$1);
|
|
317
|
+
}), 128))
|
|
318
|
+
]);
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e465b0b4"]]);
|
|
323
|
+
const _hoisted_1 = { class: "hlw-page" };
|
|
324
|
+
const _hoisted_2 = { class: "hlw-page-header" };
|
|
325
|
+
const _hoisted_3 = { class: "hlw-page-footer" };
|
|
326
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
327
|
+
__name: "index",
|
|
328
|
+
props: {
|
|
329
|
+
title: { default: "" },
|
|
330
|
+
isBack: { type: Boolean, default: false },
|
|
331
|
+
bgClass: { default: "" }
|
|
332
|
+
},
|
|
333
|
+
setup(__props) {
|
|
334
|
+
return (_ctx, _cache) => {
|
|
335
|
+
const _component_hlw_header = resolveComponent("hlw-header");
|
|
336
|
+
const _component_scroll_view = resolveComponent("scroll-view");
|
|
337
|
+
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
338
|
+
createElementVNode("view", _hoisted_2, [
|
|
339
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
340
|
+
__props.title || __props.isBack ? (openBlock(), createBlock(_component_hlw_header, {
|
|
341
|
+
key: 0,
|
|
342
|
+
title: __props.title,
|
|
343
|
+
"is-back": __props.isBack,
|
|
344
|
+
"bg-class": __props.bgClass
|
|
345
|
+
}, null, 8, ["title", "is-back", "bg-class"])) : createCommentVNode("", true)
|
|
346
|
+
], true)
|
|
347
|
+
]),
|
|
348
|
+
createVNode(_component_scroll_view, {
|
|
349
|
+
class: "hlw-page-content",
|
|
350
|
+
"scroll-y": true,
|
|
351
|
+
"enable-flex": true,
|
|
352
|
+
enhanced: true,
|
|
353
|
+
"show-scrollbar": true
|
|
354
|
+
}, {
|
|
355
|
+
default: withCtx(() => [
|
|
356
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
357
|
+
]),
|
|
358
|
+
_: 3
|
|
359
|
+
}),
|
|
360
|
+
createElementVNode("view", _hoisted_3, [
|
|
361
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
362
|
+
])
|
|
363
|
+
]);
|
|
180
364
|
};
|
|
181
365
|
}
|
|
182
366
|
});
|
|
367
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-155bc02a"]]);
|
|
183
368
|
export {
|
|
184
|
-
_sfc_main as HlwAd,
|
|
185
|
-
index$
|
|
186
|
-
index$
|
|
187
|
-
index$
|
|
188
|
-
index as
|
|
369
|
+
_sfc_main$7 as HlwAd,
|
|
370
|
+
index$6 as HlwAvatar,
|
|
371
|
+
index$5 as HlwCard,
|
|
372
|
+
index$4 as HlwEmpty,
|
|
373
|
+
index$3 as HlwHeader,
|
|
374
|
+
index$2 as HlwLoading,
|
|
375
|
+
index$1 as HlwMenuList,
|
|
376
|
+
index as HlwPage
|
|
189
377
|
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
|
|
2
|
+
.hlw-avatar[data-v-7e8f98a5] {
|
|
3
|
+
border-radius: 50%;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
}
|
|
7
|
+
.hlw-avatar--small[data-v-7e8f98a5] { width: 56rpx; height: 56rpx;
|
|
8
|
+
}
|
|
9
|
+
.hlw-avatar--medium[data-v-7e8f98a5] { width: 80rpx; height: 80rpx;
|
|
10
|
+
}
|
|
11
|
+
.hlw-avatar--large[data-v-7e8f98a5] { width: 120rpx; height: 120rpx;
|
|
12
|
+
}
|
|
13
|
+
.hlw-avatar__image[data-v-7e8f98a5] {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
.hlw-avatar__placeholder[data-v-7e8f98a5] {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
background: #07c160;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
25
|
+
.hlw-avatar__initial[data-v-7e8f98a5] {
|
|
26
|
+
color: #fff;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
}
|
|
29
|
+
.hlw-avatar--small .hlw-avatar__initial[data-v-7e8f98a5] { font-size: 22rpx;
|
|
30
|
+
}
|
|
31
|
+
.hlw-avatar--medium .hlw-avatar__initial[data-v-7e8f98a5] { font-size: 30rpx;
|
|
32
|
+
}
|
|
33
|
+
.hlw-avatar--large .hlw-avatar__initial[data-v-7e8f98a5] { font-size: 46rpx;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.hlw-card[data-v-787fc3a7] {
|
|
37
|
+
@apply bg-white rounded-xl border border-solid border-slate-200 overflow-hidden w-full;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.hlw-empty[data-v-72364322] {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
padding: 80rpx 40rpx;
|
|
46
|
+
}
|
|
47
|
+
.hlw-empty__image[data-v-72364322] {
|
|
48
|
+
width: 200rpx;
|
|
49
|
+
height: 200rpx;
|
|
50
|
+
margin-bottom: 24rpx;
|
|
51
|
+
}
|
|
52
|
+
.hlw-empty__icon[data-v-72364322] {
|
|
53
|
+
font-size: 100rpx;
|
|
54
|
+
margin-bottom: 20rpx;
|
|
55
|
+
}
|
|
56
|
+
.hlw-empty__text[data-v-72364322] {
|
|
57
|
+
font-size: 28rpx;
|
|
58
|
+
color: #bbb;
|
|
59
|
+
}
|
|
60
|
+
.hlw-header[data-v-e6af34e4] {
|
|
61
|
+
position: sticky;
|
|
62
|
+
top: 0;
|
|
63
|
+
z-index: 999;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
}
|
|
68
|
+
.header-bg-layer[data-v-e6af34e4] {
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
z-index: 0;
|
|
75
|
+
}
|
|
76
|
+
.status-bar-spacer[data-v-e6af34e4] {
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
width: 100%;
|
|
79
|
+
position: relative;
|
|
80
|
+
z-index: 1;
|
|
81
|
+
}
|
|
82
|
+
.header-content-area[data-v-e6af34e4] {
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
position: relative;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
}
|
|
90
|
+
.header-back[data-v-e6af34e4] {
|
|
91
|
+
width: 88rpx;
|
|
92
|
+
height: 100%;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
.header-back .iconfont[data-v-e6af34e4] {
|
|
99
|
+
font-size: 40rpx;
|
|
100
|
+
}
|
|
101
|
+
.header-title[data-v-e6af34e4] {
|
|
102
|
+
flex: 1;
|
|
103
|
+
text-align: center;
|
|
104
|
+
font-size: 28rpx;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
text-overflow: ellipsis;
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
}
|
|
110
|
+
.header-placeholder[data-v-e6af34e4] {
|
|
111
|
+
width: 88rpx;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
}
|
|
114
|
+
.hlw-loading[data-v-14242381] {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
padding: 24rpx;
|
|
120
|
+
}
|
|
121
|
+
.hlw-loading__spinner[data-v-14242381] {
|
|
122
|
+
width: 56rpx;
|
|
123
|
+
height: 56rpx;
|
|
124
|
+
border: 6rpx solid #e8e8e8;
|
|
125
|
+
border-top-color: #07c160;
|
|
126
|
+
border-radius: 50%;
|
|
127
|
+
animation: hlw-spin-14242381 0.8s linear infinite;
|
|
128
|
+
}
|
|
129
|
+
@keyframes hlw-spin-14242381 {
|
|
130
|
+
to { transform: rotate(360deg);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.hlw-loading__text[data-v-14242381] {
|
|
134
|
+
margin-top: 16rpx;
|
|
135
|
+
font-size: 26rpx;
|
|
136
|
+
color: #999;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.hlw-menu-list[data-v-e465b0b4] {
|
|
140
|
+
background: #fff;
|
|
141
|
+
border-radius: 16rpx;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
.hlw-menu-list__item[data-v-e465b0b4] {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
padding: 28rpx 32rpx;
|
|
149
|
+
border-bottom: 1rpx solid #f5f5f5;
|
|
150
|
+
}
|
|
151
|
+
.hlw-menu-list__item[data-v-e465b0b4]:last-child {
|
|
152
|
+
border-bottom: none;
|
|
153
|
+
}
|
|
154
|
+
.hlw-menu-list__left[data-v-e465b0b4] {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 16rpx;
|
|
158
|
+
}
|
|
159
|
+
.hlw-menu-list__icon[data-v-e465b0b4] {
|
|
160
|
+
font-size: 36rpx;
|
|
161
|
+
width: 44rpx;
|
|
162
|
+
text-align: center;
|
|
163
|
+
}
|
|
164
|
+
.hlw-menu-list__label[data-v-e465b0b4] {
|
|
165
|
+
font-size: 30rpx;
|
|
166
|
+
color: #333;
|
|
167
|
+
}
|
|
168
|
+
.hlw-menu-list__right[data-v-e465b0b4] {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 8rpx;
|
|
172
|
+
}
|
|
173
|
+
.hlw-menu-list__value[data-v-e465b0b4] {
|
|
174
|
+
font-size: 28rpx;
|
|
175
|
+
color: #999;
|
|
176
|
+
}
|
|
177
|
+
.hlw-menu-list__arrow[data-v-e465b0b4] {
|
|
178
|
+
font-size: 36rpx;
|
|
179
|
+
color: #ccc;
|
|
180
|
+
line-height: 1;
|
|
181
|
+
}
|
|
182
|
+
.hlw-page[data-v-155bc02a] {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100vh;
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-direction: column;
|
|
187
|
+
overflow: hidden;
|
|
188
|
+
}
|
|
189
|
+
.hlw-page-header[data-v-155bc02a] {
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
}
|
|
192
|
+
.hlw-page-content[data-v-155bc02a] {
|
|
193
|
+
flex: 1;
|
|
194
|
+
height: 0;
|
|
195
|
+
width: 100%;
|
|
196
|
+
}
|
|
197
|
+
.hlw-page-footer[data-v-155bc02a] {
|
|
198
|
+
flex-shrink: 0;
|
|
199
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hlw-uni/mp-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "hlw-uni Vue 组件库 — 供小程序业务方使用的 UI 组件集合",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"import": "./dist/index.mjs",
|
|
11
11
|
"require": "./dist/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts"
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
"./src/*": "./src/*",
|
|
15
|
+
"./*.vue": "./*.vue"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
18
|
"dist",
|