eco-vue-js 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -63,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
63
|
const save = (value) => {
|
64
64
|
if (submitting.value) return;
|
65
65
|
submitting.value = true;
|
66
|
-
return props.apiMethod(set({}, props.field, value
|
66
|
+
return props.apiMethod(set({}, props.field, value)).then((response) => {
|
67
67
|
setData(response.data);
|
68
68
|
Notify.success({ title: "Saved" });
|
69
69
|
emit("success", response.data);
|
package/dist/utils/utils.d.ts
CHANGED
@@ -16,7 +16,7 @@ export declare const parseId: (value: unknown) => number;
|
|
16
16
|
export declare const isPage: (value: unknown) => value is number;
|
17
17
|
export declare const isIndex: (value: unknown) => value is number;
|
18
18
|
export declare const parseIndex: (value: unknown) => number;
|
19
|
-
export declare const get: <FieldType, Data extends Record<string,
|
20
|
-
export declare const set: <FieldType, Data extends Record<string,
|
19
|
+
export declare const get: <FieldType, Data extends Record<string, unknown>>(data: Data, path: keyof ObjectPaths<Data, FieldType>) => FieldType | undefined;
|
20
|
+
export declare const set: <FieldType, Data extends Record<string, unknown>>(data: Data, path: keyof ObjectPaths<Data, FieldType>, value: FieldType) => Data;
|
21
21
|
export {};
|
22
22
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,SAAU,OAAO,KAAG,OAAO,GAAG,IAKhD,CAAA;AAEV,eAAO,MAAM,mBAAmB,UAAW,OAAO,mBAAa,KAAK,CAAC,OAAO,CAa3E,CAAA;AAED,eAAO,MAAM,SAAS,WAAY,OAAO,WAAW,OAAO,KAAG,OAI7D,CAAA;AAGD,KAAK,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAE1C,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,E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E,SAAS,CAAC,KAAG,SAAS,GAAG,SAA8H,CAAA;AAEtQ,eAAO,MAAM,GAAG,GAAI,SAAS,EAAE,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,IAAI,QAAQ,MAAM,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,SAAS,KAAG,IAe7I,CAAA"}
|
package/dist/utils/utils.js
CHANGED
@@ -83,7 +83,10 @@ const get = (data, path) => path.split(".").reduce((result, current) => result?.
|
|
83
83
|
const set = (data, path, value) => {
|
84
84
|
path.split(".").reduce((acc, current, index, array) => {
|
85
85
|
if (index !== array.length - 1) {
|
86
|
-
if (!acc[current])
|
86
|
+
if (!acc[current]) {
|
87
|
+
acc[current] = {};
|
88
|
+
return acc[current];
|
89
|
+
}
|
87
90
|
} else {
|
88
91
|
acc[current] = value;
|
89
92
|
}
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"type": "git",
|
5
5
|
"url": "https://github.com/rsmple/eco-vue-js.git"
|
6
6
|
},
|
7
|
-
"version": "0.8.
|
7
|
+
"version": "0.8.2",
|
8
8
|
"scripts": {
|
9
9
|
"dev": "vite",
|
10
10
|
"build": "run-p type-check build-only",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"@rushstack/eslint-patch": "1.10.4",
|
26
26
|
"@tsconfig/node18": "18.2.4",
|
27
27
|
"@types/jsdom": "21.1.7",
|
28
|
-
"@types/node": "22.
|
28
|
+
"@types/node": "22.7.4",
|
29
29
|
"@types/postcss-import": "14.0.3",
|
30
30
|
"@vitejs/plugin-vue": "5.1.4",
|
31
31
|
"@vue/eslint-config-typescript": "13.0.0",
|
@@ -34,15 +34,15 @@
|
|
34
34
|
"eslint": "8.57.0",
|
35
35
|
"eslint-plugin-unused-imports": "3.0.0",
|
36
36
|
"eslint-plugin-vue": "9.28.0",
|
37
|
-
"jsdom": "25.0.
|
37
|
+
"jsdom": "25.0.1",
|
38
38
|
"npm-run-all": "4.1.5",
|
39
39
|
"path": "0.12.7",
|
40
40
|
"postcss": "8.4.47",
|
41
41
|
"postcss-import": "16.1.0",
|
42
|
-
"tailwindcss": "3.4.
|
42
|
+
"tailwindcss": "3.4.13",
|
43
43
|
"typescript": "5.6.2",
|
44
|
-
"vite": "5.4.
|
45
|
-
"vite-plugin-dts": "4.2.
|
44
|
+
"vite": "5.4.8",
|
45
|
+
"vite-plugin-dts": "4.2.2",
|
46
46
|
"vite-svg-loader": "5.1.0",
|
47
47
|
"vitest": "2.1.1",
|
48
48
|
"vue-tsc": "2.1.6"
|