phecda-vue 2.0.0-alpha.9 → 2.0.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.
package/dist/index.js CHANGED
@@ -315,14 +315,7 @@ function useV(Model) {
315
315
  if (key in cache)
316
316
  return cache[key]();
317
317
  cache[key] = createSharedReactive(() => {
318
- return (0, import_vue3.computed)({
319
- get() {
320
- return target[key];
321
- },
322
- set(v) {
323
- return target[key] = v;
324
- }
325
- });
318
+ return (0, import_vue3.toRef)(target, key);
326
319
  });
327
320
  return cache[key]();
328
321
  },
package/dist/index.mjs CHANGED
@@ -115,7 +115,7 @@ function getReactiveMap(symbol) {
115
115
  __name(getReactiveMap, "getReactiveMap");
116
116
 
117
117
  // src/vue/composable.ts
118
- import { computed, onBeforeUnmount, reactive, toRaw } from "vue";
118
+ import { onBeforeUnmount, reactive, toRaw, toRef } from "vue";
119
119
  import { getHandler, register } from "phecda-core";
120
120
 
121
121
  // src/vue/utils.ts
@@ -255,14 +255,7 @@ function useV(Model) {
255
255
  if (key in cache)
256
256
  return cache[key]();
257
257
  cache[key] = createSharedReactive(() => {
258
- return computed({
259
- get() {
260
- return target[key];
261
- },
262
- set(v) {
263
- return target[key] = v;
264
- }
265
- });
258
+ return toRef(target, key);
266
259
  });
267
260
  return cache[key]();
268
261
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-vue",
3
- "version": "2.0.0-alpha.9",
3
+ "version": "2.0.0",
4
4
  "description": "provide store/form/table with phecda function to vue",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "mitt": "^3.0.0",
16
16
  "vue": "^3.2.45",
17
- "phecda-core": "2.0.0-alpha.7"
17
+ "phecda-core": "2.0.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsup": "^6.5.0"