Skip to content

Commit

Permalink
feat: 适配 iview3
Browse files Browse the repository at this point in the history
  • Loading branch information
lljj-x committed Jan 18, 2021
1 parent 27e310e commit d4ee166
Show file tree
Hide file tree
Showing 64 changed files with 6,630 additions and 6,182 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
"docs:build": "yarn workspace docs build",
"lib:watch": "yarn workspace @lljj/vue-json-schema-form watch",
"lib:build": "yarn workspace @lljj/vue-json-schema-form build",
"lib-iview3:watch": "yarn workspace @lljj/vue2-form-iview3 watch",
"lib-iview3:build": "yarn workspace @lljj/vue2-form-iview3 build",
"demo:dev": "yarn workspace demo dev",
"demo3:dev": "yarn workspace demo-v3 dev",
"demo:build": "yarn workspace demo build",
"demo3:dev": "yarn workspace demo-v3 dev",
"demo3:build": "yarn workspace demo-v3 build",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2",
"clean": "lerna clean && rm -rf node_modules",
"packages:diff": "lerna diff",
Expand Down
23 changes: 23 additions & 0 deletions packages/demo/demo-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Vue2 Demo 演示相关


## 同时运行 `Playground/表单Schema生成器/活动编辑器`
```ssh
# Playground http://127.0.0.1:8800/
# 可视化表单Schema编辑器 http://127.0.0.1:8800/schema-generator.html
# (H5)活动编辑器 http://127.0.0.1:8800/vue-editor.html
yarn run demo:dev
```

## 单个运行(指定entry编译更快)
```ssh
# 只运行 Playground
yarn run demo:dev --dir=index
# 只运行 表单Schema生成器
yarn run demo:dev --dir=schema-generator
# 只运行(H5)活动编辑器
yarn run demo:dev --dir=vue-editor
```
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@
import Draggable from 'vuedraggable';
import VueElementForm, { schemaValidate } from '@lljj/vue-json-schema-form';
import * as arrayMethods from '@/_common/utils/array';
import componentWithDialog from '@/_common/components/component-with-dialog';
import * as arrayMethods from 'demo-common/utils/array';
import componentWithDialog from 'demo-common/components/component-with-dialog';
import JsonPerttyPrint from '@/_common/components/JsonPerttyPrint.vue';
import JsonPerttyPrint from 'demo-common/components/JsonPerttyPrint.vue';
import EditorToolBar from './EditorToolBar.vue';
import EditorHeader from './EditorHeader.vue';
import ViewComponentWrap from './components/ViewComponentWrap.vue';
Expand Down Expand Up @@ -450,7 +450,7 @@ export default {
}
</style>
<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
:root {
--site-top-height: 80px;
--tool-bar-width: 260px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</template>

<script>
import BaseEditorHeader from '@/_common/components/EditorHeader.vue';
import BaseEditorHeader from 'demo-common/components/EditorHeader.vue';
export default {
name: 'EditorHeader',
Expand Down Expand Up @@ -109,7 +109,7 @@ export default {
</script>

<style module>
@import "variable.css";
@import "demo-common/css/variable.css";
.box {
padding: 10px 2%;
height: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@
import Draggable from 'vuedraggable';
import VueElementForm, { schemaValidate } from '@lljj/vue-json-schema-form';
import * as arrayMethods from '@/_common/utils/array';
import componentWithDialog from '@/_common/components/component-with-dialog';
import JsonPerttyPrint from '@/_common/components/JsonPerttyPrint.vue';
import * as arrayMethods from 'demo-common/utils/array';
import componentWithDialog from 'demo-common/components/component-with-dialog';
import JsonPerttyPrint from 'demo-common/components/JsonPerttyPrint.vue';
import EditorToolBar from './EditorToolBar.vue';
import EditorHeader from './EditorHeader.vue';
Expand Down Expand Up @@ -443,7 +443,7 @@ export default {
}
</style>
<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
:root {
--site-top-height: 80px;
--tool-bar-width: 260px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
</script>

<style module>
@import "variable.css";
@import "demo-common/css/variable.css";
.box{
padding: 20px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { getDefaultFormState } from '@lljj/vue-json-schema-form';
import { genId } from '@/_common/utils/id';
import { genId } from 'demo-common/utils/id';

function isEmptyObject(obj) {
for (const key in obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by Liu.Jun on 2019/11/28 18:37.
*/

import { genId } from '@/_common/utils/id';
import { genId } from 'demo-common/utils/id';


export function deepFreeze(obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default {
</script>

<style module>
@import "variable.css";
@import "demo-common/css/variable.css";
.viewBox {
/*width: 1190px;*/
margin: 0 auto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "variable.css";
@import "demo-common/css/variable.css";

:root {
--color-skeleton-bg: var(--background-color-base);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
:global {
.el-form-item.is-error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
background-color: #FFFFFF;
width: 1920px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
padding: 20px;
background-color: #FFFFFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.content {
height: 260px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
/* 空壳 */
.emptyBox {
.imgItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
/* 空壳 */
.emptyBox {
.imgItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.content {
height: 269px;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
background-color: #FFFFFF;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
padding: 10px 0;
background: #FFFFFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
</script>

<style module>
@import 'variable.css';
@import 'demo-common/css/variable.css';
.box {
padding: 10px;
background: #FFFFFF;
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/demo-v2/src/pages/vue-editor/vue-editor.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "variable.css";
@import "demo-common/css/variable.css";

body{
background: #FFFFFF;
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/demo-v2/src/pages/vue-editor/vue-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// bootstrap
import '@/_common/bootstrap.js';
import 'demo-common/bootstrap.js';
import Vue from 'vue';
import elementUI from '@/_common/components/ElementUi/index.js';
import elementUI from 'demo-common/components/ElementUi/index.js';

import './vue-editor.css';
import router from './router';
Expand Down
22 changes: 22 additions & 0 deletions packages/demo/demo-v3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Vue3 Demo 演示相关

## 同时运行 `Playground/表单Schema生成器/活动编辑器`
```ssh
# Playground http://127.0.0.1:8800/
# 可视化表单Schema编辑器 http://127.0.0.1:8800/schema-generator.html
# (H5)活动编辑器 http://127.0.0.1:8800/vue-editor.html
yarn run demo:dev
```

## 单个运行(指定entry编译更快)
```ssh
# 只运行 Playground
yarn run demo:dev --dir=index
# 只运行 表单Schema生成器
yarn run demo:dev --dir=schema-generator
# 只运行(H5)活动编辑器
yarn run demo:dev --dir=vue-editor
```
2 changes: 1 addition & 1 deletion packages/lib/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['@lljj/babel-preset']
presets: ['@lljj/babel-preset-app']
};
6 changes: 4 additions & 2 deletions packages/lib/vue2/vue2-core/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vue-json-schema-form
Quickly building HTML form based on `Vue`, `JSON Schema` and `ElementUi`.
# @lljj/vue2-form-core
vue2 版本核心,可以基于此适配不同的ui库。

适配方案可参见 `vue2-form-element``vue2-form-iview3`

## License
Apache-2.0
4 changes: 2 additions & 2 deletions packages/lib/vue2/vue2-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@lljj/vue2-form-core",
"version": "0.5.0",
"description": "基于 Vue 、JsonSchema快速构建一个带完整校验的form表单,vue2版本基础框架",
"main": "JsonSchemaForm/index.js",
"module": "JsonSchemaForm/index.js",
"main": "src/index.js",
"module": "src/index.js",
"keywords": [
"vue",
"vuejs",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ import vueProps from './props';
import FormFooter from './components/FormFooter.js';

import SchemaField from './fields/SchemaField';
import fieldProps from './fields/props';

import './index.css';

export {
fieldProps,
SchemaField
};

export default function createForm(globalOptions = {}) {
return {
name: 'ElementForm',
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion packages/lib/vue2/vue2-form-element/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
## todo
# @lljj/vue-json-schema-form
vue2 elementUi jsonSchema 动态表单方案。

基于 @lljj/vue2-form-core

## License
Apache-2.0

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion packages/lib/vue2/vue2-form-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"babel-eslint": "^10.0.3",
"cssnano": "^4.1.10",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-vue": "^5.0.0",
"postcss-color-mod-function": "^3.0.3",
"postcss-cssnext": "^3.1.0",
"postcss-import": "^12.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/lib/vue2/vue2-form-element/scripts/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ module.exports = ({
}),
eslint(),
babel({
exclude: /node_modules/
exclude: /node_modules\/(?!(@lljj)\/).*/,
include: '**/**'
}),
postcss({
extract: config.extractcss
Expand Down
Loading

0 comments on commit d4ee166

Please sign in to comment.