@vipl520/dk-ui 1.0.74 → 1.0.75
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/attributes.json +8 -0
- package/dist/index.js +360 -190
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +5 -5
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +359 -191
- package/dist/tags.json +7 -0
- package/dist/web-types.json +35 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +5 -1
- package/es/index.mjs.map +1 -1
- package/es/page-diy/style/cube-image.scss +71 -71
- package/es/page-diy/style/index.scss +1 -1
- package/es/style-custom-input/index.d.ts +18 -0
- package/es/style-custom-input/index.mjs +8 -0
- package/es/style-custom-input/index.mjs.map +1 -0
- package/es/style-custom-input/src/props.d.ts +8 -0
- package/es/style-custom-input/src/props.mjs +9 -0
- package/es/style-custom-input/src/props.mjs.map +1 -0
- package/es/style-custom-input/src/style-custom-input.vue.d.ts +17 -0
- package/es/style-custom-input/src/style-custom-input.vue.mjs +7 -0
- package/es/style-custom-input/src/style-custom-input.vue.mjs.map +1 -0
- package/es/style-custom-input/src/style-custom-input.vue2.mjs +139 -0
- package/es/style-custom-input/src/style-custom-input.vue2.mjs.map +1 -0
- package/es/style-custom-input/style/index.css +0 -0
- package/es/style-custom-input/style/index.scss +5 -0
- package/es/style-input/src/default.mjs +7 -0
- package/es/style-input/src/default.mjs.map +1 -1
- package/es/style-input/src/style-input.vue2.mjs +22 -8
- package/es/style-input/src/style-input.vue2.mjs.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +50 -44
- package/lib/index.js.map +1 -1
- package/lib/page-diy/style/cube-image.scss +71 -71
- package/lib/page-diy/style/index.scss +1 -1
- package/lib/style-custom-input/index.d.ts +18 -0
- package/lib/style-custom-input/index.js +14 -0
- package/lib/style-custom-input/index.js.map +1 -0
- package/lib/style-custom-input/src/props.d.ts +8 -0
- package/lib/style-custom-input/src/props.js +11 -0
- package/lib/style-custom-input/src/props.js.map +1 -0
- package/lib/style-custom-input/src/style-custom-input.vue.d.ts +17 -0
- package/lib/style-custom-input/src/style-custom-input.vue.js +11 -0
- package/lib/style-custom-input/src/style-custom-input.vue.js.map +1 -0
- package/lib/style-custom-input/src/style-custom-input.vue2.js +143 -0
- package/lib/style-custom-input/src/style-custom-input.vue2.js.map +1 -0
- package/lib/style-custom-input/style/index.css +0 -0
- package/lib/style-custom-input/style/index.scss +5 -0
- package/lib/style-input/src/default.js +7 -0
- package/lib/style-input/src/default.js.map +1 -1
- package/lib/style-input/src/style-input.vue2.js +22 -8
- package/lib/style-input/src/style-input.vue2.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-input.vue2.mjs","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-if=\"!props.isDrawer\" v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n <div v-else>\n <el-button type=\"primary\" plain style=\"width: 100%\" size=\"small\" @click=\"drawer = true\">\n {{ props.drawerText }}\n </el-button>\n <el-drawer v-model=\"drawer\" v-bind=\"props.drawerProps\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n </el-drawer>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleInputProps } from './props'\nimport { onMounted, ref, watch } from 'vue'\n\n\nconst props = defineProps(styleInputProps)\nconst drawer = ref(false)\nconst activeNames = ref([0])\nconst values: any = ref({})\nconst loading = ref(true)\n\nconst emit = defineEmits(['update:modelValue'])\nconst onChange = () => {\n const obj: any = {}\n Object.keys(values.value).forEach((key) => {\n Object.keys(values.value[key]).forEach((k) => {\n obj[k] = values.value[key][k]\n })\n })\n emit('update:modelValue', obj)\n}\n\nconst _components: any = ref([])\nconst init = () => {\n _components.value = props.components.filter((item: any) => {\n return !props.hideComponents.includes(item.name)\n })\n const obj: any = {}\n _components.value.forEach((item: any) => {\n const
|
1
|
+
{"version":3,"file":"style-input.vue2.mjs","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-if=\"!props.isDrawer\" v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n <div v-else>\n <el-button type=\"primary\" plain style=\"width: 100%\" size=\"small\" @click=\"drawer = true\">\n {{ props.drawerText }}\n </el-button>\n <el-drawer v-model=\"drawer\" v-bind=\"props.drawerProps\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n </el-drawer>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleInputProps } from './props'\nimport { onMounted, ref, watch } from 'vue'\n\n\nconst props = defineProps(styleInputProps)\nconst drawer = ref(false)\nconst activeNames = ref([0])\nconst values: any = ref({})\nconst loading = ref(true)\n\nconst emit = defineEmits(['update:modelValue'])\nconst onChange = () => {\n const obj: any = {}\n Object.keys(values.value).forEach((key) => {\n Object.keys(values.value[key]).forEach((k) => {\n obj[k] = values.value[key][k]\n })\n })\n emit('update:modelValue', obj)\n}\n\nconst _components: any = ref([])\n\nconst init = () => {\n // 初始化已使用的参数集合\n const usedParams = new Set<string>()\n\n // 过滤隐藏组件并初始化_components\n _components.value = props.components.filter((item: any) => {\n return !props.hideComponents.includes(item.name)\n })\n\n const obj: Record<string, Record<string, any>> = {}\n\n // 遍历非自定义组件以填充obj和usedParams\n _components.value.forEach((item: any) => {\n if (item.name !== 'DkStyleCustomInput') {\n const paramsObj: Record<string, any> = {}\n item.params.forEach((param: string) => {\n if (props.modelValue[param] !== undefined) {\n paramsObj[param] = props.modelValue[param]\n usedParams.add(param) // 标记为已使用\n }\n })\n obj[item.name] = paramsObj\n }\n })\n\n // 处理 DkStyleCustomInput 组件\n const customComponent = _components.value.find((item: any) => item.name === 'DkStyleCustomInput')\n\n if (customComponent) {\n const customParamsObj: Record<string, any> = {}\n Object.keys(props.modelValue).forEach((key) => {\n if (!usedParams.has(key)) {\n customParamsObj[key] = props.modelValue[key]\n }\n })\n obj[customComponent.name] = customParamsObj\n }\n\n console.log('props.modelValue', props.modelValue)\n console.log(obj)\n values.value = obj\n loading.value = false\n}\n\n// const init = () => {\n// _components.value = props.components.filter((item: any) => {\n// return !props.hideComponents.includes(item.name)\n// })\n// const obj: any = {}\n// _components.value.forEach((item: any) => {\n// const params = item.params\n// const paramsObj: any = {}\n// Object.keys(params).forEach((key) => {\n// const param = params[key]\n// if (props.modelValue[param]) {\n// paramsObj[param] = props.modelValue[param]\n// }\n// })\n// obj[item.name] = paramsObj\n// })\n// console.log('props.modelValue', props.modelValue)\n// console.log(obj)\n// values.value = obj\n// loading.value = false\n// }\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n {\n deep: true,\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":"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"}
|
package/lib/index.d.ts
CHANGED
@@ -27,6 +27,7 @@ export * from './style-shadow-input';
|
|
27
27
|
export * from './style-background-input';
|
28
28
|
export * from './style-position-input';
|
29
29
|
export * from './style-number-input';
|
30
|
+
export * from './style-custom-input';
|
30
31
|
export * from './table';
|
31
32
|
export * from './select';
|
32
33
|
export * from './poster-input';
|
package/lib/index.js
CHANGED
@@ -10,7 +10,7 @@ var index$1 = require('./tiny-editor/index.js');
|
|
10
10
|
var index$2 = require('./icon/index.js');
|
11
11
|
var index$4 = require('./color-input/index.js');
|
12
12
|
var index$5 = require('./hot-area-input/index.js');
|
13
|
-
var index$
|
13
|
+
var index$C = require('./dialog/index.js');
|
14
14
|
var index$6 = require('./form/index.js');
|
15
15
|
var index$7 = require('./attachment/index.js');
|
16
16
|
var index$8 = require('./attachment-dialog/index.js');
|
@@ -32,15 +32,16 @@ var index$q = require('./style-background-input/index.js');
|
|
32
32
|
var index$p = require('./style-shadow-input/index.js');
|
33
33
|
var index$r = require('./style-position-input/index.js');
|
34
34
|
var index$s = require('./style-number-input/index.js');
|
35
|
+
var index$t = require('./style-custom-input/index.js');
|
35
36
|
var index$i = require('./page-diy/index.js');
|
36
|
-
var index$
|
37
|
-
var index$
|
38
|
-
var index$
|
39
|
-
var index$
|
40
|
-
var index$
|
41
|
-
var index$
|
42
|
-
var index$
|
43
|
-
var index$
|
37
|
+
var index$u = require('./table/index.js');
|
38
|
+
var index$v = require('./select/index.js');
|
39
|
+
var index$w = require('./poster-input/index.js');
|
40
|
+
var index$x = require('./style-animation-input/index.js');
|
41
|
+
var index$y = require('./animate-select/index.js');
|
42
|
+
var index$A = require('./uni-icon-input/index.js');
|
43
|
+
var index$z = require('./uni-icon/index.js');
|
44
|
+
var index$B = require('./url-input/index.js');
|
44
45
|
var utils = require('@vipl520/utils');
|
45
46
|
var props = require('./tiny-editor/src/props.js');
|
46
47
|
var props$1 = require('./icon/src/props.js');
|
@@ -70,14 +71,15 @@ var props$o = require('./style-shadow-input/src/props.js');
|
|
70
71
|
var props$p = require('./style-background-input/src/props.js');
|
71
72
|
var props$q = require('./style-position-input/src/props.js');
|
72
73
|
var props$r = require('./style-number-input/src/props.js');
|
73
|
-
var props$s = require('./
|
74
|
-
var props$t = require('./
|
75
|
-
var props$u = require('./
|
76
|
-
var props$v = require('./
|
77
|
-
var props$w = require('./
|
78
|
-
var props$x = require('./
|
79
|
-
var props$y = require('./uni-icon
|
80
|
-
var props$z = require('./
|
74
|
+
var props$s = require('./style-custom-input/src/props.js');
|
75
|
+
var props$t = require('./table/src/props.js');
|
76
|
+
var props$u = require('./select/src/props.js');
|
77
|
+
var props$v = require('./poster-input/src/props.js');
|
78
|
+
var props$w = require('./style-animation-input/src/props.js');
|
79
|
+
var props$x = require('./animate-select/src/props.js');
|
80
|
+
var props$y = require('./uni-icon/src/props.js');
|
81
|
+
var props$z = require('./uni-icon-input/src/props.js');
|
82
|
+
var props$A = require('./url-input/src/props.js');
|
81
83
|
|
82
84
|
const components = [
|
83
85
|
index$k.Test,
|
@@ -91,7 +93,7 @@ const components = [
|
|
91
93
|
// 热区选择器
|
92
94
|
index$5.HotAreaInput,
|
93
95
|
// 对话框
|
94
|
-
index$
|
96
|
+
index$C.Dialog,
|
95
97
|
// json表单
|
96
98
|
index$6.Form,
|
97
99
|
// 附件
|
@@ -143,23 +145,25 @@ const components = [
|
|
143
145
|
// 样式文字
|
144
146
|
index$s.StyleNumberInput,
|
145
147
|
// 动画配置
|
146
|
-
index$
|
148
|
+
index$x.StyleAnimationInput,
|
149
|
+
// 自定义样式
|
150
|
+
index$t.StyleCustomInput,
|
147
151
|
// 动画class选择
|
148
|
-
index$
|
152
|
+
index$y.AnimateSelect,
|
149
153
|
// 数据表格
|
150
|
-
index$
|
154
|
+
index$u.Table,
|
151
155
|
// 选择
|
152
|
-
index$
|
156
|
+
index$v.Select,
|
153
157
|
// 表单组/对象表单
|
154
158
|
// 海报选择器
|
155
|
-
index$
|
159
|
+
index$w.PosterInput,
|
156
160
|
// 海报
|
157
|
-
index$
|
161
|
+
index$w.Poster,
|
158
162
|
Vue3DraggableResizable,
|
159
163
|
draggable,
|
160
|
-
index$
|
161
|
-
index$
|
162
|
-
index$
|
164
|
+
index$A.UniIconInput,
|
165
|
+
index$z.UniIcon,
|
166
|
+
index$B.UrlInput
|
163
167
|
// TODO 普通上传 upload
|
164
168
|
// TODO tag选择器 tag-input
|
165
169
|
// TODO 链接选择器 link-input
|
@@ -210,16 +214,17 @@ exports.StyleShadowContent = index$p.StyleShadowContent;
|
|
210
214
|
exports.StyleShadowInput = index$p.StyleShadowInput;
|
211
215
|
exports.StylePositionInput = index$r.StylePositionInput;
|
212
216
|
exports.StyleNumberInput = index$s.StyleNumberInput;
|
217
|
+
exports.StyleCustomInput = index$t.StyleCustomInput;
|
213
218
|
exports.PageDiy = index$i.PageDiy;
|
214
|
-
exports.Table = index$
|
215
|
-
exports.Select = index$
|
216
|
-
exports.Poster = index$
|
217
|
-
exports.PosterInput = index$
|
218
|
-
exports.StyleAnimationInput = index$
|
219
|
-
exports.AnimateSelect = index$
|
220
|
-
exports.UniIconInput = index$
|
221
|
-
exports.UniIcon = index$
|
222
|
-
exports.UrlInput = index$
|
219
|
+
exports.Table = index$u.Table;
|
220
|
+
exports.Select = index$v.Select;
|
221
|
+
exports.Poster = index$w.Poster;
|
222
|
+
exports.PosterInput = index$w.PosterInput;
|
223
|
+
exports.StyleAnimationInput = index$x.StyleAnimationInput;
|
224
|
+
exports.AnimateSelect = index$y.AnimateSelect;
|
225
|
+
exports.UniIconInput = index$A.UniIconInput;
|
226
|
+
exports.UniIcon = index$z.UniIcon;
|
227
|
+
exports.UrlInput = index$B.UrlInput;
|
223
228
|
exports.tinyEditorProps = props.tinyEditorProps;
|
224
229
|
exports.iconProps = props$1.iconProps;
|
225
230
|
exports.groupProps = props$2.groupProps;
|
@@ -250,14 +255,15 @@ exports.shadowInputProps = props$o.shadowInputProps;
|
|
250
255
|
exports.styleBackgroundInputProps = props$p.styleBackgroundInputProps;
|
251
256
|
exports.stylePositionInputProps = props$q.stylePositionInputProps;
|
252
257
|
exports.styleNumberInputProps = props$r.styleNumberInputProps;
|
253
|
-
exports.
|
254
|
-
exports.
|
255
|
-
exports.
|
256
|
-
exports.
|
257
|
-
exports.
|
258
|
-
exports.
|
259
|
-
exports.
|
260
|
-
exports.
|
258
|
+
exports.styleCustomInputProps = props$s.styleCustomInputProps;
|
259
|
+
exports.tableProps = props$t.tableProps;
|
260
|
+
exports.selectProps = props$u.selectProps;
|
261
|
+
exports.posterInputProps = props$v.posterInputProps;
|
262
|
+
exports.styleAnimationInputProps = props$w.styleAnimationInputProps;
|
263
|
+
exports.animateSelectProps = props$x.animateSelectProps;
|
264
|
+
exports.uniIconProps = props$y.uniIconProps;
|
265
|
+
exports.uniIconInputProps = props$z.uniIconInputProps;
|
266
|
+
exports.urlInputProps = props$A.urlInputProps;
|
261
267
|
exports.default = index;
|
262
268
|
exports.install = install;
|
263
269
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\nimport { UrlInput } from './url-input'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\nexport * from './uni-icon'\nexport * from './uni-icon-input'\nexport * from './url-input'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n UrlInput,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":["Test","Group","TinyEditor","Icon","ColorInput","HotAreaInput","Dialog","Form","Attachment","AttachmentDialog","FileInput","ImageInput","AudioInput","VideoInput","FileListInput","ImageListInput","AudioListInput","VideoListInput","IconInput","IconContent","IconDialog","PageDiy","BoxSizeInput","StyleBoxInput","StyleFontInput","StyleBorderInput","StyleShadowInput","StyleShadowContent","StyleBackgroundInput","StyleInput","StylePositionInput","StyleNumberInput","StyleAnimationInput","AnimateSelect","Table","Select","PosterInput","Poster","UniIconInput","UniIcon","UrlInput","directives","setGlobalConfig"],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { StyleCustomInput } from './style-custom-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\nimport { UrlInput } from './url-input'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './style-custom-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\nexport * from './uni-icon'\nexport * from './uni-icon-input'\nexport * from './url-input'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 自定义样式\n StyleCustomInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n UrlInput,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":["Test","Group","TinyEditor","Icon","ColorInput","HotAreaInput","Dialog","Form","Attachment","AttachmentDialog","FileInput","ImageInput","AudioInput","VideoInput","FileListInput","ImageListInput","AudioListInput","VideoListInput","IconInput","IconContent","IconDialog","PageDiy","BoxSizeInput","StyleBoxInput","StyleFontInput","StyleBorderInput","StyleShadowInput","StyleShadowContent","StyleBackgroundInput","StyleInput","StylePositionInput","StyleNumberInput","StyleAnimationInput","StyleCustomInput","AnimateSelect","Table","Select","PosterInput","Poster","UniIconInput","UniIcon","UrlInput","directives","setGlobalConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,MAAM,UAAa,GAAA;AAAA,EACjBA,YAAA;AAAA,EACAC,aAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,mBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,eAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,4BAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,2BAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,aAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA;AAAA,EAGAC,mBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA,EACA,sBAAA;AAAA,EACA,SAAA;AAAA,EACAC,oBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,gBAAA;AAAA;AAAA;AAAA;AAAA;AAKF,CAAA,CAAA;AAEO,MAAM,OAAU,GAAA,CAAC,GAAU,EAAA,MAAA,GAAc,EAAO,KAAA;AACrD,EAAW,UAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AAC3B,IAAA,IAAI,KAAK,OAAU,EAAA;AACjB,MAAA,GAAA,CAAI,IAAI,IAAI,CAAA,CAAA;AAAA,KACd,MAAA,IAAW,KAAK,IAAM,EAAA;AACpB,MAAI,GAAA,CAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KAC/B;AAAA,GACD,CAAA,CAAA;AACD,EAAAC,gBAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAAC,qBAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,71 +1,71 @@
|
|
1
|
-
/* stylelint-disable */
|
2
|
-
.design-cube {
|
3
|
-
position: relative;
|
4
|
-
width: 100%;
|
5
|
-
|
6
|
-
.cube-col {
|
7
|
-
float: left;
|
8
|
-
padding: 0;
|
9
|
-
margin: 0;
|
10
|
-
list-style: none;
|
11
|
-
}
|
12
|
-
|
13
|
-
.cube-item {
|
14
|
-
box-sizing: border-box;
|
15
|
-
display: flex;
|
16
|
-
align-items: center;
|
17
|
-
justify-content: space-around;
|
18
|
-
text-align: center;
|
19
|
-
cursor: pointer;
|
20
|
-
background: #f8f8f8;
|
21
|
-
border-right: 1px solid #e5e5e5;
|
22
|
-
border-bottom: 1px solid #e5e5e5;
|
23
|
-
border-left: 1px solid #e5e5e5;
|
24
|
-
|
25
|
-
&:first-child {
|
26
|
-
border-top: 1px solid #e5e5e5;
|
27
|
-
}
|
28
|
-
|
29
|
-
&.item-selected,
|
30
|
-
&.item-selecting {
|
31
|
-
background: #e0edff;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
.selected-area {
|
36
|
-
position: absolute;
|
37
|
-
box-sizing: border-box;
|
38
|
-
overflow: hidden;
|
39
|
-
color: #7d7e80;
|
40
|
-
text-align: center;
|
41
|
-
cursor: pointer;
|
42
|
-
background-color: #fff;
|
43
|
-
border: 1px solid #ebedf0;
|
44
|
-
|
45
|
-
img {
|
46
|
-
width: 100%;
|
47
|
-
}
|
48
|
-
|
49
|
-
&.selected-area-choose {
|
50
|
-
border: 1px solid #f00;
|
51
|
-
}
|
52
|
-
|
53
|
-
.cube-selected-text {
|
54
|
-
position: absolute;
|
55
|
-
top: 50%;
|
56
|
-
left: 50%;
|
57
|
-
width: 100%;
|
58
|
-
font-size: 12px;
|
59
|
-
transform: translate(-50%) translateY(-50%);
|
60
|
-
}
|
61
|
-
|
62
|
-
.cube-close {
|
63
|
-
position: absolute;
|
64
|
-
top: 5px;
|
65
|
-
right: 5px;
|
66
|
-
z-index: 99;
|
67
|
-
font-size: 18px;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
71
|
-
/* stylelint-enable */
|
1
|
+
/* stylelint-disable */
|
2
|
+
.design-cube {
|
3
|
+
position: relative;
|
4
|
+
width: 100%;
|
5
|
+
|
6
|
+
.cube-col {
|
7
|
+
float: left;
|
8
|
+
padding: 0;
|
9
|
+
margin: 0;
|
10
|
+
list-style: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
.cube-item {
|
14
|
+
box-sizing: border-box;
|
15
|
+
display: flex;
|
16
|
+
align-items: center;
|
17
|
+
justify-content: space-around;
|
18
|
+
text-align: center;
|
19
|
+
cursor: pointer;
|
20
|
+
background: #f8f8f8;
|
21
|
+
border-right: 1px solid #e5e5e5;
|
22
|
+
border-bottom: 1px solid #e5e5e5;
|
23
|
+
border-left: 1px solid #e5e5e5;
|
24
|
+
|
25
|
+
&:first-child {
|
26
|
+
border-top: 1px solid #e5e5e5;
|
27
|
+
}
|
28
|
+
|
29
|
+
&.item-selected,
|
30
|
+
&.item-selecting {
|
31
|
+
background: #e0edff;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
.selected-area {
|
36
|
+
position: absolute;
|
37
|
+
box-sizing: border-box;
|
38
|
+
overflow: hidden;
|
39
|
+
color: #7d7e80;
|
40
|
+
text-align: center;
|
41
|
+
cursor: pointer;
|
42
|
+
background-color: #fff;
|
43
|
+
border: 1px solid #ebedf0;
|
44
|
+
|
45
|
+
img {
|
46
|
+
width: 100%;
|
47
|
+
}
|
48
|
+
|
49
|
+
&.selected-area-choose {
|
50
|
+
border: 1px solid #f00;
|
51
|
+
}
|
52
|
+
|
53
|
+
.cube-selected-text {
|
54
|
+
position: absolute;
|
55
|
+
top: 50%;
|
56
|
+
left: 50%;
|
57
|
+
width: 100%;
|
58
|
+
font-size: 12px;
|
59
|
+
transform: translate(-50%) translateY(-50%);
|
60
|
+
}
|
61
|
+
|
62
|
+
.cube-close {
|
63
|
+
position: absolute;
|
64
|
+
top: 5px;
|
65
|
+
right: 5px;
|
66
|
+
z-index: 99;
|
67
|
+
font-size: 18px;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
/* stylelint-enable */
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare const StyleCustomInput: import("@vipl520/utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
modelValue: {
|
3
|
+
type: ObjectConstructor;
|
4
|
+
default: () => {};
|
5
|
+
};
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
|
+
modelValue: {
|
8
|
+
type: ObjectConstructor;
|
9
|
+
default: () => {};
|
10
|
+
};
|
11
|
+
}>> & {
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
14
|
+
}, {
|
15
|
+
modelValue: Record<string, any>;
|
16
|
+
}, {}>>;
|
17
|
+
export default StyleCustomInput;
|
18
|
+
export * from './src/props';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var utils = require('@vipl520/utils');
|
6
|
+
var styleCustomInput = require('./src/style-custom-input.vue.js');
|
7
|
+
var props = require('./src/props.js');
|
8
|
+
|
9
|
+
const StyleCustomInput = utils.withInstall(styleCustomInput.default);
|
10
|
+
|
11
|
+
exports.styleCustomInputProps = props.styleCustomInputProps;
|
12
|
+
exports.StyleCustomInput = StyleCustomInput;
|
13
|
+
exports.default = StyleCustomInput;
|
14
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/style-custom-input/index.ts"],"sourcesContent":["import { withInstall } from '@vipl520/utils'\nimport _StyleCustomInput from './src/style-custom-input.vue'\n\nexport const StyleCustomInput = withInstall(_StyleCustomInput)\nexport default StyleCustomInput\n\nexport * from './src/props'\n"],"names":["withInstall","_StyleCustomInput"],"mappings":";;;;;;;;AAGa,MAAA,gBAAA,GAAmBA,kBAAYC,wBAAiB;;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../src/style-custom-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleCustomInputProps = {\n modelValue: {\n type: Object,\n default: () => ({}),\n },\n}\n\nexport type StyleCustomInputProps = ExtractPropTypes<typeof styleCustomInputProps>\n"],"names":[],"mappings":";;AAEO,MAAM,qBAAwB,GAAA;AAAA,EACnC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AACF;;;;"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
modelValue: {
|
3
|
+
type: ObjectConstructor;
|
4
|
+
default: () => {};
|
5
|
+
};
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
|
+
modelValue: {
|
8
|
+
type: ObjectConstructor;
|
9
|
+
default: () => {};
|
10
|
+
};
|
11
|
+
}>> & {
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
14
|
+
}, {
|
15
|
+
modelValue: Record<string, any>;
|
16
|
+
}, {}>;
|
17
|
+
export default _default;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var styleCustomInput_vue_vue_type_script_setup_true_lang = require('./style-custom-input.vue2.js');
|
6
|
+
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
|
7
|
+
|
8
|
+
var _StyleCustomInput = /* @__PURE__ */ _pluginVue_exportHelper.default(styleCustomInput_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\style-custom-input\\src\\style-custom-input.vue"]]);
|
9
|
+
|
10
|
+
exports.default = _StyleCustomInput;
|
11
|
+
//# sourceMappingURL=style-custom-input.vue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"style-custom-input.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
@@ -0,0 +1,143 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var vue = require('vue');
|
6
|
+
var props = require('./props.js');
|
7
|
+
|
8
|
+
const _hoisted_1 = { style: {} };
|
9
|
+
const __default__ = vue.defineComponent({
|
10
|
+
name: "DkStyleCustomInput"
|
11
|
+
});
|
12
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: props.styleCustomInputProps,
|
15
|
+
emits: ["update:modelValue", "change"],
|
16
|
+
setup(__props, { emit }) {
|
17
|
+
const props = __props;
|
18
|
+
const column = [
|
19
|
+
{ label: "\u952E\u540D", key: "label" },
|
20
|
+
{ label: "\u503C", key: "value" }
|
21
|
+
];
|
22
|
+
const tidyModelValue = () => {
|
23
|
+
return Object.keys(props.modelValue || {}).map((label) => {
|
24
|
+
return { label, value: props.modelValue[label] };
|
25
|
+
});
|
26
|
+
};
|
27
|
+
const styles = vue.reactive(tidyModelValue());
|
28
|
+
const onInput = (item) => {
|
29
|
+
const flag = column.every((v) => {
|
30
|
+
return item[v.key] !== void 0 && item[v.key] !== "" && item[v.key] !== null;
|
31
|
+
});
|
32
|
+
console.log("f", flag);
|
33
|
+
if (flag) {
|
34
|
+
input();
|
35
|
+
}
|
36
|
+
};
|
37
|
+
const tidyValue = () => {
|
38
|
+
const obj = {};
|
39
|
+
styles.forEach((v) => {
|
40
|
+
if (v.label && v.value) {
|
41
|
+
obj[v.label] = v.value;
|
42
|
+
}
|
43
|
+
});
|
44
|
+
return obj;
|
45
|
+
};
|
46
|
+
const input = () => {
|
47
|
+
const value = tidyValue();
|
48
|
+
console.log("value", value);
|
49
|
+
emit("update:modelValue", value);
|
50
|
+
emit("change", value);
|
51
|
+
};
|
52
|
+
const del = (idx) => {
|
53
|
+
styles.splice(idx, 1);
|
54
|
+
input();
|
55
|
+
};
|
56
|
+
const add = () => {
|
57
|
+
styles.push(
|
58
|
+
column.reduce((initial, v) => {
|
59
|
+
initial[v.key] = "";
|
60
|
+
return initial;
|
61
|
+
}, {})
|
62
|
+
);
|
63
|
+
};
|
64
|
+
return (_ctx, _cache) => {
|
65
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
66
|
+
const _component_el_table_column = vue.resolveComponent("el-table-column");
|
67
|
+
const _component_dk_icon = vue.resolveComponent("dk-icon");
|
68
|
+
const _component_el_table = vue.resolveComponent("el-table");
|
69
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
70
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
71
|
+
vue.createVNode(_component_el_table, {
|
72
|
+
data: styles,
|
73
|
+
border: "",
|
74
|
+
size: "small",
|
75
|
+
style: { "width": "100%" }
|
76
|
+
}, {
|
77
|
+
default: vue.withCtx(() => [
|
78
|
+
(vue.openBlock(), vue.createElementBlock(
|
79
|
+
vue.Fragment,
|
80
|
+
null,
|
81
|
+
vue.renderList(column, (col, idx) => {
|
82
|
+
return vue.createVNode(_component_el_table_column, {
|
83
|
+
key: col.label + idx,
|
84
|
+
label: col.label
|
85
|
+
}, {
|
86
|
+
default: vue.withCtx((scope) => [
|
87
|
+
vue.createVNode(_component_el_input, {
|
88
|
+
size: "small",
|
89
|
+
"model-value": scope.row[col.key] || "",
|
90
|
+
"onUpdate:modelValue": (n) => scope.row[col.key] = n,
|
91
|
+
onInput: ($event) => onInput(scope.row)
|
92
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onInput"])
|
93
|
+
]),
|
94
|
+
_: 2
|
95
|
+
/* DYNAMIC */
|
96
|
+
}, 1032, ["label"]);
|
97
|
+
}),
|
98
|
+
64
|
99
|
+
/* STABLE_FRAGMENT */
|
100
|
+
)),
|
101
|
+
vue.createVNode(_component_el_table_column, {
|
102
|
+
width: "70",
|
103
|
+
align: "center",
|
104
|
+
fixed: "right",
|
105
|
+
label: "\u64CD\u4F5C"
|
106
|
+
}, {
|
107
|
+
default: vue.withCtx((scope) => [
|
108
|
+
vue.createVNode(_component_dk_icon, {
|
109
|
+
icon: "Delete",
|
110
|
+
onClick: ($event) => del(scope.$index)
|
111
|
+
}, null, 8, ["onClick"])
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
/* STABLE */
|
115
|
+
})
|
116
|
+
]),
|
117
|
+
_: 1
|
118
|
+
/* STABLE */
|
119
|
+
}, 8, ["data"]),
|
120
|
+
vue.createElementVNode("div", _hoisted_1, [
|
121
|
+
vue.createVNode(_component_el_button, {
|
122
|
+
circle: "",
|
123
|
+
type: "primary",
|
124
|
+
link: "",
|
125
|
+
size: "small",
|
126
|
+
style: { "margin-left": "20px" },
|
127
|
+
onClick: _cache[0] || (_cache[0] = ($event) => add())
|
128
|
+
}, {
|
129
|
+
default: vue.withCtx(() => [
|
130
|
+
vue.createVNode(_component_dk_icon, { icon: "CirclePlusFilled" }),
|
131
|
+
vue.createTextVNode(" \u6DFB\u52A0 ")
|
132
|
+
]),
|
133
|
+
_: 1
|
134
|
+
/* STABLE */
|
135
|
+
})
|
136
|
+
])
|
137
|
+
]);
|
138
|
+
};
|
139
|
+
}
|
140
|
+
});
|
141
|
+
|
142
|
+
exports.default = _sfc_main;
|
143
|
+
//# sourceMappingURL=style-custom-input.vue2.js.map
|