@ningboyz/vue 1.0.8 → 1.0.9

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,4 +1,4 @@
1
- const o = "1.0.8", s = {
1
+ const o = "1.0.9", s = {
2
2
  version: o
3
3
  };
4
4
  export {
@@ -1,3 +1,7 @@
1
1
  import { IStimulsoftDesginProps } from './interface';
2
- declare const _default: import('vue').DefineComponent<IStimulsoftDesginProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IStimulsoftDesginProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
+ declare const _default: import('vue').DefineComponent<IStimulsoftDesginProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ saveReport: (fileName: string, json: string) => any;
4
+ }, string, import('vue').PublicProps, Readonly<IStimulsoftDesginProps> & Readonly<{
5
+ onSaveReport?: ((fileName: string, json: string) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
7
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./desgin.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6de6eb59"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-119bbadd"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,45 +1,50 @@
1
- import { defineComponent as l, ref as m, watch as u, createBlock as f, openBlock as g, unref as n } from "vue";
2
- import { Designer as d } from "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import D from "./factory.js";
1
+ import { defineComponent as f, ref as u, watch as v, createBlock as d, openBlock as g, unref as s } from "vue";
2
+ import { Designer as D } from "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
+ import R from "./factory.js";
4
4
  import { Stimulsoft as _ } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
7
7
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
8
- const x = /* @__PURE__ */ l({
8
+ const N = /* @__PURE__ */ f({
9
9
  __name: "desgin",
10
10
  props: {
11
11
  listData: {}
12
12
  },
13
- setup(s) {
14
- const p = s, o = m(), r = new _.Designer.StiDesignerOptions();
15
- r.appearance.fullScreenMode = !0, u(
16
- () => p.listData,
13
+ emits: ["saveReport"],
14
+ setup(p, { emit: i }) {
15
+ const a = p, r = u(), n = new _.Designer.StiDesignerOptions();
16
+ n.appearance.fullScreenMode = !0;
17
+ const c = i;
18
+ v(
19
+ () => a.listData,
17
20
  (e) => {
18
- c(e);
21
+ l(e);
19
22
  },
20
23
  {
21
24
  deep: !0
22
25
  }
23
26
  );
24
- const a = (e) => {
25
- e.preventDefault = !0, console.log(e);
26
- }, c = async (e) => {
27
+ const m = (e) => {
28
+ e.preventDefault = !0;
29
+ const t = e.report.saveToJsonString(), o = e.fileName;
30
+ c("saveReport", o, t);
31
+ }, l = async (e) => {
27
32
  try {
28
- const t = new D();
33
+ const t = new R();
29
34
  t.setListData(e);
30
- const i = t.getReport();
31
- o.value = i;
35
+ const o = t.getReport();
36
+ r.value = o;
32
37
  } catch (t) {
33
38
  console.log(t.message);
34
39
  }
35
40
  };
36
- return (e, t) => (g(), f(n(d), {
37
- report: o.value,
38
- options: n(r),
39
- onSaveReport: a
41
+ return (e, t) => (g(), d(s(D), {
42
+ report: r.value,
43
+ options: s(n),
44
+ onSaveReport: m
40
45
  }, null, 8, ["report", "options"]));
41
46
  }
42
47
  });
43
48
  export {
44
- x as default
49
+ N as default
45
50
  };
@@ -2,3 +2,6 @@ import { TWldy } from '@ningboyz/types';
2
2
  export interface IStimulsoftDesginProps {
3
3
  listData: TWldy.IWldyDataResponse[];
4
4
  }
5
+ export interface IStimulsoftDesginEmits {
6
+ (event: "saveReport", fileName: string, json: string): void;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "description": "宁波甬政vue-ui库",
6
6
  "author": "nbyt-syq",