starfish-form-custom 1.0.1 → 1.0.2

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.
@@ -3,11 +3,12 @@ import 'element-plus/es/components/base/style/css';
3
3
  import 'element-plus/es/components/form/style/css';
4
4
  import 'element-plus/es/components/form-item/style/css';
5
5
  import { defineComponent, getCurrentInstance, ref, onMounted, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, createCommentVNode, toRaw } from 'vue';
6
- import { _ as _export_sfc } from './main-afd364dc.mjs';
6
+ import { _ as _export_sfc } from './main-2d947b2c.mjs';
7
7
  import 'element-plus/es/components/icon/style/css';
8
8
  import 'element-plus/es/components/input/style/css';
9
9
  import 'element-plus/es/components/checkbox/style/css';
10
10
  import 'element-plus/es/components/tooltip/style/css';
11
+ import '@element-plus/icons-vue';
11
12
  import 'element-plus/es/components/loading/style/css';
12
13
  import 'element-plus/es/components/dropdown/style/css';
13
14
  import 'element-plus/es/components/dropdown-menu/style/css';
@@ -19,7 +20,6 @@ import 'element-plus/es/components/button/style/css';
19
20
  import 'element-plus/es/components/col/style/css';
20
21
  import 'element-plus/es/components/select/style/css';
21
22
  import 'element-plus/es/components/option/style/css';
22
- import '@element-plus/icons-vue';
23
23
  import 'element-plus/es/components/input-number/style/css';
24
24
  import 'element-plus/es/components/radio-group/style/css';
25
25
  import 'element-plus/es/components/radio-button/style/css';
@@ -299,7 +299,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
299
299
  ref_for: true,
300
300
  ref: "controlObj",
301
301
  onChange: _ctx.handleControlChange
302
- }, { ref_for: true }, _ctx.globalConfig, {
302
+ }, _ctx.globalConfig, {
303
303
  item: item2,
304
304
  data: _ctx.formResult || "{}",
305
305
  drag: false
@@ -307,11 +307,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
307
307
  ]),
308
308
  _: 2
309
309
  }, 1032, ["prop"])) : item2.show ? (openBlock(), createBlock(resolveDynamicComponent(item2.ControlType), mergeProps({
310
+ key: 1,
310
311
  ref_for: true,
311
312
  ref: "controlObj",
312
313
  onChange: _ctx.handleControlChange,
313
314
  key: item2.id
314
- }, { ref_for: true }, _ctx.globalConfig, {
315
+ }, _ctx.globalConfig, {
315
316
  item: item2,
316
317
  data: _ctx.formResult || "{}",
317
318
  drag: false
@@ -1,4 +1,4 @@
1
- export { D as Dynamicform, m as default } from './main-afd364dc.mjs';
1
+ export { D as Dynamicform, m as default } from './main-2d947b2c.mjs';
2
2
  import 'vue';
3
3
  import 'element-plus/es';
4
4
  import 'element-plus/es/components/base/style/css';
@@ -6,6 +6,7 @@ import 'element-plus/es/components/icon/style/css';
6
6
  import 'element-plus/es/components/input/style/css';
7
7
  import 'element-plus/es/components/checkbox/style/css';
8
8
  import 'element-plus/es/components/tooltip/style/css';
9
+ import '@element-plus/icons-vue';
9
10
  import 'element-plus/es/components/loading/style/css';
10
11
  import 'element-plus/es/components/dropdown/style/css';
11
12
  import 'element-plus/es/components/dropdown-menu/style/css';
@@ -17,7 +18,6 @@ import 'element-plus/es/components/button/style/css';
17
18
  import 'element-plus/es/components/col/style/css';
18
19
  import 'element-plus/es/components/select/style/css';
19
20
  import 'element-plus/es/components/option/style/css';
20
- import '@element-plus/icons-vue';
21
21
  import 'element-plus/es/components/input-number/style/css';
22
22
  import 'element-plus/es/components/radio-group/style/css';
23
23
  import 'element-plus/es/components/radio-button/style/css';
package/dist/style.css CHANGED
@@ -6,10 +6,10 @@
6
6
  .loading[data-v-2b901926] .el-loading-spinner .circular {
7
7
  width: 30px;
8
8
  height: 30px;
9
- }.control[data-v-2c747f4d] {
9
+ }.control[data-v-4ce4907e] {
10
10
  width: 240px;
11
11
  }
12
- .control > div[data-v-2c747f4d] {
12
+ .control > div[data-v-4ce4907e] {
13
13
  display: flex;
14
14
  align-items: center;
15
15
  }.starfish-editor .el-form-item__content,
@@ -1,3 +1,3 @@
1
- import type { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1
+ import type { DefineComponent, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
3
3
  export default _default;
@@ -0,0 +1,85 @@
1
+ import type { Ref } from '@vue/reactivity';
2
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
3
+ declare const _sfc_main: DefineComponent<{
4
+ item: {
5
+ type: ObjectConstructor;
6
+ default: () => {};
7
+ };
8
+ data: {
9
+ type: ObjectConstructor;
10
+ default: () => {};
11
+ };
12
+ drag: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ labelalign: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ labelWidth: {
21
+ type: NumberConstructor;
22
+ };
23
+ size: {
24
+ type: StringConstructor;
25
+ };
26
+ isForm: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ }, {
31
+ rules: {
32
+ funcName: {
33
+ required: boolean;
34
+ message: string;
35
+ trigger: string;
36
+ }[];
37
+ };
38
+ actionRef: Ref<any>;
39
+ action: any;
40
+ currentAction: any;
41
+ getField(methods: string): any;
42
+ onAction(type?: string | undefined): void;
43
+ onEditAction(key: any, type: string): void;
44
+ handleAction(item: any): void;
45
+ onSave(): void;
46
+ onCancel(): void;
47
+ copyAction(item: any): void;
48
+ deleteAction(item: any): void;
49
+ addAction(type?: string | undefined): void;
50
+ onConfirm(): void;
51
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
52
+ item: {
53
+ type: ObjectConstructor;
54
+ default: () => {};
55
+ };
56
+ data: {
57
+ type: ObjectConstructor;
58
+ default: () => {};
59
+ };
60
+ drag: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ labelalign: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ labelWidth: {
69
+ type: NumberConstructor;
70
+ };
71
+ size: {
72
+ type: StringConstructor;
73
+ };
74
+ isForm: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ }>>, {
79
+ drag: boolean;
80
+ data: Record<string, any>;
81
+ item: Record<string, any>;
82
+ labelalign: string;
83
+ isForm: boolean;
84
+ }>;
85
+ export default _sfc_main;
@@ -1,5 +1,7 @@
1
- import type { DefineComponent, ExtractPropTypes, PropType, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, App } from 'vue';
2
- export declare const Dynamicform: DefineComponent<ExtractPropTypes<{
1
+ import type { Ref } from '@vue/reactivity';
2
+ import type { DefineComponent, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
3
+ import { App } from "vue";
4
+ export declare const Dynamicform: DefineComponent<{
3
5
  allFormList: {
4
6
  type: PropType<any>;
5
7
  default(): never[];
@@ -12,14 +14,14 @@ export declare const Dynamicform: DefineComponent<ExtractPropTypes<{
12
14
  type: ObjectConstructor;
13
15
  default(): {};
14
16
  };
15
- }>, {
17
+ }, {
16
18
  rules: any;
17
- ruleForm: Ref<any, any>;
18
- controlObj: Ref<any, any>;
19
+ ruleForm: Ref<any>;
20
+ controlObj: Ref<any>;
19
21
  handleControlChange: () => void;
20
22
  reset: () => void;
21
23
  getValidate: () => Promise<unknown>;
22
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
24
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
23
25
  allFormList: {
24
26
  type: PropType<any>;
25
27
  default(): never[];
@@ -32,11 +34,11 @@ export declare const Dynamicform: DefineComponent<ExtractPropTypes<{
32
34
  type: ObjectConstructor;
33
35
  default(): {};
34
36
  };
35
- }>> & Readonly<{}>, {
37
+ }>>, {
36
38
  allFormList: any;
37
39
  formResult: Record<string, any>;
38
40
  globalConfig: Record<string, any>;
39
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
41
+ }>;
40
42
  declare const _default: {
41
43
  install: (app: App<any>) => void;
42
44
  };
@@ -1,5 +1,7 @@
1
- import type { DefineComponent, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
- declare const _sfc_main: DefineComponent<ExtractPropTypes<{
1
+ import type { Ref } from '@vue/reactivity';
2
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
3
+ import { PropType } from "vue";
4
+ declare const _sfc_main: DefineComponent<{
3
5
  allFormList: {
4
6
  type: PropType<any>;
5
7
  default(): never[];
@@ -12,14 +14,14 @@ declare const _sfc_main: DefineComponent<ExtractPropTypes<{
12
14
  type: ObjectConstructor;
13
15
  default(): {};
14
16
  };
15
- }>, {
17
+ }, {
16
18
  rules: any;
17
- ruleForm: Ref<any, any>;
18
- controlObj: Ref<any, any>;
19
+ ruleForm: Ref<any>;
20
+ controlObj: Ref<any>;
19
21
  handleControlChange: () => void;
20
22
  reset: () => void;
21
23
  getValidate: () => Promise<unknown>;
22
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
24
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
23
25
  allFormList: {
24
26
  type: PropType<any>;
25
27
  default(): never[];
@@ -32,9 +34,9 @@ declare const _sfc_main: DefineComponent<ExtractPropTypes<{
32
34
  type: ObjectConstructor;
33
35
  default(): {};
34
36
  };
35
- }>> & Readonly<{}>, {
37
+ }>>, {
36
38
  allFormList: any;
37
39
  formResult: Record<string, any>;
38
40
  globalConfig: Record<string, any>;
39
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
41
+ }>;
40
42
  export default _sfc_main;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starfish-form-custom",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "dist/starfish-form.mjs",
5
5
  "style": "dist/style.css",
6
6
  "module": "dist/starfish-form.mjs",
@@ -16,13 +16,13 @@
16
16
  <div class="inputItem">
17
17
  <span>文本:</span>
18
18
  <div>
19
- <el-input v-model="items.label" size="small" @input="getChangeValue(items)" />
19
+ <el-input v-model="items.label" size="default" @input="getChangeValue(items)" />
20
20
  </div>
21
21
  </div>
22
22
  <div class="inputItem">
23
23
  <span>值:</span>
24
24
  <div>
25
- <el-input v-model="items.value" size="small" @input="getChangeValue(items)" />
25
+ <el-input v-model="items.value" size="default" @input="getChangeValue(items)" />
26
26
  </div>
27
27
  </div>
28
28
  </div>
@@ -70,6 +70,8 @@
70
70
  return maxId + 1;
71
71
  }
72
72
  return {
73
+ Plus,
74
+ SemiSelect,
73
75
  getChangeValue(sitem: any) {
74
76
  const data: any = props.data;
75
77
  const item: any = props.item;
@@ -16,22 +16,22 @@
16
16
  <div class="inputItem">
17
17
  <span>文本:</span>
18
18
  <div>
19
- <el-input v-model="items.label" size="small" @input="getChangeValue()" />
19
+ <el-input v-model="items.label" size="default" @input="getChangeValue()" />
20
20
  </div>
21
21
  </div>
22
22
  <div class="inputItem">
23
23
  <span>值:</span>
24
24
  <div>
25
- <el-input v-model="items.value" size="small" @input="getChangeValue()" />
25
+ <el-input v-model="items.value" size="default" @input="getChangeValue()" />
26
26
  </div>
27
27
  </div>
28
28
  </div>
29
29
  <div class="keyValueControl">
30
30
  <div class="add" @click="addItem(index)">
31
- <i class="iconfontui icon-zengjia"></i>
31
+ <el-icon :size="12" style="color: #fff"><Plus /></el-icon>
32
32
  </div>
33
33
  <div class="remove" @click="removeItem(index)">
34
- <i class="iconfontui icon-shanchu"></i>
34
+ <el-icon :size="12" style="color: #fff"><SemiSelect /></el-icon>
35
35
  </div>
36
36
  <div class="top" @click="handleTop(index)">
37
37
  <i class="iconfontui icon-shangyi"></i>
@@ -46,6 +46,7 @@
46
46
  </template>
47
47
  <script lang="ts">
48
48
  import { defineComponent } from "vue";
49
+ import { Plus, SemiSelect } from '@element-plus/icons-vue';
49
50
  import { getFormConfig } from "../utils/fieldConfig";
50
51
  import fieldProps from "../utils/fieldProps";
51
52
  export default defineComponent({
@@ -69,6 +70,8 @@
69
70
  return maxId + 1;
70
71
  }
71
72
  return {
73
+ Plus,
74
+ SemiSelect,
72
75
  getChangeValue() {
73
76
  const data: any = props.data;
74
77
  const item: any = props.item;
@@ -87,13 +87,13 @@
87
87
  <el-main class="event-script-main">
88
88
  <el-container class="is-vertical">
89
89
  <header class="action-header event-script-main-header">
90
- <el-button type="primary" @click="onConfirm" size="small"
90
+ <el-button type="primary" @click="onConfirm" size="default"
91
91
  >确定</el-button
92
92
  >
93
- <el-button type="primary" @click="onSave" size="small"
93
+ <el-button type="primary" @click="onSave" size="default"
94
94
  >保存</el-button
95
95
  >
96
- <el-button @click="onCancel" size="small">取消</el-button>
96
+ <el-button @click="onCancel" size="default">取消</el-button>
97
97
  </header>
98
98
  <el-main v-if="currentAction" class="func_main">
99
99
  <el-scrollbar>
@@ -5,12 +5,12 @@
5
5
  </div>
6
6
  <div class="control" :style="{ marginLeft: labelalign != 'top' ? labelWidth + 'px' : '' }">
7
7
  <el-row v-for="(items, index) in data[item.data.fieldName]" :key="index" :gutter="10" style="margin-bottom: 10px;">
8
- <el-input-number v-model="items.span" :min="0" size="small" controls-position="right" />
9
- <el-button type="danger" circle size="small" @click="onDelete(index)" style="margin-left: 5px;">
8
+ <el-input-number v-model="items.span" :min="0" size="default" controls-position="right" />
9
+ <el-button type="danger" circle size="default" @click="onDelete(index)" style="margin-left: 5px;">
10
10
  <el-icon><Delete /></el-icon>
11
11
  </el-button>
12
12
  </el-row>
13
- <el-button plain @click="onAdd" size="small">添加</el-button>
13
+ <el-button plain @click="onAdd" size="default">添加</el-button>
14
14
  </div>
15
15
  </div>
16
16
  </template>
@@ -16,10 +16,10 @@
16
16
  <i class="iconfontui icon-bars handle"></i>
17
17
  </el-col>
18
18
  <el-col class="list-group-item" :span="14">
19
- <el-input size="small" v-model="element.name" clearable />
19
+ <el-input size="default" v-model="element.name" clearable />
20
20
  </el-col>
21
21
  <el-col :span="2">
22
- <el-button type="danger" circle size="small" @click="removeAt(index)">
22
+ <el-button type="danger" circle size="default" @click="removeAt(index)">
23
23
  <el-icon><Delete /></el-icon>
24
24
  </el-button>
25
25
  </el-col>
@@ -27,7 +27,7 @@
27
27
  </template>
28
28
  </draggable>
29
29
  </el-col>
30
- <el-button type="primary" text @click="add" size="small">添加面板</el-button>
30
+ <el-button type="primary" text @click="add" size="default">添加面板</el-button>
31
31
  </el-row>
32
32
  </div>
33
33
  </div>
@@ -9,11 +9,11 @@
9
9
  </div>
10
10
  <div class="control" :style="{marginLeft: labelalign != 'top'?labelWidth + 'px': ''}">
11
11
  <div v-if="drag">
12
- <el-input v-model="item.data.default" :placeholder="item.data.placeholder" size="small" style="width: 150px;"/>
12
+ <el-input v-model="item.data.default" :placeholder="item.data.placeholder" size="default" style="width: 150px;"/>
13
13
  <el-color-picker v-model="item.data.default" show-alpha :size="size"></el-color-picker>
14
14
  </div>
15
15
  <div v-if="!drag">
16
- <el-input v-model="data[item.data.fieldName]" :placeholder="item.data.placeholder" size="small" style="width: 150px;"/>
16
+ <el-input v-model="data[item.data.fieldName]" :placeholder="item.data.placeholder" size="default" style="width: 150px;"/>
17
17
  <el-color-picker v-model="data[item.data.fieldName]" show-alpha :size="size"></el-color-picker>
18
18
  </div>
19
19
  </div>