Skip to content

Commit

Permalink
修复预览无效的问题
Browse files Browse the repository at this point in the history
修复默认控件配置没有导出的问题
  • Loading branch information
eiixy committed Dec 14, 2020
1 parent 8c23a43 commit f66838d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Vue.use(formGenerator, {
// 可以注入扩展组件配置
],
// [可选] 注入扩展组件
extend: require.context('./components/form_generator_extends', true, /\.(vue|js)$/),
extend: require.context('./components/form_generator_extends/widgets', true, /\.(vue|js)$/),
});

```
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import index from './src/index'

import widgets from './src/widgets.js'

export const widgets
export const fgWidgets = widgets
export default index
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sczts-form-generator",
"version": "0.1.0",
"version": "0.1.1",
"description": "一款基于 element-ui 的表单设计器",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/attributes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default {

<style lang="scss" scoped>
.el-form-item {
margin-bottom: 0;
margin-bottom: 4px;
}
.margin-b {
margin-bottom: 20px;
Expand Down
6 changes: 3 additions & 3 deletions src/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<el-card class="widgets" shadow="never">
<div class="widgets-group" v-for="(group, index) in widgets" :key="index">
<div class="name">{{ group.name }}</div>
<div class="widgets">
<div class="widgets-items">
<el-row :gutter="10">
<el-col :span="12" v-for="(widget, i) in group.widgets" :key="i">
<div @dblclick="add(widget)" class="widgets-item">{{ widget.name }}</div>
Expand Down Expand Up @@ -104,7 +104,7 @@ import Attrs from "./attributes";
import Input from "./input";
import Ui from "./ui";
// import Rules from "./rules";
import FormGenerator from "./generator";
import fgRender from "./render";
import { codemirror } from "vue-codemirror";
import "codemirror/lib/codemirror.css";
import "codemirror/theme/base16-dark.css";
Expand All @@ -117,7 +117,7 @@ export default {
"input-content": Input,
"ui-attrs": Ui,
// "rule-attrs": Rules,
"preview-forms": FormGenerator
"preview-forms": fgRender
},
props: {
value: {
Expand Down

0 comments on commit f66838d

Please sign in to comment.