star-horse-lowcode 2.7.65 → 2.7.67
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/README.md +3 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +597 -188
- package/dist/types/index.d.ts +30 -0
- package/package.json +3 -3
- package/.env.development +0 -3
- package/.env.production +0 -3
- package/.eslintrc-auto-import.json +0 -77
- package/.gitignore +0 -27
- package/.idea/.gitignore +0 -5
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/testcode.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/workspace.xml +0 -207
- package/.npmignore +0 -21
- package/.prettierignore +0 -26
- package/auto-imports.d.ts +0 -137
- package/components.d.ts +0 -189
- package/eslint.config.js +0 -37
- package/index.html +0 -14
- package/package-lock.json +0 -8276
- package/prettier.config.js +0 -20
- package/public/logo.svg +0 -660
- package/src/App.vue +0 -11
- package/src/api/date_utils.ts +0 -219
- package/src/api/finger_utils.ts +0 -71
- package/src/api/form_utils.ts +0 -281
- package/src/api/jquery.min.js +0 -2
- package/src/api/pcas-code.json +0 -1
- package/src/api/settings.ts +0 -81
- package/src/api/star_horse_apis.ts +0 -196
- package/src/api/star_horse_utils.ts +0 -797
- package/src/api/system.ts +0 -351
- package/src/api/user_func.ts +0 -147
- package/src/api/valid_utils.ts +0 -165
- package/src/assets/css/index.scss +0 -908
- package/src/assets/icons.css +0 -574
- package/src/assets/star-horse-icons.woff +0 -0
- package/src/components/comp/ShDynamicForm.vue +0 -160
- package/src/components/comp/ShForm.vue +0 -30
- package/src/components/comp/ShTableListColumn.vue +0 -61
- package/src/components/comp/StarHorseDataSelector.vue +0 -139
- package/src/components/comp/StarHorseDataView.vue +0 -110
- package/src/components/comp/StarHorseDataViewItems.vue +0 -61
- package/src/components/comp/StarHorseDataViewTable.vue +0 -102
- package/src/components/comp/StarHorseDialog.vue +0 -383
- package/src/components/comp/StarHorseDraggable.vue +0 -401
- package/src/components/comp/StarHorseForm.vue +0 -458
- package/src/components/comp/StarHorseFormItem.vue +0 -82
- package/src/components/comp/StarHorseFormList.vue +0 -516
- package/src/components/comp/StarHorseFormTable.vue +0 -56
- package/src/components/comp/StarHorseIcon.vue +0 -76
- package/src/components/comp/StarHorseItem.vue +0 -302
- package/src/components/comp/StarHorseJsonEditor.vue +0 -115
- package/src/components/comp/StarHorsePopover.vue +0 -66
- package/src/components/comp/StarHorseSearchComp.vue +0 -253
- package/src/components/comp/StarHorseStaticTable.vue +0 -395
- package/src/components/comp/StarHorseTableColumn.vue +0 -249
- package/src/components/comp/StarHorseTableComp.vue +0 -1193
- package/src/components/comp/StarHorseTableViewColumn.vue +0 -61
- package/src/components/comp/StarHorseTree.vue +0 -494
- package/src/components/comp/index.ts +0 -22
- package/src/components/comp/items/UTableColumn.vue +0 -65
- package/src/components/comp/items/boxItem.vue +0 -98
- package/src/components/comp/items/callitem.ts +0 -9
- package/src/components/comp/items/cardItem.vue +0 -152
- package/src/components/comp/items/collapseItem.vue +0 -134
- package/src/components/comp/items/dytableItem.vue +0 -135
- package/src/components/comp/items/otherItem.vue +0 -65
- package/src/components/comp/items/tabItem.vue +0 -155
- package/src/components/comp/items/tabPanelItem.vue +0 -110
- package/src/components/comp/items/tableColumn.vue +0 -129
- package/src/components/comp/items/tableItem.vue +0 -97
- package/src/components/comp/items/tablebtn.vue +0 -158
- package/src/components/comp/items/viewBoxItem.vue +0 -55
- package/src/components/comp/items/viewCardItem.vue +0 -47
- package/src/components/comp/items/viewCollapseItem.vue +0 -71
- package/src/components/comp/items/viewDytableItem.vue +0 -77
- package/src/components/comp/items/viewOtherItem.vue +0 -55
- package/src/components/comp/items/viewTabItem.vue +0 -77
- package/src/components/comp/items/viewTabPanelItem.vue +0 -54
- package/src/components/comp/items/viewTableItem.vue +0 -74
- package/src/components/comp/selfcomp.ts +0 -9
- package/src/components/comp/utils/DataPicker.vue +0 -302
- package/src/components/comp/utils/DataTag.vue +0 -51
- package/src/components/cron/Crontab-Day.vue +0 -230
- package/src/components/cron/Crontab-Hour.vue +0 -165
- package/src/components/cron/Crontab-Min.vue +0 -166
- package/src/components/cron/Crontab-Month.vue +0 -166
- package/src/components/cron/Crontab-Result.vue +0 -615
- package/src/components/cron/Crontab-Second.vue +0 -185
- package/src/components/cron/Crontab-Week.vue +0 -208
- package/src/components/cron/Crontab-Year.vue +0 -183
- package/src/components/cron/Crontab.vue +0 -474
- package/src/components/enums/ModuleEnums.ts +0 -10
- package/src/components/enums/ServiceEnums.ts +0 -18
- package/src/components/formcomp/container/box-container.vue +0 -162
- package/src/components/formcomp/container/callitem.ts +0 -9
- package/src/components/formcomp/container/card-container.vue +0 -170
- package/src/components/formcomp/container/collapse-container.vue +0 -133
- package/src/components/formcomp/container/dytable-col.vue +0 -448
- package/src/components/formcomp/container/dytable-container.vue +0 -57
- package/src/components/formcomp/container/dytableUtils.ts +0 -358
- package/src/components/formcomp/container/group-box-container.vue +0 -331
- package/src/components/formcomp/container/index.ts +0 -6
- package/src/components/formcomp/container/tab-container.vue +0 -153
- package/src/components/formcomp/container/table-container.vue +0 -249
- package/src/components/formcomp/items/allitem.ts +0 -9
- package/src/components/formcomp/items/area-item.vue +0 -116
- package/src/components/formcomp/items/audio-item.vue +0 -163
- package/src/components/formcomp/items/autocomplete-item.vue +0 -118
- package/src/components/formcomp/items/barcode-item.vue +0 -87
- package/src/components/formcomp/items/base-json-item.vue +0 -207
- package/src/components/formcomp/items/button-item.vue +0 -228
- package/src/components/formcomp/items/cascade-item.vue +0 -113
- package/src/components/formcomp/items/checkbox-item.vue +0 -97
- package/src/components/formcomp/items/color-item.vue +0 -70
- package/src/components/formcomp/items/cron-item.vue +0 -115
- package/src/components/formcomp/items/datetime-item.vue +0 -99
- package/src/components/formcomp/items/depart-item.vue +0 -51
- package/src/components/formcomp/items/dialog-input-item.vue +0 -207
- package/src/components/formcomp/items/divider-item.vue +0 -66
- package/src/components/formcomp/items/html-item.vue +0 -65
- package/src/components/formcomp/items/htmleditor-item.vue +0 -104
- package/src/components/formcomp/items/icon-item.vue +0 -195
- package/src/components/formcomp/items/image-item.vue +0 -247
- package/src/components/formcomp/items/index.ts +0 -44
- package/src/components/formcomp/items/input-item.vue +0 -150
- package/src/components/formcomp/items/json-array-item.vue +0 -67
- package/src/components/formcomp/items/json-item.vue +0 -66
- package/src/components/formcomp/items/markdown-item.vue +0 -77
- package/src/components/formcomp/items/number-item.vue +0 -94
- package/src/components/formcomp/items/number-range-item.vue +0 -278
- package/src/components/formcomp/items/page-select-item.vue +0 -407
- package/src/components/formcomp/items/password-item.vue +0 -71
- package/src/components/formcomp/items/qrcode-item.vue +0 -84
- package/src/components/formcomp/items/radio-item.vue +0 -112
- package/src/components/formcomp/items/rate-item.vue +0 -68
- package/src/components/formcomp/items/select-item.vue +0 -133
- package/src/components/formcomp/items/signature-item.vue +0 -216
- package/src/components/formcomp/items/slider-item.vue +0 -68
- package/src/components/formcomp/items/starhorse-form-item.vue +0 -334
- package/src/components/formcomp/items/switch-item.vue +0 -77
- package/src/components/formcomp/items/tag-item.vue +0 -77
- package/src/components/formcomp/items/text-item.vue +0 -75
- package/src/components/formcomp/items/textarea-item.vue +0 -85
- package/src/components/formcomp/items/time-item.vue +0 -77
- package/src/components/formcomp/items/time-picker-item.vue +0 -74
- package/src/components/formcomp/items/transfer-item.vue +0 -93
- package/src/components/formcomp/items/tselect-item.vue +0 -121
- package/src/components/formcomp/items/unknown-item.vue +0 -51
- package/src/components/formcomp/items/upload-item.vue +0 -189
- package/src/components/formcomp/items/user-item.vue +0 -177
- package/src/components/formcomp/items/usercomp-item.vue +0 -85
- package/src/components/formcomp/items/view-markdown-item.vue +0 -77
- package/src/components/formcomp/utils/EditDataDialog.vue +0 -67
- package/src/components/formcomp/utils/FieldList.vue +0 -125
- package/src/components/formcomp/utils/ItemRelationEventUtils.ts +0 -284
- package/src/components/help.vue +0 -31
- package/src/components/menu/MenuItem.vue +0 -95
- package/src/components/menu/SubMenu.vue +0 -68
- package/src/components/menu/SubSystemMenu.vue +0 -142
- package/src/components/register.ts +0 -24
- package/src/components/system/ContentMenu.vue +0 -260
- package/src/components/system/StarHorseButtonList.vue +0 -344
- package/src/components/system/StarHorseMenu.vue +0 -97
- package/src/components/system/StarHorseSvg.vue +0 -62
- package/src/components/system/SystemComp.ts +0 -9
- package/src/components/system/index.ts +0 -4
- package/src/components/types/ApiUrls.ts +0 -168
- package/src/components/types/BtnAction.ts +0 -51
- package/src/components/types/BtnAuth.ts +0 -43
- package/src/components/types/CompInfo.ts +0 -81
- package/src/components/types/DialogProps.ts +0 -55
- package/src/components/types/DyCompField.ts +0 -23
- package/src/components/types/DynamicNode.ts +0 -42
- package/src/components/types/MenusInfo.ts +0 -45
- package/src/components/types/PageFieldInfo.ts +0 -530
- package/src/components/types/PageProps.ts +0 -25
- package/src/components/types/Params.ts +0 -93
- package/src/components/types/RuleType.ts +0 -10
- package/src/components/types/SearchProps.ts +0 -42
- package/src/components/types/ShortKey.ts +0 -30
- package/src/components/types/StarHorseType.ts +0 -18
- package/src/components/types/index.ts +0 -15
- package/src/config/element.ts +0 -15
- package/src/config/styles.ts +0 -4
- package/src/index.ts +0 -98
- package/src/install.ts +0 -33
- package/src/lang/en_US.ts +0 -81
- package/src/lang/index.ts +0 -35
- package/src/lang/zh_CN.ts +0 -84
- package/src/main.ts +0 -57
- package/src/plugins/AblesPlugin.ts +0 -618
- package/src/plugins/registerCompPlugin.ts +0 -15
- package/src/sample/test.vue +0 -9
- package/src/store/ButtonPermission.ts +0 -101
- package/src/store/ConsumerView.ts +0 -52
- package/src/store/ContinusConfig.ts +0 -78
- package/src/store/CopyerOperation.ts +0 -74
- package/src/store/DesignForm.ts +0 -481
- package/src/store/DesignPage.ts +0 -59
- package/src/store/DynamicForm.ts +0 -241
- package/src/store/GlobalConfig.ts +0 -90
- package/src/store/SelfOperation.ts +0 -95
- package/src/store/UserInfo.ts +0 -88
- package/src/store/index.ts +0 -6
- package/src/theme/localStorge.ts +0 -16
- package/src/theme/theme.ts +0 -27
- package/src/utils/FieldOperationUtils.ts +0 -91
- package/src/utils/auth.ts +0 -83
- package/src/utils/message.ts +0 -69
- package/src/utils/preview.ts +0 -125
- package/tsconfig.json +0 -39
- package/tsconfig.node.json +0 -10
- package/vite-env.d.ts +0 -16
- package/vite.config.ts +0 -162
- package/yarn.lock +0 -4627
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<star-horse-dialog
|
|
3
|
-
:title="field.label + '数据选择'"
|
|
4
|
-
:self-func="true"
|
|
5
|
-
:dialog-visible="dialogInputVisible"
|
|
6
|
-
@merge="selectItem"
|
|
7
|
-
:box-height="'500px'"
|
|
8
|
-
@closeAction="closeAction"
|
|
9
|
-
>
|
|
10
|
-
<div style="width: 100%">
|
|
11
|
-
<component
|
|
12
|
-
:is="field.preps.compName"
|
|
13
|
-
:params="field.preps"
|
|
14
|
-
ref="userTableRef"
|
|
15
|
-
style="flex: 1"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
</star-horse-dialog>
|
|
19
|
-
<starhorse-form-item
|
|
20
|
-
:showFormItem="showFormItem"
|
|
21
|
-
:isDesign="isDesign"
|
|
22
|
-
:disabled="disabled"
|
|
23
|
-
:bareFlag="bareFlag"
|
|
24
|
-
:formItem="field"
|
|
25
|
-
:parentField="parentField"
|
|
26
|
-
>
|
|
27
|
-
<el-mention
|
|
28
|
-
:disabled="checkIsDisabled(props)"
|
|
29
|
-
:options="userOptionList"
|
|
30
|
-
:whole="true"
|
|
31
|
-
:fid="field.fieldName"
|
|
32
|
-
v-bind="field.preps"
|
|
33
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
34
|
-
v-model="formData[field.fieldName]"
|
|
35
|
-
>
|
|
36
|
-
<template #append>
|
|
37
|
-
<star-horse-icon
|
|
38
|
-
icon-class="user-add"
|
|
39
|
-
@click="showVisible"
|
|
40
|
-
:disabled="field.preps['disabled']"
|
|
41
|
-
/>
|
|
42
|
-
</template>
|
|
43
|
-
</el-mention>
|
|
44
|
-
</starhorse-form-item>
|
|
45
|
-
</template>
|
|
46
|
-
<script setup lang="ts">
|
|
47
|
-
import { nextTick, PropType, shallowRef } from "vue";
|
|
48
|
-
import { FieldMapping } from "@/components/types/PageFieldInfo";
|
|
49
|
-
import { warning } from "@/utils/message";
|
|
50
|
-
import {
|
|
51
|
-
allAction,
|
|
52
|
-
checkIsDisabled,
|
|
53
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
54
|
-
import { getDynamicEvents } from "@/api/system";
|
|
55
|
-
|
|
56
|
-
const props = defineProps({
|
|
57
|
-
isDesign: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false,
|
|
60
|
-
},
|
|
61
|
-
disabled: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false,
|
|
64
|
-
},
|
|
65
|
-
showFormItem: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
bareFlag: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: false,
|
|
72
|
-
},
|
|
73
|
-
isSearch: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
field: {
|
|
78
|
-
type: Object as PropType<any>,
|
|
79
|
-
required: true,
|
|
80
|
-
},
|
|
81
|
-
parentField: {
|
|
82
|
-
type: Object as PropType<any>,
|
|
83
|
-
},
|
|
84
|
-
formInfo: {
|
|
85
|
-
type: Object as PropType<any>,
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
89
|
-
const formData = defineModel("formData");
|
|
90
|
-
let userTableRef = shallowRef();
|
|
91
|
-
let dialogInputVisible = shallowRef<boolean>(false);
|
|
92
|
-
let userOptionList = shallowRef<Array<any>>([]);
|
|
93
|
-
const itemAction = (prep: any) => {
|
|
94
|
-
allAction(props, emits, formData, prep);
|
|
95
|
-
};
|
|
96
|
-
const selectItem = (_row: any) => {
|
|
97
|
-
userOptionList.value = [];
|
|
98
|
-
let needField = props.field.preps["needField"];
|
|
99
|
-
let selectDatas = userTableRef.value.$refs.employeeInfoRef.multipleSelection;
|
|
100
|
-
if (!selectDatas) {
|
|
101
|
-
warning("请选择数据");
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
//如果没有指定属性,则默认取相同的属性
|
|
105
|
-
let name = props.field.fieldName;
|
|
106
|
-
let aliasName = props.field.preps["aliasName"];
|
|
107
|
-
let temp: any = {};
|
|
108
|
-
for (let i in selectDatas) {
|
|
109
|
-
let data = selectDatas[i];
|
|
110
|
-
if (!needField) {
|
|
111
|
-
if (!Object.keys(temp).includes(name)) {
|
|
112
|
-
temp[name] = [];
|
|
113
|
-
temp[aliasName] = [];
|
|
114
|
-
}
|
|
115
|
-
userOptionList.value.push({
|
|
116
|
-
label: data["name"],
|
|
117
|
-
value: data["employeeNo"],
|
|
118
|
-
});
|
|
119
|
-
temp[name].push(data["name"]);
|
|
120
|
-
temp[aliasName].push(data["employeeNo"]);
|
|
121
|
-
} else {
|
|
122
|
-
needField.forEach((item: FieldMapping) => {
|
|
123
|
-
if (needField.length == 1) {
|
|
124
|
-
if (!Object.keys(temp).includes(item.sourceField)) {
|
|
125
|
-
temp[item.sourceField] = [];
|
|
126
|
-
}
|
|
127
|
-
temp[name].push(data[item.sourceField]);
|
|
128
|
-
} else {
|
|
129
|
-
if (!Object.keys(temp).includes(item.distField)) {
|
|
130
|
-
temp[item.distField] = [];
|
|
131
|
-
}
|
|
132
|
-
temp[item.distField] = data[item.sourceField];
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (!needField) {
|
|
139
|
-
formData.value[name] = temp[name].join(" ");
|
|
140
|
-
formData.value[aliasName] = temp[aliasName].join(" ");
|
|
141
|
-
} else {
|
|
142
|
-
needField.forEach((item: FieldMapping) => {
|
|
143
|
-
if (needField.length == 1) {
|
|
144
|
-
formData.value[name] = temp[item.sourceField].join(" ");
|
|
145
|
-
} else {
|
|
146
|
-
formData.value[item.distField] = temp[item.distField].join(" ");
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
if (props.field.preps["recall"]) {
|
|
151
|
-
props.field.preps["recall"](selectDatas);
|
|
152
|
-
}
|
|
153
|
-
closeAction();
|
|
154
|
-
};
|
|
155
|
-
const closeAction = () => {
|
|
156
|
-
dialogInputVisible.value = false;
|
|
157
|
-
};
|
|
158
|
-
const showVisible = () => {
|
|
159
|
-
dialogInputVisible.value = true;
|
|
160
|
-
nextTick(() => {
|
|
161
|
-
let fields = props.field.preps["needField"];
|
|
162
|
-
let name = props.field.fieldName;
|
|
163
|
-
let realName = name;
|
|
164
|
-
if (props.field.preps["aliasName"]) {
|
|
165
|
-
realName = props.field.preps["aliasName"];
|
|
166
|
-
}
|
|
167
|
-
if (fields) {
|
|
168
|
-
name = fields.map((item: FieldMapping) => item.sourceField)[0];
|
|
169
|
-
}
|
|
170
|
-
userTableRef.value.$refs.employeeInfoRef.setDataInfo(
|
|
171
|
-
name,
|
|
172
|
-
formData.value[realName],
|
|
173
|
-
);
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
</script>
|
|
177
|
-
<style lang="less" scoped></style>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<starhorse-form-item
|
|
3
|
-
:showFormItem="showFormItem"
|
|
4
|
-
:isDesign="isDesign"
|
|
5
|
-
:disabled="disabled"
|
|
6
|
-
:bareFlag="bareFlag"
|
|
7
|
-
:formItem="field"
|
|
8
|
-
:parentField="parentField"
|
|
9
|
-
>
|
|
10
|
-
<component
|
|
11
|
-
:is="currentComponent"
|
|
12
|
-
:showFormItem="showFormItem"
|
|
13
|
-
:isDesign="isDesign"
|
|
14
|
-
:disabled="disabled"
|
|
15
|
-
:bareFlag="bareFlag"
|
|
16
|
-
v-bind="field['preps']"
|
|
17
|
-
v-model:dataForm="formData"
|
|
18
|
-
/>
|
|
19
|
-
</starhorse-form-item>
|
|
20
|
-
</template>
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import { onMounted, PropType, shallowRef, watch } from "vue";
|
|
23
|
-
|
|
24
|
-
const props = defineProps({
|
|
25
|
-
isDesign: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false,
|
|
28
|
-
},
|
|
29
|
-
disabled: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false,
|
|
32
|
-
},
|
|
33
|
-
showFormItem: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false,
|
|
36
|
-
},
|
|
37
|
-
bareFlag: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false,
|
|
40
|
-
},
|
|
41
|
-
isSearch: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
field: {
|
|
46
|
-
type: Object as PropType<any>,
|
|
47
|
-
required: true,
|
|
48
|
-
},
|
|
49
|
-
parentField: {
|
|
50
|
-
type: Object as PropType<any>,
|
|
51
|
-
},
|
|
52
|
-
formInfo: {
|
|
53
|
-
type: Object as PropType<any>,
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
57
|
-
const formData = defineModel("formData");
|
|
58
|
-
|
|
59
|
-
const currentComponent = shallowRef(null);
|
|
60
|
-
const loadComponent = async () => {
|
|
61
|
-
let compName = props.field["preps"].compName;
|
|
62
|
-
if (compName) {
|
|
63
|
-
try {
|
|
64
|
-
let comp = await import(`@/components/${compName}.vue`);
|
|
65
|
-
currentComponent.value = comp.default;
|
|
66
|
-
} catch (e) {
|
|
67
|
-
console.log(e.message);
|
|
68
|
-
currentComponent.value = null;
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
currentComponent.value = props.field?.preps["name"];
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
onMounted(() => {
|
|
75
|
-
loadComponent();
|
|
76
|
-
});
|
|
77
|
-
watch(
|
|
78
|
-
() => [props.field.preps?.compName, props.field.preps?.name],
|
|
79
|
-
() => {
|
|
80
|
-
loadComponent();
|
|
81
|
-
},
|
|
82
|
-
{ immediate: false },
|
|
83
|
-
);
|
|
84
|
-
</script>
|
|
85
|
-
<style scoped></style>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<starhorse-form-item
|
|
3
|
-
:showFormItem="showFormItem"
|
|
4
|
-
:isDesign="isDesign"
|
|
5
|
-
:disabled="disabled"
|
|
6
|
-
:bareFlag="bareFlag"
|
|
7
|
-
:formItem="field"
|
|
8
|
-
:parentField="parentField"
|
|
9
|
-
>
|
|
10
|
-
<div
|
|
11
|
-
ref="markdownEditor"
|
|
12
|
-
class="markdown-editor"
|
|
13
|
-
v-html="markdown.render(formData[field.fieldName] || '')"
|
|
14
|
-
/>
|
|
15
|
-
</starhorse-form-item>
|
|
16
|
-
</template>
|
|
17
|
-
<script setup lang="ts" name="view-markdown">
|
|
18
|
-
import { nextTick, onMounted, onUpdated, PropType, ref } from "vue";
|
|
19
|
-
import MarkdownIt from "markdown-it";
|
|
20
|
-
|
|
21
|
-
defineProps({
|
|
22
|
-
isDesign: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
disabled: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false,
|
|
29
|
-
},
|
|
30
|
-
showFormItem: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
bareFlag: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
isSearch: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
field: {
|
|
43
|
-
type: Object as PropType<any>,
|
|
44
|
-
required: true,
|
|
45
|
-
},
|
|
46
|
-
parentField: {
|
|
47
|
-
type: Object as PropType<any>,
|
|
48
|
-
},
|
|
49
|
-
formInfo: {
|
|
50
|
-
type: Object as PropType<any>,
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
54
|
-
const formData = defineModel("formData");
|
|
55
|
-
|
|
56
|
-
let markdownEditor = ref();
|
|
57
|
-
let markdown = ref<MarkdownIt>(null);
|
|
58
|
-
const init = async () => {
|
|
59
|
-
await nextTick(() => {
|
|
60
|
-
if (!markdown.value && markdownEditor.value) {
|
|
61
|
-
markdown.value = new MarkdownIt(markdownEditor.value, {});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
onMounted(() => {
|
|
66
|
-
init();
|
|
67
|
-
});
|
|
68
|
-
onUpdated(() => {
|
|
69
|
-
init();
|
|
70
|
-
});
|
|
71
|
-
</script>
|
|
72
|
-
<style lang="scss" scoped>
|
|
73
|
-
.markdown-editor {
|
|
74
|
-
width: 100% !important;
|
|
75
|
-
min-height: 400px !important;
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<star-horse-dialog
|
|
3
|
-
:title="title"
|
|
4
|
-
:box-width="boxWidth"
|
|
5
|
-
:self-func="true"
|
|
6
|
-
@resetForm="handleReset"
|
|
7
|
-
:hideFullScreenIcon="true"
|
|
8
|
-
:dialog-visible="modelValue"
|
|
9
|
-
@merge="handleConfirm"
|
|
10
|
-
@closeAction="$emit('update:modelValue', false)"
|
|
11
|
-
>
|
|
12
|
-
<el-input
|
|
13
|
-
v-model="content"
|
|
14
|
-
type="textarea"
|
|
15
|
-
:rows="20"
|
|
16
|
-
:disabled="disabled"
|
|
17
|
-
resize="both"
|
|
18
|
-
show-word-limit
|
|
19
|
-
:placeholder="placeholder"
|
|
20
|
-
/>
|
|
21
|
-
</star-horse-dialog>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
import { ref, watch } from "vue";
|
|
26
|
-
|
|
27
|
-
const props = defineProps({
|
|
28
|
-
modelValue: Boolean,
|
|
29
|
-
title: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "编辑数据",
|
|
32
|
-
},
|
|
33
|
-
boxWidth: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "50%",
|
|
36
|
-
},
|
|
37
|
-
disabled: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false,
|
|
40
|
-
},
|
|
41
|
-
showFormItem: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
placeholder: String,
|
|
46
|
-
initialContent: String,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const content = ref("");
|
|
50
|
-
const emit = defineEmits(["update:modelValue", "confirm"]);
|
|
51
|
-
|
|
52
|
-
const handleConfirm = () => {
|
|
53
|
-
emit("confirm", content.value);
|
|
54
|
-
emit("update:modelValue", false);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const handleReset = () => {
|
|
58
|
-
content.value = "";
|
|
59
|
-
};
|
|
60
|
-
// 新增内容监听
|
|
61
|
-
watch(
|
|
62
|
-
() => props.initialContent,
|
|
63
|
-
(newVal) => {
|
|
64
|
-
content.value = newVal || "";
|
|
65
|
-
},
|
|
66
|
-
);
|
|
67
|
-
</script>
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useDesignFormStore } from "@/store/DesignForm";
|
|
3
|
-
import piniaInstance from "@/store";
|
|
4
|
-
import { computed, ComputedRef, ref } from "vue";
|
|
5
|
-
|
|
6
|
-
defineOptions({
|
|
7
|
-
name: "FieldList",
|
|
8
|
-
});
|
|
9
|
-
const containerRef = ref();
|
|
10
|
-
const emits = defineEmits(["selectData"]);
|
|
11
|
-
let designForm = useDesignFormStore(piniaInstance);
|
|
12
|
-
let formDataList: ComputedRef = computed(() => designForm.formDataList);
|
|
13
|
-
let containerList: ComputedRef = computed(() => designForm.containerList);
|
|
14
|
-
let selfFormDataList: ComputedRef = computed(() => designForm.selfFormDataList);
|
|
15
|
-
const selectData = (item: any) => {
|
|
16
|
-
emits("selectData", item);
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div class="component-list">
|
|
22
|
-
<div class="title">
|
|
23
|
-
<el-anchor type="underline" :container="containerRef" :offset="70">
|
|
24
|
-
<el-anchor-link :href="`#container`"> 容器 </el-anchor-link>
|
|
25
|
-
<el-anchor-link :href="`#basic`"> 基础组件 </el-anchor-link>
|
|
26
|
-
<el-anchor-link :href="`#self`"> 自定义组件 </el-anchor-link>
|
|
27
|
-
</el-anchor>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="content" ref="containerRef">
|
|
30
|
-
<el-scrollbar>
|
|
31
|
-
<el-divider content-position="left">容器</el-divider>
|
|
32
|
-
<ul id="container">
|
|
33
|
-
<template v-for="item in containerList">
|
|
34
|
-
<li class="field-item" @click="selectData(item)">
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<star-horse-icon :icon-class="item.itemIcon" /> {{
|
|
38
|
-
item.itemName
|
|
39
|
-
}}
|
|
40
|
-
</div>
|
|
41
|
-
</li>
|
|
42
|
-
</template>
|
|
43
|
-
</ul>
|
|
44
|
-
<el-divider content-position="left">基础组件</el-divider>
|
|
45
|
-
<ul id="basic">
|
|
46
|
-
<template v-for="item in formDataList">
|
|
47
|
-
<li class="field-item" @click="selectData(item)">
|
|
48
|
-
|
|
49
|
-
<div>
|
|
50
|
-
<star-horse-icon :icon-class="item.itemIcon" /> {{
|
|
51
|
-
item.itemName
|
|
52
|
-
}}
|
|
53
|
-
</div>
|
|
54
|
-
</li>
|
|
55
|
-
</template>
|
|
56
|
-
</ul>
|
|
57
|
-
<el-divider content-position="left">自定义组件</el-divider>
|
|
58
|
-
<ul id="self">
|
|
59
|
-
<template v-for="item in selfFormDataList">
|
|
60
|
-
<li class="field-item" @click="selectData(item)">
|
|
61
|
-
|
|
62
|
-
<div>
|
|
63
|
-
<star-horse-icon :icon-class="item.itemIcon" /> {{
|
|
64
|
-
item.itemName
|
|
65
|
-
}}
|
|
66
|
-
</div>
|
|
67
|
-
</li>
|
|
68
|
-
</template>
|
|
69
|
-
</ul>
|
|
70
|
-
</el-scrollbar>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<style scoped lang="scss">
|
|
76
|
-
:deep(.el-divider) {
|
|
77
|
-
margin: 15px auto;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.component-list {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: row;
|
|
83
|
-
height: inherit;
|
|
84
|
-
width: 100%;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
|
|
87
|
-
.title {
|
|
88
|
-
width: 100px;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.content {
|
|
93
|
-
margin-left: 10px;
|
|
94
|
-
height: 100%;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
flex: 1;
|
|
97
|
-
|
|
98
|
-
ul {
|
|
99
|
-
list-style: none;
|
|
100
|
-
margin-top: 0 !important;
|
|
101
|
-
padding-top: 0 !important;
|
|
102
|
-
|
|
103
|
-
li {
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
display: block;
|
|
106
|
-
height: 30px;
|
|
107
|
-
padding: 0 !important;
|
|
108
|
-
margin: 0;
|
|
109
|
-
|
|
110
|
-
&:hover {
|
|
111
|
-
background-color: #f5f7fa;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
div {
|
|
115
|
-
display: inline-flex;
|
|
116
|
-
height: 100%;
|
|
117
|
-
align-items: center;
|
|
118
|
-
margin-top: 0 !important;
|
|
119
|
-
padding-top: 0 !important;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
</style>
|