sun-form-v3 1.0.71 → 1.0.72
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/abap-DfvySaIJ.js +1404 -0
- package/dist/apex-B__0irD3.js +332 -0
- package/dist/assets/css.worker-OK053IOu.js +84 -0
- package/dist/assets/editor.worker-D9iUZyMP.js +11 -0
- package/dist/assets/html.worker-CL40hqKM.js +458 -0
- package/dist/assets/json.worker-6f9bhSHY.js +42 -0
- package/dist/assets/ts.worker-B6g3wjaE.js +37021 -0
- package/dist/azcli-CDMGhRmx.js +74 -0
- package/dist/bat-0Mk8aqzx.js +106 -0
- package/dist/bicep-BBi_I06Z.js +108 -0
- package/dist/cameligo-D0G_Zm6X.js +180 -0
- package/dist/clojure-o2ZKLeMp.js +767 -0
- package/dist/coffee-DOQff5VC.js +238 -0
- package/dist/cpp-CQGJnWhD.js +395 -0
- package/dist/csharp-C1jLsHl8.js +332 -0
- package/dist/csp-C_ttMQaW.js +59 -0
- package/dist/css-BC202kVV.js +193 -0
- package/dist/cssMode-D3INtz5D.js +1541 -0
- package/dist/cypher-DwtEH7Fi.js +269 -0
- package/dist/dart-D9XknsP2.js +287 -0
- package/dist/dockerfile-DgsNjqqa.js +136 -0
- package/dist/ecl-BAMCHBl6.js +462 -0
- package/dist/elixir-CegIttP8.js +575 -0
- package/dist/favicon.ico +0 -0
- package/dist/flow9-9608t7UV.js +148 -0
- package/dist/freemarker2-hasIzj0A.js +995 -0
- package/dist/fsharp-CCtt9-1_.js +223 -0
- package/dist/go-CGUIPbct.js +224 -0
- package/dist/graphql-BNRIFFIn.js +157 -0
- package/dist/handlebars-Cqza9dif.js +425 -0
- package/dist/hcl-C__KLIXe.js +189 -0
- package/dist/html-QpDlLWtS.js +314 -0
- package/dist/htmlMode-3p93KT8l.js +1551 -0
- package/dist/index2-jkDcibEo.js +120443 -0
- package/dist/ini-CeKYn_zA.js +77 -0
- package/dist/java-Dm24deQl.js +238 -0
- package/dist/javascript-CSPB5Brm.js +76 -0
- package/dist/jsonMode-qA6pURD0.js +1957 -0
- package/dist/julia-BImNW7VE.js +517 -0
- package/dist/kotlin-BfE79GEb.js +259 -0
- package/dist/less-DglNOcaC.js +168 -0
- package/dist/lexon-BA0dRz9Q.js +163 -0
- package/dist/liquid-BWuASSim.js +246 -0
- package/dist/lua-DMkWzJcm.js +168 -0
- package/dist/m3-sA-5shO8.js +216 -0
- package/dist/markdown-OYRB1igA.js +235 -0
- package/dist/mdx-CnHJXO9F.js +171 -0
- package/dist/mips-rRzkJ_7G.js +204 -0
- package/dist/msdax-DoVJdUhd.js +381 -0
- package/dist/mysql-Ty44IHXo.js +884 -0
- package/dist/objective-c-VUfyhYrA.js +189 -0
- package/dist/pascal-DkASiYyw.js +257 -0
- package/dist/pascaligo-p-ELPlVO.js +170 -0
- package/dist/perl-Cjl1FxLZ.js +632 -0
- package/dist/pgsql-DjVenF7s.js +857 -0
- package/dist/php-CwvGzZOO.js +506 -0
- package/dist/pla-Br1iaBIV.js +143 -0
- package/dist/postiats-BaeP8zZY.js +913 -0
- package/dist/powerquery-CLCshuo8.js +896 -0
- package/dist/powershell-CZV50w5N.js +245 -0
- package/dist/protobuf-MV3XTewJ.js +426 -0
- package/dist/pug-DkDg4c4l.js +408 -0
- package/dist/python-CRYsEVap.js +282 -0
- package/dist/qsharp-BAtiKA97.js +291 -0
- package/dist/r-8ocrd-h-.js +249 -0
- package/dist/razor-DyEtGntt.js +556 -0
- package/dist/redis-9sZiddxc.js +308 -0
- package/dist/redshift-DQfTOGC0.js +815 -0
- package/dist/restructuredtext-DXU-vkgr.js +180 -0
- package/dist/ruby-DotfqwMf.js +517 -0
- package/dist/rust-BIauJ5KN.js +349 -0
- package/dist/sb-CmWMvDEV.js +121 -0
- package/dist/scala-C81brEbk.js +376 -0
- package/dist/scheme-D0pcFz2x.js +114 -0
- package/dist/scss-BOdN2fGG.js +268 -0
- package/dist/shell-6E09eAkU.js +227 -0
- package/dist/solidity-CWStzA1K.js +1373 -0
- package/dist/sophia-76Sb6CWe.js +205 -0
- package/dist/sparql-BmZTkOWT.js +207 -0
- package/dist/sql-Cs9TBAW5.js +859 -0
- package/dist/st-B-rqE1Bu.js +422 -0
- package/dist/style.css +1 -0
- package/dist/sun-form-v3.es.js +4 -0
- package/dist/sun-form-v3.umd.js +1902 -0
- package/dist/swift-Btsj6YxQ.js +318 -0
- package/dist/systemverilog-B3RHBRa2.js +582 -0
- package/dist/tcl-Dpj776pn.js +238 -0
- package/dist/tsMode-BrlIPEQw.js +885 -0
- package/dist/twig-Bb9JmBsE.js +398 -0
- package/dist/typescript-CYTudnTM.js +349 -0
- package/dist/typespec-CDWeg3SU.js +123 -0
- package/dist/vb-DEXnYwEI.js +378 -0
- package/dist/wgsl-D602c1lx.js +445 -0
- package/dist/xml-B-x5164u.js +101 -0
- package/dist/yaml-Buq2hM65.js +212 -0
- package/package.json +7 -10
- package/src/App.vue +0 -9
- package/src/assets/font/YouSheBiaoTiHei-2.ttf +0 -0
- package/src/assets/font/demo.css +0 -539
- package/src/assets/font/demo_index.html +0 -1200
- package/src/assets/font/iconfont.css +0 -191
- package/src/assets/font/iconfont.js +0 -1
- package/src/assets/font/iconfont.json +0 -317
- package/src/assets/font/iconfont.ttf +0 -0
- package/src/assets/font/iconfont.woff +0 -0
- package/src/assets/font/iconfont.woff2 +0 -0
- package/src/assets/img/bg_footer.png +0 -0
- package/src/assets/img/bg_title.png +0 -0
- package/src/assets/img/file.png +0 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/logo2.png +0 -0
- package/src/assets/img/logo22.png +0 -0
- package/src/assets/img/logo23.png +0 -0
- package/src/assets/img/logo3.png +0 -0
- package/src/assets/img//347/237/251/345/275/242@2x.png +0 -0
- package/src/assets/logo.svg +0 -1
- package/src/assets/styles/element/index.scss +0 -15
- package/src/assets/styles/index.css +0 -3
- package/src/components/a.js +0 -14
- package/src/components/aDesigner/config.vue +0 -127
- package/src/components/aDesigner/design.vue +0 -20
- package/src/components/aDesigner/index.vue +0 -144
- package/src/components/aDesigner/panel.vue +0 -144
- package/src/components/aDesigner/show.vue +0 -24
- package/src/components/widgetCommonComps/commonApiConfig/index.vue +0 -194
- package/src/components/widgetCommonComps/commonCard/index.vue +0 -36
- package/src/components/widgetCommonComps/commonCodeEditor/editor.vue +0 -219
- package/src/components/widgetCommonComps/commonCodeEditor/modalEditor.vue +0 -68
- package/src/components/widgetCommonComps/commonCollapseCard/index.vue +0 -10
- package/src/components/widgetCommonComps/commonContainer/index.vue +0 -95
- package/src/components/widgetCommonComps/commonJsonInput/index.vue +0 -59
- package/src/components/widgetCommonComps/commonLabelContainer/index.vue +0 -39
- package/src/components/widgetCommonComps/commonSidetree/index.vue +0 -61
- package/src/components/widgetCommonComps/commonTypeInput/index.vue +0 -75
- package/src/components/widgetCommonComps/commonWidgetLabelContainer/index.vue +0 -55
- package/src/components/widgetCommonComps/index copy.js +0 -17
- package/src/components/widgetCommonComps/index.js +0 -17
- package/src/components/widgetConfigComps/config-input/index.vue +0 -60
- package/src/components/widgetConfigComps/index copy.js +0 -13
- package/src/components/widgetConfigComps/index.js +0 -17
- package/src/components/widgetShowComps/index.js +0 -29
- package/src/components/widgetShowComps/widget-form/index.vue +0 -43
- package/src/components/widgetShowComps/widget-homepage/index.vue +0 -41
- package/src/components/widgetShowComps/widget-input/index.vue +0 -85
- package/src/components/widgetShowComps/widget-select/index.vue +0 -31
- package/src/designer.js +0 -342
- package/src/http.js +0 -293
- package/src/index.js +0 -24
- package/src/index2.js +0 -23
- package/src/main.js +0 -19
- package/src/remark.js +0 -708
- package/src/testBtn.vue +0 -11
- package/src/testInput.vue +0 -12
- package/src/util/jsformat.js +0 -568
- package/src/widgetConfig.js +0 -1112
@@ -1,59 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<!-- <draggable :key="key" class="w-full" handle=".move_handle" :list="jsonValue" item-key="label"
|
3
|
-
:group="{ name: 'no', put: false, pull: false }">
|
4
|
-
<template #item="{ element, index }"> -->
|
5
|
-
<div class=" w-full flex items-center my-2 box-border" v-for="(element, index) in jsonValue" :key="index">
|
6
|
-
<el-input v-model="element.label" placeholder="请输入"></el-input>
|
7
|
-
<common-type-input v-model="element.value" class="ml-1 w-[100%]"></common-type-input>
|
8
|
-
<el-icon class="cursor-pointer ml-1" @click="deleteItem(index)">
|
9
|
-
<Delete />
|
10
|
-
</el-icon>
|
11
|
-
</div>
|
12
|
-
<!-- </template>
|
13
|
-
</draggable> -->
|
14
|
-
<div class="flex items-center justify-start">
|
15
|
-
<el-button icon="CirclePlus" type="primary" link @click="addItem">添加</el-button>
|
16
|
-
<el-button icon="CircleClose" v-if="jsonValue&&jsonValue.length" type="primary" link @click="clearItem">清空</el-button>
|
17
|
-
</div>
|
18
|
-
</template>
|
19
|
-
|
20
|
-
<script setup>
|
21
|
-
import draggable from "vuedraggable/src/vuedraggable";
|
22
|
-
import { ref, computed, watch } from 'vue';
|
23
|
-
|
24
|
-
defineOptions({ name: "commonJsonInput" })
|
25
|
-
|
26
|
-
const props = defineProps({
|
27
|
-
modelValue: [Array],
|
28
|
-
})
|
29
|
-
const emit = defineEmits(['update:modelValue'])
|
30
|
-
const jsonValue = computed({
|
31
|
-
get() {
|
32
|
-
return props.modelValue || []
|
33
|
-
},
|
34
|
-
set(value) {
|
35
|
-
emit('update:modelValue', value)
|
36
|
-
}
|
37
|
-
})
|
38
|
-
const deleteItem = (index) => {
|
39
|
-
jsonValue.value.splice(index, 1)
|
40
|
-
}
|
41
|
-
const addItem = () => {
|
42
|
-
jsonValue.value.push({
|
43
|
-
label: null,
|
44
|
-
value: null
|
45
|
-
})
|
46
|
-
}
|
47
|
-
const clearItem = () => {
|
48
|
-
jsonValue.value = []
|
49
|
-
}
|
50
|
-
// watch(() => props.modelValue, () => {
|
51
|
-
// if (props.modelValue === null || props.modelValue === undefined) {
|
52
|
-
// type.value = 'string';
|
53
|
-
// } else {
|
54
|
-
// type.value = typeof props.modelValue;
|
55
|
-
// }
|
56
|
-
// }, { immediate: true });
|
57
|
-
</script>
|
58
|
-
|
59
|
-
<style scoped lang="scss"></style>
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="item">
|
3
|
-
<div class="lab">
|
4
|
-
{{ props.label }}
|
5
|
-
</div>
|
6
|
-
<div class="con">
|
7
|
-
<slot></slot>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</template>
|
11
|
-
|
12
|
-
<script setup>
|
13
|
-
import { ref, reactive } from 'vue';
|
14
|
-
defineOptions({ name: "commonLabelContainer" })
|
15
|
-
let props = defineProps({
|
16
|
-
label: {
|
17
|
-
type: String,
|
18
|
-
default: ""
|
19
|
-
}
|
20
|
-
})
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<style scoped lang="scss">
|
24
|
-
.item {
|
25
|
-
@apply flex items-center mb-2;
|
26
|
-
|
27
|
-
.lab {
|
28
|
-
@apply flex-none w-[90px] text-sm;
|
29
|
-
}
|
30
|
-
|
31
|
-
.con {
|
32
|
-
@apply flex-1;
|
33
|
-
}
|
34
|
-
|
35
|
-
// &:last-child {
|
36
|
-
// @apply mb-0;
|
37
|
-
// }
|
38
|
-
}
|
39
|
-
</style>
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="h-full">
|
3
|
-
<vxe-table ref="table" :show-header="false" show-overflow border="outer"
|
4
|
-
:row-config="{ isHover: false, useKey: true }" height="auto" :column-config="{ resizable: true }"
|
5
|
-
:tree-config="{ transform: false, childrenField: 'widgetList', showLine: true, expandAll: true }" :data="arr">
|
6
|
-
<vxe-column field="displayName" title="组件大纲" tree-node>
|
7
|
-
<template #default="{ row }">
|
8
|
-
<div @click="chooseHandle(row)" class="cursor-pointer pl-2 box-border hover:bg-gray-50"
|
9
|
-
:class="{ 'bg-blue-50': row.id == chosenId }">
|
10
|
-
<span class="text-sm">
|
11
|
-
{{ row.displayName }}
|
12
|
-
</span>
|
13
|
-
<span class="text-xs text-gray-400">
|
14
|
-
_{{ row.id }}
|
15
|
-
</span>
|
16
|
-
</div>
|
17
|
-
</template>
|
18
|
-
</vxe-column>
|
19
|
-
</vxe-table>
|
20
|
-
</div>
|
21
|
-
</template>
|
22
|
-
|
23
|
-
<script setup>
|
24
|
-
import { ref, reactive, watch, nextTick } from 'vue';
|
25
|
-
defineOptions({ name: "commonSidetree" })
|
26
|
-
let props = defineProps({
|
27
|
-
designer: {
|
28
|
-
type: Object,
|
29
|
-
default: {}
|
30
|
-
}, canAddApi: {
|
31
|
-
type: Boolean,
|
32
|
-
default: false
|
33
|
-
}
|
34
|
-
|
35
|
-
})
|
36
|
-
const emit = defineEmits(['addApi'])
|
37
|
-
let designer = props.designer
|
38
|
-
let table = ref()
|
39
|
-
let arr = ref([])
|
40
|
-
let chosenId = ref(null)
|
41
|
-
const chooseHandle = (row) => {
|
42
|
-
if (props.canAddApi) {
|
43
|
-
emit('addApi', row);
|
44
|
-
return
|
45
|
-
}
|
46
|
-
designer.setChosenId(row.id)
|
47
|
-
}
|
48
|
-
watch(() => designer.getWidgetConfig(), (val) => {
|
49
|
-
chosenId.value = designer.getChosenId()
|
50
|
-
arr.value = []
|
51
|
-
arr.value.push(designer.$utils.clone(val, true))
|
52
|
-
nextTick(() => {
|
53
|
-
table.value.setAllTreeExpand(true)
|
54
|
-
})
|
55
|
-
}, {
|
56
|
-
deep: true,
|
57
|
-
immediate: true
|
58
|
-
})
|
59
|
-
</script>
|
60
|
-
|
61
|
-
<style scoped lang="scss"></style>
|
@@ -1,75 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<el-input v-model="inputValue" placeholder="请输入">
|
3
|
-
<template #append>
|
4
|
-
<el-select v-model="type" class="w-[75px]" @change="handleTypeChange">
|
5
|
-
<el-option label="字符" value="string" />
|
6
|
-
<el-option label="布尔" value="boolean" />
|
7
|
-
<el-option label="数字" value="number" />
|
8
|
-
</el-select>
|
9
|
-
</template>
|
10
|
-
</el-input>
|
11
|
-
</template>
|
12
|
-
|
13
|
-
<script setup>
|
14
|
-
import { ref, computed, watch } from 'vue';
|
15
|
-
|
16
|
-
defineOptions({ name: "commonTypeInput" })
|
17
|
-
|
18
|
-
const props = defineProps({
|
19
|
-
modelValue: [String, Number, Boolean, Object, null],
|
20
|
-
default: null
|
21
|
-
})
|
22
|
-
|
23
|
-
const emit = defineEmits(['update:modelValue'])
|
24
|
-
|
25
|
-
const type = ref("string")
|
26
|
-
const inputValue = computed({
|
27
|
-
get() {
|
28
|
-
let inType = typeof props.modelValue
|
29
|
-
switch (inType) {
|
30
|
-
case 'number':
|
31
|
-
return props.modelValue.toString()
|
32
|
-
case 'boolean':
|
33
|
-
return props.modelValue ? 'true' : 'false'
|
34
|
-
default: // string
|
35
|
-
return props.modelValue
|
36
|
-
}
|
37
|
-
},
|
38
|
-
set(value) {
|
39
|
-
let emitValue = null
|
40
|
-
switch (type.value) {
|
41
|
-
case 'number':
|
42
|
-
emitValue = Number(value) || null
|
43
|
-
break
|
44
|
-
case 'boolean':
|
45
|
-
if (/^t(rue)?$/i.test(value)) {
|
46
|
-
emitValue = true;
|
47
|
-
}
|
48
|
-
else if (/^f(alse)?$/i.test(value)) {
|
49
|
-
emitValue = false;
|
50
|
-
}
|
51
|
-
else {
|
52
|
-
emitValue = null;
|
53
|
-
}
|
54
|
-
break
|
55
|
-
default: // string
|
56
|
-
emitValue = value || null
|
57
|
-
}
|
58
|
-
emit('update:modelValue', emitValue)
|
59
|
-
}
|
60
|
-
})
|
61
|
-
|
62
|
-
const handleTypeChange = (newType) => {
|
63
|
-
inputValue.value = ""
|
64
|
-
}
|
65
|
-
|
66
|
-
watch(() => props.modelValue, () => {
|
67
|
-
if (props.modelValue === null || props.modelValue === undefined) {
|
68
|
-
type.value = 'string';
|
69
|
-
} else {
|
70
|
-
type.value = typeof props.modelValue;
|
71
|
-
}
|
72
|
-
}, { immediate: true });
|
73
|
-
</script>
|
74
|
-
|
75
|
-
<style scoped lang="scss"></style>
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="item" :class="{ flex: props.labelPosition == 'left', 'hide': props.hide }">
|
3
|
-
<div class="lab" :class="{ required: props.required }" :style='{
|
4
|
-
width: props.labelWidth,
|
5
|
-
justifyContent: props.labelAlign == "left" ? "flex-start" : "flex-end"
|
6
|
-
}'>
|
7
|
-
{{ props.label }}
|
8
|
-
</div>
|
9
|
-
<div class="con">
|
10
|
-
<slot></slot>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</template>
|
14
|
-
|
15
|
-
<script setup>
|
16
|
-
import { ref, reactive, computed } from 'vue';
|
17
|
-
defineOptions({ name: "commonWidgetLabelContainer" })
|
18
|
-
let p = defineProps({
|
19
|
-
props: {
|
20
|
-
type: Object,
|
21
|
-
default: {
|
22
|
-
label: "",
|
23
|
-
labelWidth: "90px",
|
24
|
-
labelAlign: "left",
|
25
|
-
labelPosition: "left",
|
26
|
-
required: false,
|
27
|
-
hide: false,
|
28
|
-
width: 24
|
29
|
-
}
|
30
|
-
},
|
31
|
-
})
|
32
|
-
let props = computed(() => p.props)
|
33
|
-
</script>
|
34
|
-
|
35
|
-
<style scoped lang="scss">
|
36
|
-
.item {
|
37
|
-
@apply items-center flex-wrap relative p-2;
|
38
|
-
|
39
|
-
.lab {
|
40
|
-
@apply flex-none text-sm flex box-border pr-2;
|
41
|
-
}
|
42
|
-
|
43
|
-
.con {
|
44
|
-
@apply flex-1;
|
45
|
-
}
|
46
|
-
|
47
|
-
.required {
|
48
|
-
@apply before:content-['*'] before:text-red-500 before:mr-1;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
.hide {
|
53
|
-
@apply after:content-['<隐藏状态>'] after:w-full after:h-full after:absolute after:top-0 after:left-0 after:flex after:items-center after:justify-center after:bg-gray-400 after:bg-opacity-10 after:text-sm after:text-gray-400;
|
54
|
-
}
|
55
|
-
</style>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
const modules =
|
2
|
-
import.meta.glob('./**/index.vue', {
|
3
|
-
eager: true
|
4
|
-
});
|
5
|
-
const components = Object.fromEntries(
|
6
|
-
Object.entries(modules).map(([path, module]) => {
|
7
|
-
const componentName = module.default.name
|
8
|
-
return [componentName, module.default];
|
9
|
-
})
|
10
|
-
);
|
11
|
-
export default{
|
12
|
-
install(app) {
|
13
|
-
Object.keys(components).forEach(key => {
|
14
|
-
app.component(key, components[key]);
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
const modules =
|
2
|
-
import.meta.glob('./**/index.vue', {
|
3
|
-
eager: true
|
4
|
-
});
|
5
|
-
const components = Object.fromEntries(
|
6
|
-
Object.entries(modules).map(([path, module]) => {
|
7
|
-
const componentName = module.default.name
|
8
|
-
return [componentName, module.default];
|
9
|
-
})
|
10
|
-
);
|
11
|
-
export default{
|
12
|
-
install(app) {
|
13
|
-
Object.keys(components).forEach(key => {
|
14
|
-
app.component(key, components[key]);
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
@@ -1,60 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<common-label-container label="组件尺寸">
|
3
|
-
<el-select v-model="props.widget.props.size">
|
4
|
-
<el-option label="大尺寸" value="large"></el-option>
|
5
|
-
<el-option label="默认" value="default"></el-option>
|
6
|
-
<el-option label="小尺寸" value="small"></el-option>
|
7
|
-
</el-select>
|
8
|
-
</common-label-container>
|
9
|
-
<common-label-container label="组件类型">
|
10
|
-
<el-select v-model="props.widget.props.type">
|
11
|
-
<el-option label="文字" value="text"></el-option>
|
12
|
-
<!-- <el-option label="数字" value="number"></el-option> -->
|
13
|
-
<el-option label="密码" value="password"></el-option>
|
14
|
-
</el-select>
|
15
|
-
</common-label-container>
|
16
|
-
<common-label-container label="占位文字">
|
17
|
-
<el-input v-model="props.widget.props.placeholder" placeholder="填写占位文字">
|
18
|
-
</el-input>
|
19
|
-
</common-label-container>
|
20
|
-
<common-label-container label="前置内容文字">
|
21
|
-
<el-input v-model="props.widget.props.prependText" placeholder="填写末尾按钮文字">
|
22
|
-
</el-input>
|
23
|
-
</common-label-container>
|
24
|
-
<common-label-container label="末尾按钮文字">
|
25
|
-
<el-input v-model="props.widget.props.appendText" placeholder="填写末尾按钮文字">
|
26
|
-
</el-input>
|
27
|
-
</common-label-container>
|
28
|
-
<common-label-container label="最大输入长度">
|
29
|
-
<el-input-number class="w-full" placeholder="填写最大输入长度" v-model="props.widget.props.maxlength" :min="0" controls-position="right" />
|
30
|
-
</common-label-container>
|
31
|
-
<common-label-container label="是否去空格">
|
32
|
-
<el-switch v-model="props.widget.props.isTrim" />
|
33
|
-
</common-label-container>
|
34
|
-
<common-label-container label="是否必填">
|
35
|
-
<el-switch v-model="props.widget.props.required" />
|
36
|
-
</common-label-container>
|
37
|
-
<common-label-container label="是否只读">
|
38
|
-
<el-switch v-model="props.widget.props.readonly" />
|
39
|
-
</common-label-container>
|
40
|
-
<common-label-container label="是否禁用">
|
41
|
-
<el-switch v-model="props.widget.props.disabled" />
|
42
|
-
</common-label-container>
|
43
|
-
</template>
|
44
|
-
|
45
|
-
<script setup>
|
46
|
-
import { ref, reactive } from 'vue';
|
47
|
-
defineOptions({ name: "config-input" })
|
48
|
-
let props = defineProps({
|
49
|
-
designer: {
|
50
|
-
type: Object,
|
51
|
-
default: {}
|
52
|
-
},
|
53
|
-
widget: {
|
54
|
-
type: Object,
|
55
|
-
default: {}
|
56
|
-
}
|
57
|
-
})
|
58
|
-
</script>
|
59
|
-
|
60
|
-
<style scoped lang="scss"></style>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
const modules =
|
2
|
-
import.meta.glob('./**/index.vue', {
|
3
|
-
eager: true
|
4
|
-
});
|
5
|
-
const components = Object.fromEntries(
|
6
|
-
Object.entries(modules).map(([path, module]) => {
|
7
|
-
const componentName = module.default.name
|
8
|
-
return [componentName, module.default];
|
9
|
-
})
|
10
|
-
);
|
11
|
-
export default {
|
12
|
-
...components,
|
13
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
const modules =
|
2
|
-
import.meta.glob('./**/index.vue', {
|
3
|
-
eager: true
|
4
|
-
});
|
5
|
-
const components = Object.fromEntries(
|
6
|
-
Object.entries(modules).map(([path, module]) => {
|
7
|
-
const componentName = module.default.name
|
8
|
-
return [componentName, module.default];
|
9
|
-
})
|
10
|
-
);
|
11
|
-
export default{
|
12
|
-
install(app) {
|
13
|
-
Object.keys(components).forEach(key => {
|
14
|
-
app.component(key, components[key]);
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
const modules =
|
2
|
-
import.meta.glob('./**/index.vue', {
|
3
|
-
eager: true
|
4
|
-
});
|
5
|
-
const components = Object.fromEntries(
|
6
|
-
Object.entries(modules).map(([path, module]) => {
|
7
|
-
const componentName = module.default.name
|
8
|
-
return [componentName, module.default];
|
9
|
-
})
|
10
|
-
);
|
11
|
-
export default{
|
12
|
-
install(app) {
|
13
|
-
Object.keys(components).forEach(key => {
|
14
|
-
app.component(key, components[key]);
|
15
|
-
});
|
16
|
-
}
|
17
|
-
}
|
18
|
-
// import widgetForm from './widget-form/index.vue'
|
19
|
-
// import widgetHomepage from './widget-homepage/index.vue'
|
20
|
-
// import widgetInput from './widget-input/index.vue'
|
21
|
-
// import widgetSelect from './widget-select/index.vue'
|
22
|
-
|
23
|
-
|
24
|
-
// export default {
|
25
|
-
// 'widget-form': widgetForm,
|
26
|
-
// 'widget-homepage': widgetHomepage,
|
27
|
-
// 'widget-input': widgetInput,
|
28
|
-
// 'widget-select': widgetSelect,
|
29
|
-
// };
|
@@ -1,43 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<draggable ghostClass="ghost" handle=".handle" :list="widgetList" class="min-h-14"
|
3
|
-
:group="{ name: 'dragGroup', put: true }" item-key="id">
|
4
|
-
<template #item="{ element }">
|
5
|
-
<div>
|
6
|
-
<commonContainer :designer="designer" :widget="element" :parentWidget="widget">
|
7
|
-
<component :ref="element.id" :is="'widget-'+element.type" :widget="element" :designer="designer">
|
8
|
-
</component>
|
9
|
-
</commonContainer>
|
10
|
-
</div>
|
11
|
-
</template>
|
12
|
-
</draggable>
|
13
|
-
</template>
|
14
|
-
|
15
|
-
<script setup>
|
16
|
-
import { ref, reactive } from 'vue';
|
17
|
-
import draggable from "vuedraggable/src/vuedraggable";
|
18
|
-
let props = defineProps({
|
19
|
-
designer: {
|
20
|
-
type: Object,
|
21
|
-
default: () => {
|
22
|
-
return {}
|
23
|
-
}
|
24
|
-
},
|
25
|
-
widget: {
|
26
|
-
type: Object,
|
27
|
-
default: () => {
|
28
|
-
return {}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
})
|
32
|
-
let designer = reactive(props.designer)
|
33
|
-
let widget = reactive(props.widget)
|
34
|
-
let widgetList = props.widget.widgetList
|
35
|
-
|
36
|
-
defineOptions({ name: "widget-form" })
|
37
|
-
</script>
|
38
|
-
|
39
|
-
<style scoped lang="scss">
|
40
|
-
.ghost {
|
41
|
-
@apply max-h-0 overflow-hidden border border-blue-700;
|
42
|
-
}
|
43
|
-
</style>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<draggable ghostClass="ghost" handle=".handle" :list="widgetList" class="min-h-full flex flex-wrap content-start"
|
3
|
-
:group="{ name: 'dragGroup', put: true }" item-key="id">
|
4
|
-
<template #item="{ element }">
|
5
|
-
<commonContainer :designer="designer" :widget="element" :parentWidget="widget">
|
6
|
-
<component :ref="element.id" :is="'widget-'+element.type" :widget="element" :designer="designer">
|
7
|
-
</component>
|
8
|
-
</commonContainer>
|
9
|
-
</template>
|
10
|
-
</draggable>
|
11
|
-
</template>
|
12
|
-
|
13
|
-
<script setup>
|
14
|
-
import { ref, reactive, computed } from 'vue';
|
15
|
-
import draggable from "vuedraggable/src/vuedraggable";
|
16
|
-
let props = defineProps({
|
17
|
-
designer: {
|
18
|
-
type: Object,
|
19
|
-
default: () => {
|
20
|
-
return {}
|
21
|
-
}
|
22
|
-
},
|
23
|
-
widget: {
|
24
|
-
type: Object,
|
25
|
-
default: () => {
|
26
|
-
return {}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
})
|
30
|
-
let designer = props.designer
|
31
|
-
let widget = computed(() => props.widget)
|
32
|
-
let widgetList = computed(() => designer.widgetConfig.widgetList)
|
33
|
-
|
34
|
-
defineOptions({ name: "widget-homepage" })
|
35
|
-
</script>
|
36
|
-
|
37
|
-
<style scoped lang="scss">
|
38
|
-
.ghost {
|
39
|
-
@apply max-h-0 overflow-hidden border border-blue-700;
|
40
|
-
}
|
41
|
-
</style>
|
@@ -1,85 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<common-widget-label-container :props="p">
|
3
|
-
<el-input @change="changeHandle" @input="inputHandle" @focus="focusHandle" v-model="p.value" :type="p.type"
|
4
|
-
:size="p.size" @blur="blurHandle" :placeholder="p.placeholder" :maxlength="p.maxlength">
|
5
|
-
<template v-if="p.prependText" #prepend>{{ p.prependText }}</template>
|
6
|
-
<template v-if="p.appendText" #append>
|
7
|
-
<el-button @click="onHandle">{{ p.appendText }}</el-button>
|
8
|
-
</template>
|
9
|
-
</el-input>
|
10
|
-
</common-widget-label-container>
|
11
|
-
</template>
|
12
|
-
|
13
|
-
<script setup>
|
14
|
-
import { ref, reactive, computed, getCurrentInstance, onMounted } from 'vue';
|
15
|
-
|
16
|
-
let props = defineProps({
|
17
|
-
designer: {
|
18
|
-
type: Object,
|
19
|
-
default: () => {
|
20
|
-
return {}
|
21
|
-
}
|
22
|
-
},
|
23
|
-
widget: {
|
24
|
-
type: Object,
|
25
|
-
default: () => {
|
26
|
-
return {}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
})
|
30
|
-
props.designer.setVueIncetance(props.widget.id, getCurrentInstance())
|
31
|
-
|
32
|
-
let p = computed(() => props.widget.props)
|
33
|
-
|
34
|
-
const changeHandle = (value) => {
|
35
|
-
props.designer.eventHandle({
|
36
|
-
eventType: "onChange",
|
37
|
-
value: value,
|
38
|
-
widget: props.widget,
|
39
|
-
})
|
40
|
-
}
|
41
|
-
const inputHandle = (value) => {
|
42
|
-
props.designer.eventHandle({
|
43
|
-
eventType: "onInput",
|
44
|
-
value: value,
|
45
|
-
widget: props.widget,
|
46
|
-
})
|
47
|
-
}
|
48
|
-
const focusHandle = () => {
|
49
|
-
props.designer.eventHandle({
|
50
|
-
eventType: "onFocus",
|
51
|
-
value: props.widget.props.value,
|
52
|
-
widget: props.widget,
|
53
|
-
})
|
54
|
-
}
|
55
|
-
const blurHandle = (value) => {
|
56
|
-
props.designer.eventHandle({
|
57
|
-
eventType: "onBlur",
|
58
|
-
value: props.widget.props.value,
|
59
|
-
widget: props.widget,
|
60
|
-
})
|
61
|
-
}
|
62
|
-
const onHandle = () => {
|
63
|
-
props.designer.eventHandle({
|
64
|
-
eventType: "onHandle",
|
65
|
-
value: props.widget.props.value,
|
66
|
-
widget: props.widget,
|
67
|
-
})
|
68
|
-
}
|
69
|
-
props.designer.eventHandle({
|
70
|
-
eventType: "onCreated",
|
71
|
-
widget: props.widget,
|
72
|
-
})
|
73
|
-
onMounted(() => {
|
74
|
-
props.designer.eventHandle({
|
75
|
-
eventType: "onMounted",
|
76
|
-
widget: props.widget,
|
77
|
-
})
|
78
|
-
})
|
79
|
-
defineExpose({
|
80
|
-
changeHandle,
|
81
|
-
})
|
82
|
-
defineOptions({ name: "widget-input" })
|
83
|
-
</script>
|
84
|
-
|
85
|
-
<style scoped lang="scss"></style>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="widget-select">
|
3
|
-
<el-select v-model="widget.props.value" placeholder="请选择">
|
4
|
-
<el-option v-for="item in widget.props.list" :key="item.value" :label="item.label || ''"
|
5
|
-
:value="item.value || ''">
|
6
|
-
</el-option>
|
7
|
-
</el-select>
|
8
|
-
</div>
|
9
|
-
</template>
|
10
|
-
|
11
|
-
<script setup>
|
12
|
-
import { ref, reactive } from 'vue';
|
13
|
-
let props = defineProps({
|
14
|
-
designer: {
|
15
|
-
type: Object,
|
16
|
-
default: () => {
|
17
|
-
return {}
|
18
|
-
}
|
19
|
-
},
|
20
|
-
widget: {
|
21
|
-
type: Object,
|
22
|
-
default: () => {
|
23
|
-
return {}
|
24
|
-
}
|
25
|
-
}
|
26
|
-
})
|
27
|
-
let designer = props.designer
|
28
|
-
defineOptions({ name: "widget-select" })
|
29
|
-
</script>
|
30
|
-
|
31
|
-
<style scoped lang="scss"></style>
|