starfish-editor-custom 1.0.1 → 1.0.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/components.d.ts +2 -0
- package/dist/ConditionModule.js +62 -62
- package/dist/ConditionSelect.js +32 -32
- package/dist/CustomDialog.js +3 -3
- package/dist/formStyle.js +25 -33
- package/dist/globalFormList.js +2 -2
- package/dist/jsonCode.js +4 -3
- package/dist/jsonEditor.js +3 -3
- package/dist/main.js +270 -326
- package/dist/starfish-editor.es.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/{common → editor/src/common}/ConditionSelect/ConditionGroup.vue.d.ts +18 -0
- package/dist/types/{common → editor/src/common}/ConditionSelect/ConditionModule.vue.d.ts +17 -0
- package/dist/types/{common → editor/src/common}/ConditionSelect/ConditionTanc.vue.d.ts +30 -0
- package/dist/types/{common → editor/src/common}/ConditionSelect.vue.d.ts +14 -36
- package/dist/types/editor/src/common/CustomDialog.vue.d.ts +26 -0
- package/dist/types/editor/src/common/Loading.vue.d.ts +3 -0
- package/dist/types/editor/src/common/jsonCode.vue.d.ts +15 -0
- package/dist/types/editor/src/components/ComponentList.vue.d.ts +3 -0
- package/dist/types/editor/src/components/FormPreview.vue.d.ts +23 -0
- package/dist/types/editor/src/components/Nav.vue.d.ts +9 -0
- package/dist/types/editor/src/components/PropsPanel.vue.d.ts +45 -0
- package/dist/types/{components → editor/src/components}/Shape.vue.d.ts +10 -9
- package/dist/types/editor/src/components/Workspace.vue.d.ts +23 -0
- package/dist/types/editor/src/components/globalFormList.vue.d.ts +7 -0
- package/dist/types/editor/src/components/jsonEditor.vue.d.ts +7 -0
- package/dist/types/{controller → editor/src/controller}/action.d.ts +1 -1
- package/dist/types/{controller → editor/src/controller}/form.d.ts +1 -1
- package/dist/types/{controller → editor/src/controller}/history.d.ts +1 -1
- package/dist/types/{controller → editor/src/controller}/shortcut.d.ts +1 -1
- package/dist/types/{controller → editor/src/controller}/ui.d.ts +1 -1
- package/dist/types/editor/src/layouts/ControlEditSize.vue.d.ts +11 -0
- package/dist/types/editor/src/layouts/Framework.vue.d.ts +21 -0
- package/dist/types/editor/src/layouts/Resizer.vue.d.ts +14 -0
- package/dist/types/editor/src/layouts/ShortcutKey.vue.d.ts +8 -0
- package/dist/types/editor/src/starfish-editor.vue.d.ts +103 -0
- package/dist/types/{type.d.ts → editor/src/type.d.ts} +8 -8
- package/dist/types/{utils → editor/src/utils}/formKeycon.d.ts +1 -1
- package/dist/types/starfish-editor.d.ts +2 -2
- package/package.json +55 -55
- package/src/common/ConditionSelect/ConditionGroup.vue +3 -3
- package/src/common/ConditionSelect/ConditionTanc.vue +1 -1
- package/src/common/ConditionSelect.vue +1 -1
- package/src/common/formJson.ts +34 -34
- package/src/common/formStyle.vue +5 -0
- package/src/common/jsonCode.vue +8 -2
- package/src/components/ComponentList.vue +6 -2
- package/src/components/FormPreview.vue +1 -1
- package/src/components/NavList.vue +6 -6
- package/src/components/PropsPanel.vue +1 -1
- package/src/components/Workspace.vue +1 -0
- package/src/main.ts +2 -2
- package/src/styles/component-list.scss +7 -3
- package/src/type.ts +1 -1
- package/stats.html +1439 -104
- package/dist/types/common/CustomDialog.vue.d.ts +0 -25
- package/dist/types/common/Loading.vue.d.ts +0 -3
- package/dist/types/common/formStyle.vue.d.ts +0 -139
- package/dist/types/common/jsonCode.vue.d.ts +0 -110
- package/dist/types/components/ComponentList.vue.d.ts +0 -32
- package/dist/types/components/FormPreview.vue.d.ts +0 -25
- package/dist/types/components/Nav.vue.d.ts +0 -9
- package/dist/types/components/PropsPanel.vue.d.ts +0 -53
- package/dist/types/components/Workspace.vue.d.ts +0 -22
- package/dist/types/components/globalFormList.vue.d.ts +0 -6
- package/dist/types/components/jsonEditor.vue.d.ts +0 -6
- package/dist/types/layouts/ControlEditSize.vue.d.ts +0 -17
- package/dist/types/layouts/Framework.vue.d.ts +0 -33
- package/dist/types/layouts/Resizer.vue.d.ts +0 -13
- package/dist/types/layouts/ShortcutKey.vue.d.ts +0 -8
- package/dist/types/starfish-editor.vue.d.ts +0 -109
- /package/dist/types/{common → editor/src/common}/formJson.d.ts +0 -0
- /package/dist/types/{main.d.ts → editor/src/main.d.ts} +0 -0
- /package/dist/types/{shims-vue.d.ts → editor/src/shims-vue.d.ts} +0 -0
- /package/dist/types/{utils → editor/src/utils}/_.d.ts +0 -0
- /package/dist/types/{utils → editor/src/utils}/shortcutKey.d.ts +0 -0
- /package/dist/types/{utils → editor/src/utils}/vm.d.ts +0 -0
package/src/common/formJson.ts
CHANGED
|
@@ -32,40 +32,40 @@ const globalFormList = [
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
35
|
+
// {
|
|
36
|
+
// ControlType: "RadioGroup",
|
|
37
|
+
// nameCn: "选择器",
|
|
38
|
+
// data: {
|
|
39
|
+
// fieldName: "size",
|
|
40
|
+
// label: "组件尺寸",
|
|
41
|
+
// showRule: "{}",
|
|
42
|
+
// rule: "[]",
|
|
43
|
+
// itemConfig: {
|
|
44
|
+
// value: "small",
|
|
45
|
+
// items: [
|
|
46
|
+
// {
|
|
47
|
+
// label: "large",
|
|
48
|
+
// value: "large",
|
|
49
|
+
// select: false,
|
|
50
|
+
// id: 1,
|
|
51
|
+
// },
|
|
52
|
+
// {
|
|
53
|
+
// label: "default",
|
|
54
|
+
// value: "default",
|
|
55
|
+
// select: false,
|
|
56
|
+
// id: 2,
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// label: "small",
|
|
60
|
+
// value: "small",
|
|
61
|
+
// select: true,
|
|
62
|
+
// id: 3,
|
|
63
|
+
// },
|
|
64
|
+
// ],
|
|
65
|
+
// id: 3,
|
|
66
|
+
// },
|
|
67
|
+
// },
|
|
68
|
+
// },
|
|
69
69
|
{
|
|
70
70
|
ControlType: "InputNumber",
|
|
71
71
|
data: {
|
package/src/common/formStyle.vue
CHANGED
package/src/common/jsonCode.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@input="onUpdateValue($event.target.innerText)"
|
|
6
6
|
placeholder="json导入"
|
|
7
7
|
mode="text/json"
|
|
8
|
-
:style="{ height: '400px' }"
|
|
8
|
+
:style="{ height: '400px', 'margin-bottom': '16px' }"
|
|
9
9
|
:extensions="extensions"
|
|
10
10
|
/>
|
|
11
11
|
</div>
|
|
@@ -42,4 +42,10 @@ export default defineComponent({
|
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
|
-
</script>
|
|
45
|
+
</script>
|
|
46
|
+
<style lang="scss">
|
|
47
|
+
.ͼ2 .cm-gutters {
|
|
48
|
+
background: #133F63;
|
|
49
|
+
border-right: 1px solid #1C4E7E;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
v-model="filterContent"
|
|
8
8
|
/>
|
|
9
9
|
</div>
|
|
10
|
-
<
|
|
10
|
+
<div class="group-name">
|
|
11
|
+
<el-button text v-if="newcomponentlist.length > 0">基础控件</el-button>
|
|
12
|
+
</div>
|
|
11
13
|
<draggable
|
|
12
14
|
class="dragArea list-group"
|
|
13
15
|
:list="newcomponentlist"
|
|
@@ -28,7 +30,9 @@
|
|
|
28
30
|
</div>
|
|
29
31
|
</template>
|
|
30
32
|
</draggable>
|
|
31
|
-
<
|
|
33
|
+
<div class="group-name">
|
|
34
|
+
<el-button text v-if="layoutList.length > 0">布局控件</el-button>
|
|
35
|
+
</div>
|
|
32
36
|
<draggable
|
|
33
37
|
class="dragArea list-group"
|
|
34
38
|
:list="layoutList"
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
watch,
|
|
74
74
|
} from "vue";
|
|
75
75
|
import formStore from "@/controller/form";
|
|
76
|
-
import { Dynamicform } from "starfish-form";
|
|
76
|
+
import { Dynamicform } from "starfish-form-custom";
|
|
77
77
|
import uiControl from "@/controller/ui";
|
|
78
78
|
import Clipboard from "clipboard";
|
|
79
79
|
// import { json } from "@codemirror/lang-json";
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
@click="handleForward()"
|
|
99
99
|
></span>
|
|
100
100
|
</el-tooltip>
|
|
101
|
-
<!-- <el-button text @click="handleFormSave()" size="
|
|
102
|
-
<el-button text @click="handleFormPre()" size="
|
|
103
|
-
<el-button text @click="handleFullScreen()" size="
|
|
104
|
-
<el-button text @click="handleClear()" size="
|
|
105
|
-
<el-button text @click="handleBack()" size="
|
|
106
|
-
<el-button text @click="handleForward()" size="
|
|
101
|
+
<!-- <el-button text @click="handleFormSave()" size="default" :disabled="clearIsDisable">保存</el-button>
|
|
102
|
+
<el-button text @click="handleFormPre()" size="default" :disabled="clearIsDisable">预览</el-button>
|
|
103
|
+
<el-button text @click="handleFullScreen()" size="default">全屏/非全屏</el-button>
|
|
104
|
+
<el-button text @click="handleClear()" size="default" :disabled="clearIsDisable">清空</el-button>
|
|
105
|
+
<el-button text @click="handleBack()" size="default" :disabled="historyIndex == -1">后退</el-button>
|
|
106
|
+
<el-button text @click="handleForward()" size="default" :disabled="historyIndex == historyLen - 1">前进</el-button> -->
|
|
107
107
|
</div>
|
|
108
108
|
<div class="pageBtn">
|
|
109
109
|
<div class="el-button-group" v-if="btnIsShow('right', 'viewport')">
|
package/src/main.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { App, defineAsyncComponent } from "vue";
|
|
|
2
2
|
import "element-plus/dist/index.css";
|
|
3
3
|
import "@/styles/index.scss";
|
|
4
4
|
import "jsoneditor/dist/jsoneditor.min.css";
|
|
5
|
-
import StarfishForm from "starfish-form";
|
|
5
|
+
import StarfishForm from "starfish-form-custom";
|
|
6
6
|
import vm from "./utils/vm";
|
|
7
7
|
import flex from "./utils/_";
|
|
8
|
-
import "starfish-form/dist/style.css";
|
|
8
|
+
import "starfish-form-custom/dist/style.css";
|
|
9
9
|
import StarfishEditor from "./starfish-editor.vue";
|
|
10
10
|
import Loading from "@/common/Loading.vue";
|
|
11
11
|
export default {
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
.filter {
|
|
7
7
|
padding: 12px;
|
|
8
8
|
}
|
|
9
|
+
.group-name {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
}
|
|
9
13
|
.list-group {
|
|
10
14
|
// display: flex;
|
|
11
15
|
// flex-wrap: wrap;
|
|
@@ -24,8 +28,8 @@
|
|
|
24
28
|
width: 100px;
|
|
25
29
|
.form-item {
|
|
26
30
|
width: 96px;
|
|
27
|
-
height:
|
|
28
|
-
line-height:
|
|
31
|
+
height: 32px;
|
|
32
|
+
line-height: 32px;
|
|
29
33
|
border: 1px solid #1b6b9b;
|
|
30
34
|
padding: 5px 8px;
|
|
31
35
|
display: flex;
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
.item-text {
|
|
48
|
-
height:
|
|
52
|
+
height: 32px;
|
|
49
53
|
// display: flex;
|
|
50
54
|
align-items: center;
|
|
51
55
|
font-size: 12px;
|
package/src/type.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { hisContrl } from "./controller/history";
|
|
|
3
3
|
import type { formContrl } from "./controller/form";
|
|
4
4
|
import type { ActionForm } from "./controller/action";
|
|
5
5
|
import type { shortCut } from "./controller/shortcut";
|
|
6
|
-
import type { FormConfig, fields } from "starfish-form/src/main";
|
|
6
|
+
import type { FormConfig, fields } from "starfish-form-custom/src/main";
|
|
7
7
|
/**
|
|
8
8
|
* 组件名称枚举
|
|
9
9
|
*/
|