mrxy-yk 1.2.10 → 1.3.0

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.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, shallowRef, onMounted, openBlock, createElementBlock, createBlock, unref, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, renderSlot } from "vue";
2
2
  import { EChartsUtil } from "../../utils/echarts/utils/index.js";
3
3
  import { echarts } from "../../utils/echarts/index.js";
4
- import { initDarkTheme } from "../../utils/echarts/themes/index.js";
4
+ import { initDefaultTheme, initDarkTheme } from "../../utils/echarts/themes/index.js";
5
5
  import _sfc_main$1 from "../empty/Empty.vue.js";
6
6
  /* empty css */
7
7
  import { EcBasicOption } from "../../utils/echarts/modules/coordinate/basic.js";
@@ -35,14 +35,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  }
36
36
  });
37
37
  function getChartTheme() {
38
- let chartTheme = props.theme;
38
+ let chartTheme = props.theme || "default";
39
39
  if (props.theme === "auto") {
40
40
  const classList = [...document.documentElement.classList.values()];
41
41
  if (classList.includes("dark")) {
42
42
  chartTheme = "dark";
43
43
  }
44
44
  }
45
- if (chartTheme === "default") chartTheme = void 0;
45
+ if (chartTheme === "default") initDefaultTheme();
46
46
  if (chartTheme === "dark") initDarkTheme();
47
47
  return chartTheme;
48
48
  }
@@ -28,4 +28,5 @@ export declare const EmptyStatusExtendConfig: Record<Capitalize<string>, EmptyOp
28
28
  */
29
29
  export declare const EChartsThemeConfig: {
30
30
  dark: Record<string, any>;
31
+ default: Record<string, any>;
31
32
  };
@@ -11,7 +11,8 @@ const AMapConfig = {
11
11
  };
12
12
  const EmptyStatusExtendConfig = {};
13
13
  const EChartsThemeConfig = {
14
- dark: null
14
+ dark: null,
15
+ default: null
15
16
  };
16
17
  export {
17
18
  AMapConfig,
@@ -14,9 +14,7 @@ declare function __VLS_template(): {
14
14
  rootEl: any;
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
- declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
- emptyStr: string;
19
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
17
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
20
18
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
19
  export default _default;
22
20
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -5,7 +5,7 @@ import { ElTableColumnGlobal } from "./index.js";
5
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "TableColumn",
7
7
  props: {
8
- emptyStr: { default: "—" }
8
+ emptyStr: {}
9
9
  },
10
10
  setup(__props) {
11
11
  const props = __props;
@@ -0,0 +1,2 @@
1
+ declare function getThemeConfig(): any;
2
+ export default getThemeConfig;
@@ -1 +1,2 @@
1
1
  export declare function initDarkTheme(): void;
2
+ export declare function initDefaultTheme(): void;
@@ -6,6 +6,13 @@ function initDarkTheme() {
6
6
  echarts.registerTheme("dark", getThemeConfig());
7
7
  isDarkThemeInit = true;
8
8
  }
9
+ let isDefaultThemeInit = false;
10
+ function initDefaultTheme() {
11
+ if (isDefaultThemeInit) return;
12
+ echarts.registerTheme("default", getThemeConfig());
13
+ isDefaultThemeInit = true;
14
+ }
9
15
  export {
10
- initDarkTheme
16
+ initDarkTheme,
17
+ initDefaultTheme
11
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrxy-yk",
3
- "version": "1.2.10",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A collection of Vue 3 components and utilities",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "mrxy-yk",
4
- "version": "1.2.10",
4
+ "version": "1.3.0",
5
5
  "js-types-syntax": "typescript",
6
6
  "contributions": {
7
7
  "html": {