@daxiangme/form-vue 0.1.2 → 0.1.3
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 +14 -2
- package/dist/index.js +5139 -5138
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -30,14 +30,26 @@ import '@daxiangme/form-vue/style.css'
|
|
|
30
30
|
|
|
31
31
|
## 注册组件
|
|
32
32
|
|
|
33
|
+
库构建已把 Element Plus 控件编译为 `import { ElButton } from 'element-plus'`。按需宿主(`unplugin-vue-components` 等)**不必** `app.use(ElementPlus)`;引入 Vue 3、Element Plus peer 与样式后直接导入两个公共组件即可:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { createApp } from 'vue'
|
|
37
|
+
import { FormDesigner, FormRenderer } from '@daxiangme/form-vue'
|
|
38
|
+
|
|
39
|
+
import App from './App.vue'
|
|
40
|
+
|
|
41
|
+
createApp(App).mount('#app')
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
已经全量 `app.use(ElementPlus)` 的工程仍然兼容。可选插件 `DaxiangFormVue` 只把 `FormDesigner` / `FormRenderer` 注册为全局组件,不负责安装 Element Plus:
|
|
45
|
+
|
|
33
46
|
```ts
|
|
34
47
|
import { createApp } from 'vue'
|
|
35
|
-
import ElementPlus from 'element-plus'
|
|
36
48
|
import { DaxiangFormVue } from '@daxiangme/form-vue'
|
|
37
49
|
|
|
38
50
|
import App from './App.vue'
|
|
39
51
|
|
|
40
|
-
createApp(App).use(
|
|
52
|
+
createApp(App).use(DaxiangFormVue).mount('#app')
|
|
41
53
|
```
|
|
42
54
|
|
|
43
55
|
## 设计表单
|