page-schema-enginer-shun 1.0.4 → 1.0.6
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/README.md +52 -0
- package/dist/{style.css → assets/schema-table-vmQlBlmv.css} +11 -20
- package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-CdioWh25.js +7 -0
- package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-CdioWh25.js.map +1 -0
- package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-v2tkbqJq.js +8 -0
- package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-v2tkbqJq.js.map +1 -0
- package/dist/assets/schema-view-bW-stnbi.css +10 -0
- package/dist/assets/wigdets-klW8Cf0W.css +4 -0
- package/dist/client.d.ts +2 -0
- package/dist/entrypoints/http.d.ts +4 -0
- package/dist/entrypoints/schema-view.d.ts +7 -0
- package/dist/entrypoints/wigdets.d.ts +11 -0
- package/dist/http.cjs.js +2 -0
- package/dist/http.cjs.js.map +1 -0
- package/dist/http.d.ts +1 -0
- package/dist/http.es.js +2 -0
- package/dist/http.es.js.map +1 -0
- package/dist/index.cjs.js +7 -1414
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.es.js +7 -1415
- package/dist/index.es.js.map +1 -1
- package/dist/schema-view/router/index.d.ts +8 -0
- package/dist/schema-view.cjs.js +9 -0
- package/dist/schema-view.cjs.js.map +1 -0
- package/dist/schema-view.d.ts +3 -0
- package/dist/schema-view.es.js +8 -0
- package/dist/schema-view.es.js.map +1 -0
- package/dist/wigdets/operation-panel/operation-panel.vue.d.ts +2 -0
- package/dist/wigdets.cjs.js +7 -0
- package/dist/wigdets.cjs.js.map +1 -0
- package/dist/wigdets.d.ts +1 -0
- package/dist/wigdets.es.js +6 -0
- package/dist/wigdets.es.js.map +1 -0
- package/package.json +20 -2
- package/dist/index.umd.js +0 -1415
- package/dist/index.umd.js.map +0 -1
- package/dist/src/index.d.ts +0 -5
- package/dist/vite.config.d.ts +0 -2
- /package/dist/{src/hooks → hooks}/useSchema.d.ts +0 -0
- /package/dist/{src/http → http}/index.d.ts +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/{src/pinia → pinia}/modules/user.d.ts +0 -0
- /package/dist/{src/router.d.ts → router.d.ts} +0 -0
- /package/dist/{src/schema-view → schema-view}/complex-view/search-panel/search-panel.vue.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/complex-view/table-panel/table-panel.vue.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/components/component-config.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/components/createForm/createForm.vue.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/components/editForm/editForm.vue.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/hooks/useSchema.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/schema-view.vue.d.ts +0 -0
- /package/dist/{src/schema-view → schema-view}/type.d.ts +0 -0
- /package/dist/{src/utils → utils}/request.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/complex-view/form-item-config.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/complex-view/input/input.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/complex-view/input-number/input-number.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/complex-view/radio/radio.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/complex-view/select/select.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-form/schema-form.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-search/complex-view/input/input.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-search/schema-item-config.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-search/schema-search-bar.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-table/schema-table.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-table/schema-view/format-date/format-date.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-table/schema-view/format-enum/format-enum.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-table/schema-view/schema-table-item-config.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/schema-table/schema-view/tag/tag.vue.d.ts +0 -0
- /package/dist/{src/wigdets → wigdets}/utls/date.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# page-schema-enginer-shun
|
|
2
|
+
|
|
3
|
+
单包多入口的页面级 Schema 渲染引擎。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm i page-schema-enginer-shun
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 入口说明
|
|
12
|
+
|
|
13
|
+
- 根入口 `page-schema-enginer-shun`
|
|
14
|
+
- 默认导出:`SchemaView`
|
|
15
|
+
- 命名导出:`setRequestClient`
|
|
16
|
+
|
|
17
|
+
- 子路径入口 `page-schema-enginer-shun/schema-view`
|
|
18
|
+
- 默认导出:`SchemaView`
|
|
19
|
+
- 命名导出:`useSchema`、`setRouterClient`、`navigate`、`back`、类型 `*`
|
|
20
|
+
|
|
21
|
+
- 子路径入口 `page-schema-enginer-shun/wigdets`
|
|
22
|
+
- 组件:`SchemaForm`、`SchemaTable`、`SchemaSearchBar`、`OperationPanel`、`FormatDate`、`FormatEnum`、`Tag`
|
|
23
|
+
- 配置/工具:`schema-item-config`、`schema-table-item-config`、`form-item-config`、`date`
|
|
24
|
+
|
|
25
|
+
- 子路径入口 `page-schema-enginer-shun/http`
|
|
26
|
+
- `RequestFn`、`setRequestClient`、`request`
|
|
27
|
+
- `service`(Axios 适配默认导出)、`setRequestAdapter`
|
|
28
|
+
|
|
29
|
+
## 使用示例
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import SchemaView from 'page-schema-enginer-shun/schema-view'
|
|
33
|
+
import { SchemaForm, SchemaTable } from 'page-schema-enginer-shun/wigdets'
|
|
34
|
+
import axios from 'axios'
|
|
35
|
+
import { setRequestAdapter, setRequestClient, type RequestFn } from 'page-schema-enginer-shun/http'
|
|
36
|
+
|
|
37
|
+
setRequestAdapter(axios.create())
|
|
38
|
+
setRequestClient(async ({ url, method, params, data }) => {
|
|
39
|
+
return axios({ url, method, params, data })
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 构建格式
|
|
44
|
+
|
|
45
|
+
- 每个入口均产出 `ES` 与 `CJS` 格式与类型声明
|
|
46
|
+
|
|
47
|
+
## 注意事项
|
|
48
|
+
|
|
49
|
+
- 高频输入防抖(300ms)、滚动/窗口变化节流(200ms)
|
|
50
|
+
- 提交按钮自动 `loading` 锁,表单加常见范围限制
|
|
51
|
+
- 任何潜在错误加 `try/catch` 并显示提示
|
|
52
|
+
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
.schema-form-input .schema-form-input-item-label[data-v-5d94c475] {
|
|
6
6
|
margin-right: 10px;
|
|
7
7
|
min-width: 70px;
|
|
8
|
-
}.schema-form-radio[data-v-
|
|
8
|
+
}.schema-form-radio[data-v-a791fef4] {
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
}
|
|
12
|
-
.schema-form-radio-label[data-v-
|
|
12
|
+
.schema-form-radio-label[data-v-a791fef4] {
|
|
13
13
|
margin-right: 10px;
|
|
14
14
|
min-width: 70px;
|
|
15
|
-
}.schema-form-input-number[data-v-
|
|
15
|
+
}.schema-form-input-number[data-v-44583072] {
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
}
|
|
19
|
-
.schema-form-input-number-label[data-v-
|
|
19
|
+
.schema-form-input-number-label[data-v-44583072] {
|
|
20
20
|
margin-right: 10px;
|
|
21
21
|
min-width: 70px;
|
|
22
22
|
}.schema-form-select[data-v-65d85e93] {
|
|
@@ -26,37 +26,28 @@
|
|
|
26
26
|
.schema-form-select-label[data-v-65d85e93] {
|
|
27
27
|
margin-right: 10px;
|
|
28
28
|
min-width: 70px;
|
|
29
|
-
}.schema-form-complex-view .schema-form-input-container[data-v-
|
|
29
|
+
}.schema-form-complex-view .schema-form-input-container[data-v-0e3bb5f7] {
|
|
30
30
|
margin-bottom: 10px;
|
|
31
31
|
}
|
|
32
|
-
.schema-form-complex-view .schema-form-radio-container[data-v-
|
|
32
|
+
.schema-form-complex-view .schema-form-radio-container[data-v-0e3bb5f7] {
|
|
33
33
|
margin-bottom: 10px;
|
|
34
34
|
}
|
|
35
|
-
.schema-form-complex-view .schema-form-input-number-container[data-v-
|
|
35
|
+
.schema-form-complex-view .schema-form-input-number-container[data-v-0e3bb5f7] {
|
|
36
36
|
margin-bottom: 10px;
|
|
37
37
|
}
|
|
38
|
-
.schema-form-complex-view .schema-form-select-container[data-v-
|
|
38
|
+
.schema-form-complex-view .schema-form-select-container[data-v-0e3bb5f7] {
|
|
39
39
|
margin-bottom: 10px;
|
|
40
|
-
}.schema-table[data-v-
|
|
40
|
+
}.schema-table[data-v-502fe21c] {
|
|
41
41
|
width: 98%;
|
|
42
42
|
margin: 0 auto;
|
|
43
43
|
margin-top: 5px;
|
|
44
44
|
}
|
|
45
|
-
.table-panel[data-v-
|
|
45
|
+
.table-panel[data-v-502fe21c] {
|
|
46
46
|
height: 100%;
|
|
47
47
|
}
|
|
48
|
-
.gva-pagination[data-v-
|
|
48
|
+
.gva-pagination[data-v-502fe21c] {
|
|
49
49
|
margin-top: 16px;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: flex-end;
|
|
52
52
|
padding-bottom: 20px;
|
|
53
|
-
}.table-panel[data-v-cef68da3] {
|
|
54
|
-
margin: 0 auto;
|
|
55
|
-
height: 100%;
|
|
56
|
-
background-color: #fff;
|
|
57
|
-
}
|
|
58
|
-
.table-panel .operation-panel[data-v-cef68da3] {
|
|
59
|
-
padding: 10px;
|
|
60
|
-
}.schema-view[data-v-6aa05693] {
|
|
61
|
-
height: 100%;
|
|
62
53
|
}
|
package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-CdioWh25.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-CdioWh25.js","sources":["../../src/pinia/modules/user.ts"],"sourcesContent":["import { defineStore } from 'pinia';\r\n\r\nexport const useUserStore = defineStore('user', {\r\n state: () => ({\r\n name: 'DemoUser',\r\n }),\r\n});\r\n\r\n"],"names":[],"mappings":";AAE4B,YAAY,QAAQ;AAAA,EAC9C,OAAO,OAAO;AAAA,IACZ,MAAM;AAAA,EAAA;AAEV,CAAC;"}
|
package/dist/assets/schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-v2tkbqJq.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-table.vue_vue_type_style_index_0_scoped_502fe21c_lang-v2tkbqJq.js","sources":["../../src/pinia/modules/user.ts"],"sourcesContent":["import { defineStore } from 'pinia';\r\n\r\nexport const useUserStore = defineStore('user', {\r\n state: () => ({\r\n name: 'DemoUser',\r\n }),\r\n});\r\n\r\n"],"names":["defineStore"],"mappings":";;AAE4BA,MAAAA,YAAY,QAAQ;AAAA,EAC9C,OAAO,OAAO;AAAA,IACZ,MAAM;AAAA,EAAA;AAEV,CAAC;"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as SchemaView } from '../schema-view/schema-view.vue';
|
|
2
|
+
|
|
3
|
+
export { useSchema } from '../schema-view/hooks/useSchema';
|
|
4
|
+
export * from '../schema-view/type';
|
|
5
|
+
export { setRouterClient, navigate, back } from '../schema-view/router';
|
|
6
|
+
export { setRequestClient } from '../http';
|
|
7
|
+
export default SchemaView;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as OperationPanel } from '../wigdets/operation-panel/operation-panel.vue';
|
|
2
|
+
export { default as SchemaForm } from '../wigdets/schema-form/schema-form.vue';
|
|
3
|
+
export { default as SchemaSearchBar } from '../wigdets/schema-search/schema-search-bar.vue';
|
|
4
|
+
export { default as SchemaTable } from '../wigdets/schema-table/schema-table.vue';
|
|
5
|
+
export { default as FormatDate } from '../wigdets/schema-table/schema-view/format-date/format-date.vue';
|
|
6
|
+
export { default as FormatEnum } from '../wigdets/schema-table/schema-view/format-enum/format-enum.vue';
|
|
7
|
+
export { default as Tag } from '../wigdets/schema-table/schema-view/tag/tag.vue';
|
|
8
|
+
export * from '../wigdets/schema-search/schema-item-config';
|
|
9
|
+
export * from '../wigdets/schema-table/schema-view/schema-table-item-config';
|
|
10
|
+
export * from '../wigdets/schema-form/complex-view/form-item-config';
|
|
11
|
+
export * from '../wigdets/utls/date';
|
package/dist/http.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/http.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './entrypoints/http'
|
package/dist/http.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|