@rugal.tu/vuemodel3 1.2.9 → 1.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rugal.tu/vuemodel3",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/VueModel.ts CHANGED
@@ -1256,7 +1256,7 @@ export class ApiStore extends FuncBase {
1256
1256
  //#endregion
1257
1257
  }
1258
1258
  import { App, Plugin, createApp, reactive, Directive, } from 'vue';
1259
- import { watch, WatchCallback, WatchOptions } from 'vue';
1259
+ import { watch, WatchCallback, WatchOptions, WatchHandle } from 'vue';
1260
1260
  export class VueStore extends ApiStore {
1261
1261
  protected $VueProxy: any = null;
1262
1262
  protected $VueOption: Record<string, any> = {
@@ -1516,14 +1516,15 @@ export class VueCommand extends VueStore {
1516
1516
  //#endregion
1517
1517
 
1518
1518
  //#region Customer Command
1519
- public Watch(WatchPath: PathType | (() => any), Callback: WatchCallback, Option: WatchOptions = {}) {
1519
+ public Watch(WatchPath: PathType | (() => any), Callback: WatchCallback, Option: WatchOptions = {}): WatchHandle {
1520
+ let Handle: WatchHandle;
1520
1521
  if (typeof WatchPath == 'function')
1521
- watch(WatchPath, Callback, Option);
1522
+ Handle = watch(WatchPath, Callback, Option);
1522
1523
  else {
1523
1524
  Model.AddStore(WatchPath);
1524
- watch(() => Model.GetStore(WatchPath), Callback, Option);
1525
+ Handle = watch(() => Model.GetStore(WatchPath), Callback, Option);
1525
1526
  }
1526
- return this;
1527
+ return Handle;
1527
1528
  }
1528
1529
  public AddV_Watch(WatchPath: PathType | (() => any), Callback: WatchCallback, Option: WatchOptions = {}) {
1529
1530
  Model.WithMounted(() => {