Skip to content

Commit 245fd2c

Browse files
committed
feat(cdn): 替换cdn链接
1 parent e93294f commit 245fd2c

File tree

6 files changed

+136
-6
lines changed

6 files changed

+136
-6
lines changed

packages/demo/demo-v2/src/pages/index/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<body>
1717
<div id="app"></div>
1818
<script src="//cdn.jsdelivr.net/npm/@lljj/polyfill@0.1.1/dist/polyfill.umd.min.js"></script>
19-
<script src="//cdn.bootcss.com/vue/2.6.10/vue.js"></script>
19+
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
2020
<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js"></script>
21-
<script src="//cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js"></script>
21+
<script src="//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js"></script>
2222
<script src="//cdn.jsdelivr.net/npm/monaco-editor@0.20.0/min/vs/loader.js"></script>
2323
<script>
2424
require.config({ paths: { 'vs': '//cdn.jsdelivr.net/npm/monaco-editor@0.20.0/min/vs' }});

packages/demo/demo-v2/src/pages/schema-generator/schema-generator.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<body>
1111
<div id="app"></div>
1212
<script src="//cdn.jsdelivr.net/npm/@lljj/polyfill@0.1.1/dist/polyfill.umd.min.js"></script>
13-
<script src="//cdn.bootcss.com/vue/2.6.10/vue.js"></script>
14-
<script src="//cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js"></script>
13+
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
14+
<script src="//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js"></script>
1515
<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.0/lib/index.js"></script>
1616
</body>
1717
</html>

packages/demo/demo-v2/src/pages/vue-editor/views/editor/Editor.vue

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2+
<TestDemo v-if="false"></TestDemo>
23
<div
4+
v-else
35
v-loading="loading"
46
:class="{
57
[$style.previewBox]: isPreview
@@ -136,6 +138,7 @@ import * as arrayMethods from 'demo-common/utils/array';
136138
import componentWithDialog from 'demo-common/components/component-with-dialog';
137139
138140
import JsonPerttyPrint from 'demo-common/components/JsonPerttyPrint.vue';
141+
import TestDemo from './TestDemo';
139142
import EditorToolBar from './EditorToolBar.vue';
140143
import EditorHeader from './EditorHeader.vue';
141144
import ViewComponentWrap from './components/ViewComponentWrap.vue';
@@ -157,6 +160,7 @@ export default {
157160
name: 'Editor',
158161
components: {
159162
...components,
163+
TestDemo,
160164
VueElementForm,
161165
Draggable,
162166
EditorToolBar,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<template>
2+
<div
3+
v-if="true"
4+
class="demo-wrapper"
5+
>
6+
<VueElementForm
7+
v-model="formData"
8+
class="demo-form-box"
9+
:schema="schema"
10+
@on-submit="handleSubmit"
11+
>
12+
</VueElementForm>
13+
</div>
14+
</template>
15+
16+
<script>
17+
import VueElementForm from '@lljj/vue-json-schema-form/src/index';
18+
19+
export default {
20+
components: {
21+
VueElementForm
22+
},
23+
data() {
24+
return {
25+
formData: {
26+
item: [
27+
{
28+
text: '作者'
29+
},
30+
{
31+
imgUrl: '',
32+
step: 1,
33+
text: '机构'
34+
}
35+
]
36+
},
37+
schema: {
38+
title: 'DEMO',
39+
type: 'object',
40+
properties: {
41+
item: {
42+
title: '左侧点击栏目',
43+
type: 'array',
44+
required: [],
45+
minItems: 1,
46+
items: {
47+
title: '栏目类型',
48+
type: 'object',
49+
anyOf: [
50+
{
51+
title: '唯一可点击栏目',
52+
required: ['text', 'imgUrl', 'step'],
53+
properties: {
54+
text: {
55+
type: 'string',
56+
title: '栏目名称'
57+
},
58+
imgUrl: {
59+
title: '点击弹出图',
60+
type: 'string',
61+
},
62+
step: {
63+
title: '第一步',
64+
type: 'number',
65+
const: 1,
66+
default: 1,
67+
'ui:disabled': true,
68+
'ui:hidden': true
69+
}
70+
}
71+
},
72+
{
73+
title: '其他栏目',
74+
required: ['text'],
75+
properties: {
76+
text: {
77+
type: 'string',
78+
title: '栏目名称'
79+
}
80+
}
81+
}
82+
]
83+
}
84+
}
85+
}
86+
},
87+
};
88+
},
89+
created() {
90+
// 初始数据
91+
// this.formData = {
92+
// item: [
93+
// {
94+
// text: '作者'
95+
// },
96+
// {
97+
// imgUrl: '',
98+
// step: 1,
99+
// text: '机构'
100+
// }
101+
// ]
102+
// };
103+
},
104+
methods: {
105+
handleSubmit(formData) {
106+
debugger;
107+
}
108+
}
109+
};
110+
</script>
111+
112+
113+
<style scoped>
114+
.demo-wrapper {
115+
z-index: 1000;
116+
position: fixed;
117+
width: 100%;
118+
height: 100%;
119+
background: #FFFFFF;
120+
}
121+
.demo-form-box {
122+
margin: 0 auto;
123+
width: 600px;
124+
}
125+
</style>

packages/demo/demo-v2/src/pages/vue-editor/vue-editor.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<body>
1111
<div id="app"></div>
1212
<script src="//cdn.jsdelivr.net/npm/@lljj/polyfill@0.1.1/dist/polyfill.umd.min.js"></script>
13-
<script src="//cdn.bootcss.com/vue/2.6.10/vue.js"></script>
14-
<script src="//cdn.bootcss.com/vue-router/3.1.3/vue-router.min.js"></script>
13+
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
14+
<script src="//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js"></script>
1515
<script src="//cdn.jsdelivr.net/npm/element-ui@2.13.0/lib/index.js"></script>
1616
</body>
1717
</html>

packages/lib/vue2/vue2-core/src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default function createForm(globalOptions = {}) {
4242
data() {
4343
const formData = getDefaultFormState(this.$props.schema, this.$props.value, this.$props.schema);
4444

45+
debugger;
4546
// 保持v-model双向数据及时性
4647
this.emitFormDataChange(formData, this.value);
4748

0 commit comments

Comments
 (0)