Skip to content

Commit fded8c9

Browse files
committed
feat(json-schema-form): release v1.0.16
1 parent 7bfdb72 commit fded8c9

File tree

4 files changed

+84
-16
lines changed

4 files changed

+84
-16
lines changed

docs/src/document/zh-CN/components/jsonSchemaForm.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,67 @@ export default defineConfig({
5959
});
6060
```
6161

62+
::: title 在线安装
63+
:::
64+
65+
::: describe 根据不同的 CDN 提供商有不同的引入方式,我们在这里以 unpkg 举例。
66+
:::
67+
68+
```html
69+
<!DOCTYPE html>
70+
<html lang="en">
71+
<head>
72+
<meta charset="UTF-8" />
73+
<link rel="stylesheet" href="//unpkg.com/@layui/json-schema-form/lib/index.css" />
74+
<script src="//unpkg.com/vue@3"></script>
75+
<script src="//unpkg.com/@layui/json-schema-form"></script>
76+
</head>
77+
<body>
78+
<div id="app">
79+
{{message}}
80+
<lay-json-schema-form :model="form" :schema="schema"></lay-json-schema-form>
81+
</div>
82+
83+
<script>
84+
const { createApp, ref, reactive } = Vue
85+
86+
const app = createApp({
87+
setup() {
88+
const message = reactive('Hello vue!')
89+
const form = ref({})
90+
const schema = reactive({
91+
name: {
92+
label: '姓名',
93+
type: 'input',
94+
props: {
95+
type: 'text',
96+
placeholder: '请输入姓名',
97+
}
98+
},
99+
password: {
100+
label: '密码',
101+
type: 'input',
102+
props: {
103+
type: 'password',
104+
autocomplete: "off",
105+
placeholder: '请输入密码',
106+
}
107+
},
108+
})
109+
return {
110+
message,
111+
schema,
112+
form,
113+
}
114+
}
115+
})
116+
app.use(LayuiJsonSchemaForm)
117+
app.mount('#app')
118+
</script>
119+
</body>
120+
</html>
121+
```
122+
62123
::: title 基本使用
63124
:::
64125

packages/json-schema-form/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.0.16] (2025-05-17)
2+
3+
### Layui-vue Upgrade V2.22.2
4+
5+
### Bug Fixes
6+
* 具名导出 `install` 函数
7+
18
## [1.0.15] (2024-10-22)
29

310
### Layui-vue Upgrade V2.19.0

packages/json-schema-form/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
"name": "@layui/json-schema-form",
3-
"version": "1.0.15",
4-
"description": "Json-schema-form is a high-level component encapsulated on the basis of @layui/layui-vue form.",
5-
"homepage": "http://www.layui-vue.com/zh-CN/components/jsonSchemaForm",
63
"type": "module",
7-
"module": "lib/json-schema-form.js",
8-
"main": "lib/json-schema-form.umd.js",
4+
"version": "1.0.16",
5+
"description": "Json-schema-form is a high-level component encapsulated on the basis of @layui/layui-vue form.",
96
"license": "MIT",
7+
"homepage": "http://www.layui-vue.com/zh-CN/components/jsonSchemaForm",
108
"bugs": {
119
"url": "https://gitee.com/layui-vue/layui-vue/issues"
1210
},
11+
"keywords": [
12+
"layui-vue",
13+
"layui",
14+
"layui/json-schema-form",
15+
"vue"
16+
],
1317
"exports": {
1418
".": {
1519
"import": {
@@ -22,14 +26,10 @@
2226
"./types/*.d.ts"
2327
]
2428
},
29+
"main": "lib/json-schema-form.umd.js",
30+
"module": "lib/json-schema-form.js",
2531
"types": "types/index.d.ts",
2632
"style": "lib/index.css",
27-
"keywords": [
28-
"layui-vue",
29-
"layui",
30-
"layui/json-schema-form",
31-
"vue"
32-
],
3333
"files": [
3434
"lib",
3535
"types"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { App } from "vue";
2-
import type { InstallOptions } from "./types";
2+
// import type { InstallOptions } from "./types";
33

44
import LayJsonSchemaForm from "./component/form/index";
55

66
// 全局安装
7-
const install = (app: App, options?: InstallOptions): void => {
8-
app.component(LayJsonSchemaForm.name, LayJsonSchemaForm);
9-
};
7+
function install(app: App): void {
8+
app.component(LayJsonSchemaForm.name!, LayJsonSchemaForm);
9+
}
1010

11-
export { LayJsonSchemaForm };
11+
export { install, LayJsonSchemaForm };
1212

1313
export default { install };

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy