@mx-sose-front/mx-sose-graph 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/index.d.ts +9 -1
- package/dist/index.esm.js +7 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -6
- package/src/index.ts +32 -8
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
3
3
|
import { ComputedRef } from 'vue';
|
|
4
4
|
import { DefineComponent } from 'vue';
|
|
5
5
|
import { ExtractPropTypes } from 'vue';
|
|
6
|
+
import { Pinia } from 'pinia';
|
|
6
7
|
import { Plugin as Plugin_2 } from 'vue';
|
|
7
8
|
import { PropType } from 'vue';
|
|
8
9
|
import { PublicProps } from 'vue';
|
|
@@ -160,7 +161,14 @@ y: number;
|
|
|
160
161
|
"onAction-button-add"?: ((shape: Shape) => any) | undefined;
|
|
161
162
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
162
163
|
|
|
163
|
-
|
|
164
|
+
/**
|
|
165
|
+
* 可选的安装参数:允许使用方主动把 pinia 传进来
|
|
166
|
+
*/
|
|
167
|
+
export declare interface MxSoseGraphOptions {
|
|
168
|
+
pinia?: Pinia;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare const MxSoseGraphPlugin: Plugin_2<[MxSoseGraphOptions?]>;
|
|
164
172
|
export { MxSoseGraphPlugin }
|
|
165
173
|
export default MxSoseGraphPlugin;
|
|
166
174
|
|
package/dist/index.esm.js
CHANGED
|
@@ -74356,7 +74356,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74356
74356
|
const graph_vue_vue_type_style_index_0_scoped_86c15316_lang = "";
|
|
74357
74357
|
const GraphView = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-86c15316"]]);
|
|
74358
74358
|
const MxSoseGraphPlugin = {
|
|
74359
|
-
install(app) {
|
|
74359
|
+
install(app, options) {
|
|
74360
|
+
const externalPinia = (options == null ? void 0 : options.pinia) || // 优先使用显式传入的
|
|
74361
|
+
app._context.provides.pinia || // Vue3 内部提供的
|
|
74362
|
+
app.config.globalProperties.$pinia;
|
|
74363
|
+
if (externalPinia) {
|
|
74364
|
+
setActivePinia(externalPinia);
|
|
74365
|
+
}
|
|
74360
74366
|
app.component("GraphView", GraphView);
|
|
74361
74367
|
app.use(installer);
|
|
74362
74368
|
}
|