cosey 0.2.0 → 0.2.2

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.
@@ -26,7 +26,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
26
26
  required: false
27
27
  },
28
28
  fieldProps: {
29
- type: Object,
29
+ type: null,
30
30
  required: false
31
31
  },
32
32
  fieldRef: {
@@ -3,7 +3,7 @@ import { defaultFormItemProps, formItemExposeKeys } from '../form/form-item.js';
3
3
  const defaultFormListProps = {
4
4
  ...defaultFormItemProps,
5
5
  modelValue: () => [],
6
- addText: "co.form.add"
6
+ addText: "co.common.add"
7
7
  };
8
8
  const formListExposeKeys = [...formItemExposeKeys, "add", "remove", "move"];
9
9
 
package/config/http.d.ts CHANGED
@@ -19,6 +19,10 @@ export declare const defaultHttpConfig: {
19
19
  * HTTP 认证方案
20
20
  */
21
21
  authScheme: string;
22
+ /**
23
+ * Token 添加到的请求头字段的键名
24
+ */
25
+ authHeaderKey: string;
22
26
  /**
23
27
  * 获取属性的路径
24
28
  */
package/config/http.js CHANGED
@@ -15,6 +15,10 @@ const defaultHttpConfig = {
15
15
  * HTTP 认证方案
16
16
  */
17
17
  authScheme: "Bearer",
18
+ /**
19
+ * Token 添加到的请求头字段的键名
20
+ */
21
+ authHeaderKey: "Authorization",
18
22
  /**
19
23
  * 获取属性的路径
20
24
  */
@@ -1,6 +1,6 @@
1
1
  import { ref, inject, computed, unref, isRef } from 'vue';
2
2
  import { get } from 'lodash-es';
3
- import stdin_default from '../locale/lang/en.js';
3
+ import stdin_default from '../locale/lang/zh-cn.js';
4
4
 
5
5
  const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
6
6
  const translate = (path, option, locale) => get(locale, path, path).replace(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -45,7 +45,7 @@ function useRequest(config = {}) {
45
45
  Object.assign(config2, httpConfig.headers);
46
46
  const token = persist.get(TOKEN_NAME);
47
47
  if (token) {
48
- config2.headers.Authorization = httpConfig.authScheme ? `${httpConfig.authScheme} ${token}` : token;
48
+ config2.headers[httpConfig.authHeaderKey] = httpConfig.authScheme ? `${httpConfig.authScheme} ${token}` : token;
49
49
  }
50
50
  return config2;
51
51
  },