@hlw-uni/mp-core 1.0.1 → 1.0.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.
@@ -0,0 +1,7 @@
1
+ export interface AvatarProps {
2
+ src?: string;
3
+ name?: string;
4
+ size?: 'small' | 'medium' | 'large';
5
+ }
6
+ declare const _default: any;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export interface MenuItem {
2
+ key: string;
3
+ label: string;
4
+ icon?: string;
5
+ value?: string;
6
+ url?: string;
7
+ action?: () => void;
8
+ }
9
+ declare const _default: any;
10
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  export * from './composables';
5
5
  export { useApp, setupDefaultInterceptors } from './app';
6
6
  export { hlw, type HlwInstance } from './hlw';
7
- export { default as Avatar } from './components/Avatar.vue';
8
- export { default as Empty } from './components/Empty.vue';
9
- export { default as Loading } from './components/Loading.vue';
10
- export { default as MenuList, type MenuItem } from './components/MenuList.vue';
7
+ export { default as Avatar } from './components/Avatar';
8
+ export { default as Empty } from './components/Empty';
9
+ export { default as Loading } from './components/Loading';
10
+ export { default as MenuList, type MenuItem } from './components/MenuList';
package/dist/index.js CHANGED
@@ -903,21 +903,14 @@ var __publicField = (obj, key, value) => {
903
903
  }
904
904
  });
905
905
  }
906
- const _hoisted_1$3 = ["src"];
907
- const _hoisted_2$3 = {
908
- key: 1,
909
- class: "hlw-avatar__placeholder"
910
- };
911
- const _hoisted_3$3 = { class: "hlw-avatar__initial" };
912
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
913
- __name: "Avatar",
906
+ const Avatar = vue.defineComponent({
907
+ name: "Avatar",
914
908
  props: {
915
- src: {},
916
- name: {},
917
- size: {}
909
+ src: { type: String },
910
+ name: { type: String },
911
+ size: { type: String, default: "medium" }
918
912
  },
919
- setup(__props) {
920
- const props = __props;
913
+ setup(props) {
921
914
  const loadError = vue.ref(false);
922
915
  const initial = vue.computed(() => {
923
916
  if (!props.name)
@@ -927,111 +920,97 @@ var __publicField = (obj, key, value) => {
927
920
  function onError() {
928
921
  loadError.value = true;
929
922
  }
930
- return (_ctx, _cache) => {
931
- return vue.openBlock(), vue.createElementBlock("view", {
932
- class: vue.normalizeClass(["hlw-avatar", [`hlw-avatar--${__props.size}`]])
933
- }, [
934
- __props.src && !loadError.value ? (vue.openBlock(), vue.createElementBlock("image", {
935
- key: 0,
936
- class: "hlw-avatar__image",
937
- src: __props.src,
938
- mode: "aspectFill",
939
- onError
940
- }, null, 40, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$3, [
941
- vue.createElementVNode("text", _hoisted_3$3, vue.toDisplayString(initial.value), 1)
942
- ]))
943
- ], 2);
923
+ return () => {
924
+ const sizeClass = `hlw-avatar--${props.size}`;
925
+ return (
926
+ // @ts-ignore - uni app nodes
927
+ h("view", { class: `hlw-avatar ${sizeClass}` }, [
928
+ props.src && !loadError.value ? (
929
+ // @ts-ignore
930
+ h("image", {
931
+ class: "hlw-avatar__image",
932
+ src: props.src,
933
+ mode: "aspectFill",
934
+ onError
935
+ })
936
+ ) : (
937
+ // @ts-ignore
938
+ h("view", { class: "hlw-avatar__placeholder" }, [
939
+ // @ts-ignore
940
+ h("text", { class: "hlw-avatar__initial" }, initial.value)
941
+ ])
942
+ )
943
+ ])
944
+ );
944
945
  };
945
946
  }
946
947
  });
947
- const _export_sfc = (sfc, props) => {
948
- const target = sfc.__vccOpts || sfc;
949
- for (const [key, val] of props) {
950
- target[key] = val;
951
- }
952
- return target;
953
- };
954
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87dd25f7"]]);
955
- const _hoisted_1$2 = { class: "hlw-empty" };
956
- const _hoisted_2$2 = ["src"];
957
- const _hoisted_3$2 = {
958
- key: 1,
959
- class: "hlw-empty__icon"
960
- };
961
- const _hoisted_4$1 = { class: "hlw-empty__text" };
962
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
963
- __name: "Empty",
948
+ const Empty = vue.defineComponent({
949
+ name: "Empty",
964
950
  props: {
965
- text: {},
966
- image: {}
951
+ text: { type: String },
952
+ image: { type: String }
967
953
  },
968
- setup(__props) {
969
- return (_ctx, _cache) => {
970
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
971
- __props.image ? (vue.openBlock(), vue.createElementBlock("image", {
972
- key: 0,
973
- class: "hlw-empty__image",
974
- src: __props.image,
975
- mode: "aspectFit"
976
- }, null, 8, _hoisted_2$2)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$2, [..._cache[0] || (_cache[0] = [
977
- vue.createElementVNode("text", null, "📦", -1)
978
- ])])),
979
- vue.createElementVNode("text", _hoisted_4$1, vue.toDisplayString(__props.text || "暂无数据"), 1),
980
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
981
- ]);
954
+ setup(props) {
955
+ const slots = vue.useSlots();
956
+ return () => {
957
+ var _a;
958
+ return (
959
+ // @ts-ignore
960
+ h("view", { class: "hlw-empty" }, [
961
+ props.image ? (
962
+ // @ts-ignore
963
+ h("image", { class: "hlw-empty__image", src: props.image, mode: "aspectFit" })
964
+ ) : (
965
+ // @ts-ignore
966
+ h("view", { class: "hlw-empty__icon" }, [
967
+ // @ts-ignore
968
+ h("text", "📦")
969
+ ])
970
+ ),
971
+ // @ts-ignore
972
+ h("text", { class: "hlw-empty__text" }, props.text || "暂无数据"),
973
+ (_a = slots.default) == null ? void 0 : _a.call(slots)
974
+ ])
975
+ );
982
976
  };
983
977
  }
984
978
  });
985
- const Empty = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d78ade08"]]);
986
- const _hoisted_1$1 = { class: "hlw-loading" };
987
- const _hoisted_2$1 = { class: "hlw-loading__spinner" };
988
- const _hoisted_3$1 = {
989
- key: 0,
990
- class: "hlw-loading__text"
991
- };
992
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
993
- __name: "Loading",
979
+ const Loading = vue.defineComponent({
980
+ name: "Loading",
994
981
  props: {
995
- text: {}
982
+ text: { type: String }
996
983
  },
997
- setup(__props) {
998
- return (_ctx, _cache) => {
999
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
1000
- vue.createElementVNode("view", _hoisted_2$1, [
1001
- (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(12, (i) => {
1002
- return vue.createElementVNode("view", {
1003
- key: i,
1004
- class: "hlw-loading__dot"
1005
- });
1006
- }), 64))
1007
- ]),
1008
- __props.text ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$1, vue.toDisplayString(__props.text), 1)) : vue.createCommentVNode("", true)
1009
- ]);
984
+ setup(props) {
985
+ return () => {
986
+ const dots = Array.from(
987
+ { length: 12 },
988
+ (_, i) => (
989
+ // @ts-ignore
990
+ h("view", { key: i + 1, class: "hlw-loading__dot" })
991
+ )
992
+ );
993
+ return (
994
+ // @ts-ignore
995
+ h("view", { class: "hlw-loading" }, [
996
+ // @ts-ignore
997
+ h("view", { class: "hlw-loading__spinner" }, dots),
998
+ props.text ? (
999
+ // @ts-ignore
1000
+ h("text", { class: "hlw-loading__text" }, props.text)
1001
+ ) : null
1002
+ ])
1003
+ );
1010
1004
  };
1011
1005
  }
1012
1006
  });
1013
- const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6bf3a5a2"]]);
1014
- const _hoisted_1 = { class: "hlw-menu-list" };
1015
- const _hoisted_2 = ["onTap"];
1016
- const _hoisted_3 = { class: "hlw-menu-list__left" };
1017
- const _hoisted_4 = {
1018
- key: 0,
1019
- class: "hlw-menu-list__icon"
1020
- };
1021
- const _hoisted_5 = { class: "hlw-menu-list__label" };
1022
- const _hoisted_6 = { class: "hlw-menu-list__right" };
1023
- const _hoisted_7 = {
1024
- key: 0,
1025
- class: "hlw-menu-list__value"
1026
- };
1027
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
1028
- __name: "MenuList",
1007
+ const MenuList = vue.defineComponent({
1008
+ name: "MenuList",
1029
1009
  props: {
1030
- items: {}
1010
+ items: { type: Array, required: true }
1031
1011
  },
1032
1012
  emits: ["click"],
1033
- setup(__props, { emit: __emit }) {
1034
- const emit = __emit;
1013
+ setup(props, { emit }) {
1035
1014
  function onTap(item) {
1036
1015
  if (item.url) {
1037
1016
  uni.navigateTo({ url: item.url });
@@ -1040,29 +1019,40 @@ var __publicField = (obj, key, value) => {
1040
1019
  }
1041
1020
  emit("click", item);
1042
1021
  }
1043
- return (_ctx, _cache) => {
1044
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1, [
1045
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item) => {
1046
- return vue.openBlock(), vue.createElementBlock("view", {
1047
- key: item.key,
1022
+ return () => {
1023
+ const items = props.items.map(
1024
+ (item) => (
1025
+ // @ts-ignore
1026
+ h("view", {
1048
1027
  class: "hlw-menu-list__item",
1049
- onTap: ($event) => onTap(item)
1028
+ key: item.key,
1029
+ onClick: () => onTap(item)
1050
1030
  }, [
1051
- vue.createElementVNode("view", _hoisted_3, [
1052
- item.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_4, vue.toDisplayString(item.icon), 1)) : vue.createCommentVNode("", true),
1053
- vue.createElementVNode("text", _hoisted_5, vue.toDisplayString(item.label), 1)
1031
+ // @ts-ignore
1032
+ h("view", { class: "hlw-menu-list__left" }, [
1033
+ item.icon ? (
1034
+ // @ts-ignore
1035
+ h("text", { class: "hlw-menu-list__icon" }, item.icon)
1036
+ ) : null,
1037
+ // @ts-ignore
1038
+ h("text", { class: "hlw-menu-list__label" }, item.label)
1054
1039
  ]),
1055
- vue.createElementVNode("view", _hoisted_6, [
1056
- item.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_7, vue.toDisplayString(item.value), 1)) : vue.createCommentVNode("", true),
1057
- _cache[0] || (_cache[0] = vue.createElementVNode("text", { class: "hlw-menu-list__arrow" }, "›", -1))
1040
+ // @ts-ignore
1041
+ h("view", { class: "hlw-menu-list__right" }, [
1042
+ item.value ? (
1043
+ // @ts-ignore
1044
+ h("text", { class: "hlw-menu-list__value" }, item.value)
1045
+ ) : null,
1046
+ // @ts-ignore
1047
+ h("text", { class: "hlw-menu-list__arrow" }, "›")
1058
1048
  ])
1059
- ], 40, _hoisted_2);
1060
- }), 128))
1061
- ]);
1049
+ ])
1050
+ )
1051
+ );
1052
+ return h("view", { class: "hlw-menu-list" }, items);
1062
1053
  };
1063
1054
  }
1064
1055
  });
1065
- const MenuList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1dfe912b"]]);
1066
1056
  exports2.Avatar = Avatar;
1067
1057
  exports2.Empty = Empty;
1068
1058
  exports2.HttpClient = HttpClient;
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { ref, onBeforeUpdate, createSSRApp, defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
7
+ import { ref, onBeforeUpdate, createSSRApp, defineComponent, computed, useSlots } from "vue";
8
8
  const cosAdapter = {
9
9
  name: "cos",
10
10
  buildFormData(ctx) {
@@ -900,21 +900,14 @@ function setupDefaultInterceptors(options = {}) {
900
900
  }
901
901
  });
902
902
  }
903
- const _hoisted_1$3 = ["src"];
904
- const _hoisted_2$3 = {
905
- key: 1,
906
- class: "hlw-avatar__placeholder"
907
- };
908
- const _hoisted_3$3 = { class: "hlw-avatar__initial" };
909
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
910
- __name: "Avatar",
903
+ const Avatar = defineComponent({
904
+ name: "Avatar",
911
905
  props: {
912
- src: {},
913
- name: {},
914
- size: {}
906
+ src: { type: String },
907
+ name: { type: String },
908
+ size: { type: String, default: "medium" }
915
909
  },
916
- setup(__props) {
917
- const props = __props;
910
+ setup(props) {
918
911
  const loadError = ref(false);
919
912
  const initial = computed(() => {
920
913
  if (!props.name)
@@ -924,111 +917,97 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
924
917
  function onError() {
925
918
  loadError.value = true;
926
919
  }
927
- return (_ctx, _cache) => {
928
- return openBlock(), createElementBlock("view", {
929
- class: normalizeClass(["hlw-avatar", [`hlw-avatar--${__props.size}`]])
930
- }, [
931
- __props.src && !loadError.value ? (openBlock(), createElementBlock("image", {
932
- key: 0,
933
- class: "hlw-avatar__image",
934
- src: __props.src,
935
- mode: "aspectFill",
936
- onError
937
- }, null, 40, _hoisted_1$3)) : (openBlock(), createElementBlock("view", _hoisted_2$3, [
938
- createElementVNode("text", _hoisted_3$3, toDisplayString(initial.value), 1)
939
- ]))
940
- ], 2);
920
+ return () => {
921
+ const sizeClass = `hlw-avatar--${props.size}`;
922
+ return (
923
+ // @ts-ignore - uni app nodes
924
+ h("view", { class: `hlw-avatar ${sizeClass}` }, [
925
+ props.src && !loadError.value ? (
926
+ // @ts-ignore
927
+ h("image", {
928
+ class: "hlw-avatar__image",
929
+ src: props.src,
930
+ mode: "aspectFill",
931
+ onError
932
+ })
933
+ ) : (
934
+ // @ts-ignore
935
+ h("view", { class: "hlw-avatar__placeholder" }, [
936
+ // @ts-ignore
937
+ h("text", { class: "hlw-avatar__initial" }, initial.value)
938
+ ])
939
+ )
940
+ ])
941
+ );
941
942
  };
942
943
  }
943
944
  });
944
- const _export_sfc = (sfc, props) => {
945
- const target = sfc.__vccOpts || sfc;
946
- for (const [key, val] of props) {
947
- target[key] = val;
948
- }
949
- return target;
950
- };
951
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-87dd25f7"]]);
952
- const _hoisted_1$2 = { class: "hlw-empty" };
953
- const _hoisted_2$2 = ["src"];
954
- const _hoisted_3$2 = {
955
- key: 1,
956
- class: "hlw-empty__icon"
957
- };
958
- const _hoisted_4$1 = { class: "hlw-empty__text" };
959
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
960
- __name: "Empty",
945
+ const Empty = defineComponent({
946
+ name: "Empty",
961
947
  props: {
962
- text: {},
963
- image: {}
948
+ text: { type: String },
949
+ image: { type: String }
964
950
  },
965
- setup(__props) {
966
- return (_ctx, _cache) => {
967
- return openBlock(), createElementBlock("view", _hoisted_1$2, [
968
- __props.image ? (openBlock(), createElementBlock("image", {
969
- key: 0,
970
- class: "hlw-empty__image",
971
- src: __props.image,
972
- mode: "aspectFit"
973
- }, null, 8, _hoisted_2$2)) : (openBlock(), createElementBlock("view", _hoisted_3$2, [..._cache[0] || (_cache[0] = [
974
- createElementVNode("text", null, "📦", -1)
975
- ])])),
976
- createElementVNode("text", _hoisted_4$1, toDisplayString(__props.text || "暂无数据"), 1),
977
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
978
- ]);
951
+ setup(props) {
952
+ const slots = useSlots();
953
+ return () => {
954
+ var _a;
955
+ return (
956
+ // @ts-ignore
957
+ h("view", { class: "hlw-empty" }, [
958
+ props.image ? (
959
+ // @ts-ignore
960
+ h("image", { class: "hlw-empty__image", src: props.image, mode: "aspectFit" })
961
+ ) : (
962
+ // @ts-ignore
963
+ h("view", { class: "hlw-empty__icon" }, [
964
+ // @ts-ignore
965
+ h("text", "📦")
966
+ ])
967
+ ),
968
+ // @ts-ignore
969
+ h("text", { class: "hlw-empty__text" }, props.text || "暂无数据"),
970
+ (_a = slots.default) == null ? void 0 : _a.call(slots)
971
+ ])
972
+ );
979
973
  };
980
974
  }
981
975
  });
982
- const Empty = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d78ade08"]]);
983
- const _hoisted_1$1 = { class: "hlw-loading" };
984
- const _hoisted_2$1 = { class: "hlw-loading__spinner" };
985
- const _hoisted_3$1 = {
986
- key: 0,
987
- class: "hlw-loading__text"
988
- };
989
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
990
- __name: "Loading",
976
+ const Loading = defineComponent({
977
+ name: "Loading",
991
978
  props: {
992
- text: {}
979
+ text: { type: String }
993
980
  },
994
- setup(__props) {
995
- return (_ctx, _cache) => {
996
- return openBlock(), createElementBlock("view", _hoisted_1$1, [
997
- createElementVNode("view", _hoisted_2$1, [
998
- (openBlock(), createElementBlock(Fragment, null, renderList(12, (i) => {
999
- return createElementVNode("view", {
1000
- key: i,
1001
- class: "hlw-loading__dot"
1002
- });
1003
- }), 64))
1004
- ]),
1005
- __props.text ? (openBlock(), createElementBlock("text", _hoisted_3$1, toDisplayString(__props.text), 1)) : createCommentVNode("", true)
1006
- ]);
981
+ setup(props) {
982
+ return () => {
983
+ const dots = Array.from(
984
+ { length: 12 },
985
+ (_, i) => (
986
+ // @ts-ignore
987
+ h("view", { key: i + 1, class: "hlw-loading__dot" })
988
+ )
989
+ );
990
+ return (
991
+ // @ts-ignore
992
+ h("view", { class: "hlw-loading" }, [
993
+ // @ts-ignore
994
+ h("view", { class: "hlw-loading__spinner" }, dots),
995
+ props.text ? (
996
+ // @ts-ignore
997
+ h("text", { class: "hlw-loading__text" }, props.text)
998
+ ) : null
999
+ ])
1000
+ );
1007
1001
  };
1008
1002
  }
1009
1003
  });
1010
- const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6bf3a5a2"]]);
1011
- const _hoisted_1 = { class: "hlw-menu-list" };
1012
- const _hoisted_2 = ["onTap"];
1013
- const _hoisted_3 = { class: "hlw-menu-list__left" };
1014
- const _hoisted_4 = {
1015
- key: 0,
1016
- class: "hlw-menu-list__icon"
1017
- };
1018
- const _hoisted_5 = { class: "hlw-menu-list__label" };
1019
- const _hoisted_6 = { class: "hlw-menu-list__right" };
1020
- const _hoisted_7 = {
1021
- key: 0,
1022
- class: "hlw-menu-list__value"
1023
- };
1024
- const _sfc_main = /* @__PURE__ */ defineComponent({
1025
- __name: "MenuList",
1004
+ const MenuList = defineComponent({
1005
+ name: "MenuList",
1026
1006
  props: {
1027
- items: {}
1007
+ items: { type: Array, required: true }
1028
1008
  },
1029
1009
  emits: ["click"],
1030
- setup(__props, { emit: __emit }) {
1031
- const emit = __emit;
1010
+ setup(props, { emit }) {
1032
1011
  function onTap(item) {
1033
1012
  if (item.url) {
1034
1013
  uni.navigateTo({ url: item.url });
@@ -1037,29 +1016,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1037
1016
  }
1038
1017
  emit("click", item);
1039
1018
  }
1040
- return (_ctx, _cache) => {
1041
- return openBlock(), createElementBlock("view", _hoisted_1, [
1042
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
1043
- return openBlock(), createElementBlock("view", {
1044
- key: item.key,
1019
+ return () => {
1020
+ const items = props.items.map(
1021
+ (item) => (
1022
+ // @ts-ignore
1023
+ h("view", {
1045
1024
  class: "hlw-menu-list__item",
1046
- onTap: ($event) => onTap(item)
1025
+ key: item.key,
1026
+ onClick: () => onTap(item)
1047
1027
  }, [
1048
- createElementVNode("view", _hoisted_3, [
1049
- item.icon ? (openBlock(), createElementBlock("text", _hoisted_4, toDisplayString(item.icon), 1)) : createCommentVNode("", true),
1050
- createElementVNode("text", _hoisted_5, toDisplayString(item.label), 1)
1028
+ // @ts-ignore
1029
+ h("view", { class: "hlw-menu-list__left" }, [
1030
+ item.icon ? (
1031
+ // @ts-ignore
1032
+ h("text", { class: "hlw-menu-list__icon" }, item.icon)
1033
+ ) : null,
1034
+ // @ts-ignore
1035
+ h("text", { class: "hlw-menu-list__label" }, item.label)
1051
1036
  ]),
1052
- createElementVNode("view", _hoisted_6, [
1053
- item.value ? (openBlock(), createElementBlock("text", _hoisted_7, toDisplayString(item.value), 1)) : createCommentVNode("", true),
1054
- _cache[0] || (_cache[0] = createElementVNode("text", { class: "hlw-menu-list__arrow" }, "›", -1))
1037
+ // @ts-ignore
1038
+ h("view", { class: "hlw-menu-list__right" }, [
1039
+ item.value ? (
1040
+ // @ts-ignore
1041
+ h("text", { class: "hlw-menu-list__value" }, item.value)
1042
+ ) : null,
1043
+ // @ts-ignore
1044
+ h("text", { class: "hlw-menu-list__arrow" }, "›")
1055
1045
  ])
1056
- ], 40, _hoisted_2);
1057
- }), 128))
1058
- ]);
1046
+ ])
1047
+ )
1048
+ );
1049
+ return h("view", { class: "hlw-menu-list" }, items);
1059
1050
  };
1060
1051
  }
1061
1052
  });
1062
- const MenuList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1dfe912b"]]);
1063
1053
  export {
1064
1054
  Avatar,
1065
1055
  Empty,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "UniApp 运行时核心包 — composables、Pinia stores、工具函数、UI 组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,8 +30,7 @@
30
30
  "pinia": "^2.1.7",
31
31
  "typescript": "^4.9.4",
32
32
  "vite": "5.2.8",
33
- "vite-plugin-dts": "^4.5.4",
34
- "@vitejs/plugin-vue": "^5.1.0"
33
+ "vite-plugin-dts": "^4.5.4"
35
34
  },
36
35
  "dependencies": {
37
36
  "md5": "^2.3.0"
package/dist/style.css DELETED
@@ -1,191 +0,0 @@
1
- .hlw-avatar[data-v-87dd25f7] {
2
- border-radius: 50%;
3
- overflow: hidden;
4
- flex-shrink: 0;
5
- }
6
- .hlw-avatar--small[data-v-87dd25f7] {
7
- width: 64rpx;
8
- height: 64rpx;
9
- }
10
- .hlw-avatar--medium[data-v-87dd25f7] {
11
- width: 88rpx;
12
- height: 88rpx;
13
- }
14
- .hlw-avatar--large[data-v-87dd25f7] {
15
- width: 120rpx;
16
- height: 120rpx;
17
- }
18
- .hlw-avatar__image[data-v-87dd25f7] {
19
- width: 100%;
20
- height: 100%;
21
- }
22
- .hlw-avatar__placeholder[data-v-87dd25f7] {
23
- width: 100%;
24
- height: 100%;
25
- background-color: #2979ff;
26
- display: flex;
27
- align-items: center;
28
- justify-content: center;
29
- }
30
- .hlw-avatar__initial[data-v-87dd25f7] {
31
- color: #ffffff;
32
- font-size: 36rpx;
33
- font-weight: 600;
34
- }.hlw-empty[data-v-d78ade08] {
35
- display: flex;
36
- flex-direction: column;
37
- align-items: center;
38
- justify-content: center;
39
- padding: 60rpx 0;
40
- }
41
- .hlw-empty__image[data-v-d78ade08] {
42
- width: 200rpx;
43
- height: 200rpx;
44
- }
45
- .hlw-empty__icon[data-v-d78ade08] {
46
- font-size: 100rpx;
47
- line-height: 1;
48
- margin-bottom: 24rpx;
49
- }
50
- .hlw-empty__text[data-v-d78ade08] {
51
- font-size: 28rpx;
52
- color: #c0c4cc;
53
- margin-top: 16rpx;
54
- }.hlw-loading[data-v-6bf3a5a2] {
55
- display: flex;
56
- flex-direction: column;
57
- align-items: center;
58
- justify-content: center;
59
- }
60
- .hlw-loading__spinner[data-v-6bf3a5a2] {
61
- position: relative;
62
- width: 40px;
63
- height: 40px;
64
- }
65
- .hlw-loading__dot[data-v-6bf3a5a2] {
66
- position: absolute;
67
- width: 8px;
68
- height: 8px;
69
- background-color: #2979ff;
70
- border-radius: 50%;
71
- animation: hlw-loading-fade-6bf3a5a2 1.2s infinite ease-in-out;
72
- }
73
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(1) {
74
- top: 0px;
75
- left: 8px;
76
- opacity: 1;
77
- }
78
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(2) {
79
- top: 0px;
80
- left: 20px;
81
- opacity: 0.92;
82
- }
83
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(3) {
84
- top: 0px;
85
- left: 32px;
86
- opacity: 0.84;
87
- }
88
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(4) {
89
- top: 10px;
90
- left: 32px;
91
- opacity: 0.76;
92
- }
93
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(5) {
94
- top: 20px;
95
- left: 32px;
96
- opacity: 0.68;
97
- }
98
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(6) {
99
- top: 20px;
100
- left: 20px;
101
- opacity: 0.6;
102
- }
103
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(7) {
104
- top: 20px;
105
- left: 8px;
106
- opacity: 0.52;
107
- transform: scale(0.84);
108
- }
109
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(8) {
110
- top: 10px;
111
- left: 8px;
112
- opacity: 0.44;
113
- transform: scale(0.76);
114
- }
115
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(9) {
116
- top: 10px;
117
- left: 20px;
118
- opacity: 0.36;
119
- transform: scale(0.68);
120
- }
121
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(10) {
122
- top: 0px;
123
- left: 20px;
124
- opacity: 0.28;
125
- transform: scale(0.6);
126
- }
127
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(11) {
128
- top: 0px;
129
- left: 8px;
130
- opacity: 0.2;
131
- transform: scale(0.52);
132
- }
133
- .hlw-loading__dot[data-v-6bf3a5a2]:nth-child(12) {
134
- top: 10px;
135
- left: 8px;
136
- opacity: 0.12;
137
- transform: scale(0.44);
138
- }
139
- .hlw-loading__text[data-v-6bf3a5a2] {
140
- margin-top: 12rpx;
141
- font-size: 24rpx;
142
- color: #606266;
143
- }
144
- @keyframes hlw-loading-fade-6bf3a5a2 {
145
- 0%, 80%, 100% {
146
- transform: scale(0.6);
147
- opacity: 0.4;
148
- }
149
- 40% {
150
- transform: scale(1);
151
- opacity: 1;
152
- }
153
- }.hlw-menu-list[data-v-1dfe912b] {
154
- background-color: #ffffff;
155
- border-radius: 8rpx;
156
- }
157
- .hlw-menu-list__item[data-v-1dfe912b] {
158
- display: flex;
159
- align-items: center;
160
- justify-content: space-between;
161
- padding: 28rpx 32rpx;
162
- border-bottom: 1rpx solid #ebedf0;
163
- }
164
- .hlw-menu-list__item[data-v-1dfe912b]:last-child {
165
- border-bottom: none;
166
- }
167
- .hlw-menu-list__left[data-v-1dfe912b] {
168
- display: flex;
169
- align-items: center;
170
- gap: 16rpx;
171
- }
172
- .hlw-menu-list__icon[data-v-1dfe912b] {
173
- font-size: 40rpx;
174
- }
175
- .hlw-menu-list__label[data-v-1dfe912b] {
176
- font-size: 28rpx;
177
- color: #303133;
178
- }
179
- .hlw-menu-list__right[data-v-1dfe912b] {
180
- display: flex;
181
- align-items: center;
182
- gap: 8rpx;
183
- }
184
- .hlw-menu-list__value[data-v-1dfe912b] {
185
- font-size: 28rpx;
186
- color: #606266;
187
- }
188
- .hlw-menu-list__arrow[data-v-1dfe912b] {
189
- font-size: 32rpx;
190
- color: #c0c4cc;
191
- }