@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
package/dist/tags.json
CHANGED
@@ -214,6 +214,13 @@
|
|
214
214
|
],
|
215
215
|
"description": "组件描述组件描述组件描述组件描述组件描述组件描述。\n\n[Docs](https://github.com/vipl520/dk-starter/components/project/#styleboxinput)"
|
216
216
|
},
|
217
|
+
"dk-style-custom-input": {
|
218
|
+
"attributes": [
|
219
|
+
"type",
|
220
|
+
"click"
|
221
|
+
],
|
222
|
+
"description": "组件描述组件描述组件描述组件描述组件描述组件描述。\n\n[Docs](https://github.com/vipl520/dk-starter/components/project/#stylecustominput)"
|
223
|
+
},
|
217
224
|
"dk-style-font-input": {
|
218
225
|
"attributes": [
|
219
226
|
"type",
|
package/dist/web-types.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"$schema": "http://json.schemastore.org/web-types",
|
3
3
|
"framework": "vue",
|
4
4
|
"name": "dk",
|
5
|
-
"version": "1.0.
|
5
|
+
"version": "1.0.74",
|
6
6
|
"js-types-syntax": "typescript",
|
7
7
|
"description-markup": "markdown",
|
8
8
|
"contributions": {
|
@@ -1302,6 +1302,40 @@
|
|
1302
1302
|
]
|
1303
1303
|
}
|
1304
1304
|
},
|
1305
|
+
{
|
1306
|
+
"name": "dk-style-custom-input",
|
1307
|
+
"source": {
|
1308
|
+
"symbol": "DkUIStyleCustomInput"
|
1309
|
+
},
|
1310
|
+
"description": "组件描述组件描述组件描述组件描述组件描述组件描述。",
|
1311
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#stylecustominput",
|
1312
|
+
"props": [
|
1313
|
+
{
|
1314
|
+
"name": "type",
|
1315
|
+
"description": "参数类型",
|
1316
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#stylecustominput-props",
|
1317
|
+
"type": [
|
1318
|
+
"string"
|
1319
|
+
]
|
1320
|
+
}
|
1321
|
+
],
|
1322
|
+
"slots": [
|
1323
|
+
{
|
1324
|
+
"name": "default",
|
1325
|
+
"description": "自定义默认内容",
|
1326
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#stylecustominput-slots"
|
1327
|
+
}
|
1328
|
+
],
|
1329
|
+
"js": {
|
1330
|
+
"events": [
|
1331
|
+
{
|
1332
|
+
"name": "click",
|
1333
|
+
"description": "点击触发的事件",
|
1334
|
+
"doc-url": "https://github.com/vipl520/dk-starter/components/project/#stylecustominput-events"
|
1335
|
+
}
|
1336
|
+
]
|
1337
|
+
}
|
1338
|
+
},
|
1305
1339
|
{
|
1306
1340
|
"name": "dk-style-font-input",
|
1307
1341
|
"source": {
|
package/es/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/es/index.mjs
CHANGED
@@ -28,6 +28,7 @@ import { StyleBackgroundInput } from './style-background-input/index.mjs';
|
|
28
28
|
import { StyleShadowInput, StyleShadowContent } from './style-shadow-input/index.mjs';
|
29
29
|
import { StylePositionInput } from './style-position-input/index.mjs';
|
30
30
|
import { StyleNumberInput } from './style-number-input/index.mjs';
|
31
|
+
import { StyleCustomInput } from './style-custom-input/index.mjs';
|
31
32
|
import { PageDiy } from './page-diy/index.mjs';
|
32
33
|
import { Table } from './table/index.mjs';
|
33
34
|
import { Select } from './select/index.mjs';
|
@@ -66,6 +67,7 @@ export { shadowInputProps } from './style-shadow-input/src/props.mjs';
|
|
66
67
|
export { styleBackgroundInputProps } from './style-background-input/src/props.mjs';
|
67
68
|
export { stylePositionInputProps } from './style-position-input/src/props.mjs';
|
68
69
|
export { styleNumberInputProps } from './style-number-input/src/props.mjs';
|
70
|
+
export { styleCustomInputProps } from './style-custom-input/src/props.mjs';
|
69
71
|
export { tableProps } from './table/src/props.mjs';
|
70
72
|
export { selectProps } from './select/src/props.mjs';
|
71
73
|
export { posterInputProps } from './poster-input/src/props.mjs';
|
@@ -140,6 +142,8 @@ const components = [
|
|
140
142
|
StyleNumberInput,
|
141
143
|
// 动画配置
|
142
144
|
StyleAnimationInput,
|
145
|
+
// 自定义样式
|
146
|
+
StyleCustomInput,
|
143
147
|
// 动画class选择
|
144
148
|
AnimateSelect,
|
145
149
|
// 数据表格
|
@@ -176,5 +180,5 @@ var index = {
|
|
176
180
|
install
|
177
181
|
};
|
178
182
|
|
179
|
-
export { AnimateSelect, Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleAnimationInput, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, UniIcon, UniIconInput, UrlInput, VideoInput, VideoListInput, index as default, install };
|
183
|
+
export { AnimateSelect, Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleAnimationInput, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleCustomInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, UniIcon, UniIconInput, UrlInput, VideoInput, VideoListInput, index as default, install };
|
180
184
|
//# sourceMappingURL=index.mjs.map
|
package/es/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","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":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,MAAM,UAAa,GAAA;AAAA,EACjB,IAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA,MAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,gBAAA;AAAA;AAAA,EAEA,SAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,SAAA;AAAA;AAAA,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
-
.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,8 @@
|
|
1
|
+
import { withInstall } from '@vipl520/utils';
|
2
|
+
import _StyleCustomInput from './src/style-custom-input.vue.mjs';
|
3
|
+
export { styleCustomInputProps } from './src/props.mjs';
|
4
|
+
|
5
|
+
const StyleCustomInput = withInstall(_StyleCustomInput);
|
6
|
+
|
7
|
+
export { StyleCustomInput, StyleCustomInput as default };
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","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":[],"mappings":";;;;AAGa,MAAA,gBAAA,GAAmB,YAAY,iBAAiB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"props.mjs","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,7 @@
|
|
1
|
+
import _sfc_main from './style-custom-input.vue2.mjs';
|
2
|
+
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
3
|
+
|
4
|
+
var _StyleCustomInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\style-custom-input\\src\\style-custom-input.vue"]]);
|
5
|
+
|
6
|
+
export { _StyleCustomInput as default };
|
7
|
+
//# sourceMappingURL=style-custom-input.vue.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"style-custom-input.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import { defineComponent, reactive, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, createTextVNode } from 'vue';
|
2
|
+
import { styleCustomInputProps } from './props.mjs';
|
3
|
+
|
4
|
+
const _hoisted_1 = { style: {} };
|
5
|
+
const __default__ = defineComponent({
|
6
|
+
name: "DkStyleCustomInput"
|
7
|
+
});
|
8
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
9
|
+
...__default__,
|
10
|
+
props: styleCustomInputProps,
|
11
|
+
emits: ["update:modelValue", "change"],
|
12
|
+
setup(__props, { emit }) {
|
13
|
+
const props = __props;
|
14
|
+
const column = [
|
15
|
+
{ label: "\u952E\u540D", key: "label" },
|
16
|
+
{ label: "\u503C", key: "value" }
|
17
|
+
];
|
18
|
+
const tidyModelValue = () => {
|
19
|
+
return Object.keys(props.modelValue || {}).map((label) => {
|
20
|
+
return { label, value: props.modelValue[label] };
|
21
|
+
});
|
22
|
+
};
|
23
|
+
const styles = reactive(tidyModelValue());
|
24
|
+
const onInput = (item) => {
|
25
|
+
const flag = column.every((v) => {
|
26
|
+
return item[v.key] !== void 0 && item[v.key] !== "" && item[v.key] !== null;
|
27
|
+
});
|
28
|
+
console.log("f", flag);
|
29
|
+
if (flag) {
|
30
|
+
input();
|
31
|
+
}
|
32
|
+
};
|
33
|
+
const tidyValue = () => {
|
34
|
+
const obj = {};
|
35
|
+
styles.forEach((v) => {
|
36
|
+
if (v.label && v.value) {
|
37
|
+
obj[v.label] = v.value;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
return obj;
|
41
|
+
};
|
42
|
+
const input = () => {
|
43
|
+
const value = tidyValue();
|
44
|
+
console.log("value", value);
|
45
|
+
emit("update:modelValue", value);
|
46
|
+
emit("change", value);
|
47
|
+
};
|
48
|
+
const del = (idx) => {
|
49
|
+
styles.splice(idx, 1);
|
50
|
+
input();
|
51
|
+
};
|
52
|
+
const add = () => {
|
53
|
+
styles.push(
|
54
|
+
column.reduce((initial, v) => {
|
55
|
+
initial[v.key] = "";
|
56
|
+
return initial;
|
57
|
+
}, {})
|
58
|
+
);
|
59
|
+
};
|
60
|
+
return (_ctx, _cache) => {
|
61
|
+
const _component_el_input = resolveComponent("el-input");
|
62
|
+
const _component_el_table_column = resolveComponent("el-table-column");
|
63
|
+
const _component_dk_icon = resolveComponent("dk-icon");
|
64
|
+
const _component_el_table = resolveComponent("el-table");
|
65
|
+
const _component_el_button = resolveComponent("el-button");
|
66
|
+
return openBlock(), createElementBlock("div", null, [
|
67
|
+
createVNode(_component_el_table, {
|
68
|
+
data: styles,
|
69
|
+
border: "",
|
70
|
+
size: "small",
|
71
|
+
style: { "width": "100%" }
|
72
|
+
}, {
|
73
|
+
default: withCtx(() => [
|
74
|
+
(openBlock(), createElementBlock(
|
75
|
+
Fragment,
|
76
|
+
null,
|
77
|
+
renderList(column, (col, idx) => {
|
78
|
+
return createVNode(_component_el_table_column, {
|
79
|
+
key: col.label + idx,
|
80
|
+
label: col.label
|
81
|
+
}, {
|
82
|
+
default: withCtx((scope) => [
|
83
|
+
createVNode(_component_el_input, {
|
84
|
+
size: "small",
|
85
|
+
"model-value": scope.row[col.key] || "",
|
86
|
+
"onUpdate:modelValue": (n) => scope.row[col.key] = n,
|
87
|
+
onInput: ($event) => onInput(scope.row)
|
88
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onInput"])
|
89
|
+
]),
|
90
|
+
_: 2
|
91
|
+
/* DYNAMIC */
|
92
|
+
}, 1032, ["label"]);
|
93
|
+
}),
|
94
|
+
64
|
95
|
+
/* STABLE_FRAGMENT */
|
96
|
+
)),
|
97
|
+
createVNode(_component_el_table_column, {
|
98
|
+
width: "70",
|
99
|
+
align: "center",
|
100
|
+
fixed: "right",
|
101
|
+
label: "\u64CD\u4F5C"
|
102
|
+
}, {
|
103
|
+
default: withCtx((scope) => [
|
104
|
+
createVNode(_component_dk_icon, {
|
105
|
+
icon: "Delete",
|
106
|
+
onClick: ($event) => del(scope.$index)
|
107
|
+
}, null, 8, ["onClick"])
|
108
|
+
]),
|
109
|
+
_: 1
|
110
|
+
/* STABLE */
|
111
|
+
})
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
/* STABLE */
|
115
|
+
}, 8, ["data"]),
|
116
|
+
createElementVNode("div", _hoisted_1, [
|
117
|
+
createVNode(_component_el_button, {
|
118
|
+
circle: "",
|
119
|
+
type: "primary",
|
120
|
+
link: "",
|
121
|
+
size: "small",
|
122
|
+
style: { "margin-left": "20px" },
|
123
|
+
onClick: _cache[0] || (_cache[0] = ($event) => add())
|
124
|
+
}, {
|
125
|
+
default: withCtx(() => [
|
126
|
+
createVNode(_component_dk_icon, { icon: "CirclePlusFilled" }),
|
127
|
+
createTextVNode(" \u6DFB\u52A0 ")
|
128
|
+
]),
|
129
|
+
_: 1
|
130
|
+
/* STABLE */
|
131
|
+
})
|
132
|
+
])
|
133
|
+
]);
|
134
|
+
};
|
135
|
+
}
|
136
|
+
});
|
137
|
+
|
138
|
+
export { _sfc_main as default };
|
139
|
+
//# sourceMappingURL=style-custom-input.vue2.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"style-custom-input.vue2.mjs","sources":["../../../src/style-custom-input/src/style-custom-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleCustomInput',\n});\n</script>\n<template>\n <div>\n <el-table :data=\"styles\" border :size=\"'small'\" style=\"width: 100%\">\n <template v-for=\"(col, idx) in column\" :key=\"col.label + idx\">\n <el-table-column :label=\"col.label\">\n <template #default=\"scope\">\n <el-input\n :size=\"'small'\"\n :model-value=\"scope.row[col.key] || ''\"\n @update:modelValue=\"(n: any) => (scope.row[col.key] = n)\"\n @input=\"onInput(scope.row)\"\n ></el-input>\n </template>\n </el-table-column>\n </template>\n <el-table-column width=\"70\" align=\"center\" fixed=\"right\" label=\"操作\">\n <template #default=\"scope\">\n <dk-icon icon=\"Delete\" @click=\"del(scope.$index)\"></dk-icon>\n </template>\n </el-table-column>\n </el-table>\n <div style=\"\">\n <el-button circle type=\"primary\" link size=\"small\" style=\"margin-left: 20px\" @click=\"add()\">\n <dk-icon icon=\"CirclePlusFilled\"></dk-icon>\n 添加\n </el-button>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleCustomInputProps } from './props'\nimport { reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleCustomInputProps)\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst column = [\n { label: '键名', key: 'label' },\n { label: '值', key: 'value' },\n]\n\nconst tidyModelValue = () => {\n return Object.keys(props.modelValue || {}).map((label) => {\n return { label, value: props.modelValue[label] }\n })\n}\nconst styles: any = reactive(tidyModelValue())\nconst onInput = (item: any) => {\n const flag = column.every((v) => {\n return item[v.key] !== undefined && item[v.key] !== '' && item[v.key] !== null\n })\n console.log('f', flag)\n if (flag) {\n input()\n }\n}\n\nconst tidyValue = () => {\n const obj: any = {}\n styles.forEach((v: any) => {\n if (v.label && v.value) {\n obj[v.label] = v.value\n }\n })\n return obj\n}\n\nconst input = () => {\n const value = tidyValue()\n console.log('value', value)\n emit('update:modelValue', value)\n emit('change', value)\n}\n\nconst del = (idx: any) => {\n styles.splice(idx, 1)\n input()\n}\n\nconst add = () => {\n styles.push(\n column.reduce((initial: any, v: any) => {\n initial[v.key] = ''\n return initial\n }, {})\n )\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0CD,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAAE,KAAA,EAAO,cAAM,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ACD,CAAA,CAAA;AACD,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAA,MAAM,QAAQ,MAAM;AAClB,MAAA,MAAM,QAAQ,SAAU,EAAA,CAAA;AACxB,MAAQ,OAAA,CAAA,GAAA,CAAI,SAAS,KAAK,CAAA,CAAA;AAC1B,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB,CAAA;AAEA,IAAM,MAAA,GAAA,GAAM,CAAC,GAAa,KAAA;AACxB,MAAO,MAAA,CAAA,MAAA,CAAO,KAAK,CAAC,CAAA,CAAA;AACpB,MAAM,KAAA,EAAA,CAAA;AAAA,KACR,CAAA;AAEA,IAAA,MAAM,MAAM,MAAM;AAChB,MAAO,MAAA,CAAA,IAAA;AAAA,QACL,MAAO,CAAA,MAAA,CAAO,CAAC,OAAA,EAAc,CAAW,KAAA;AACtC,UAAQ,OAAA,CAAA,CAAA,CAAE,GAAG,CAAI,GAAA,EAAA,CAAA;AACjB,UAAO,OAAA,OAAA,CAAA;AAAA,SACT,EAAG,EAAE,CAAA;AAAA,OACP,CAAA;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"default.mjs","sources":["../../../src/style-input/src/default.ts"],"sourcesContent":["export type StyleInputConfigItem = {\n name: string\n title: string\n props: Record<string, any>\n value: Record<string, any>\n params: string[]\n}\n\nexport type StyleInputConfig = StyleInputConfigItem[]\nexport const defaultConfig: StyleInputConfig = [\n {\n name: 'DkStyleBoxInput',\n title: '尺寸',\n props: {},\n value: {},\n params: [\n 'marginLeft',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'paddingLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'width',\n 'height',\n ],\n },\n {\n name: 'DkStyleFontInput',\n title: '文字',\n props: {},\n value: {},\n params: ['fontSize', 'color', 'fontWeight', 'fontStyle', 'textDecoration'],\n },\n {\n name: 'DkStyleBackgroundInput',\n title: '背景',\n props: {},\n value: {},\n params: ['backgroundColor', 'backgroundImage'],\n },\n {\n name: 'DkStyleBorderInput',\n title: '边框',\n props: {},\n value: {},\n params: [\n 'borderWidth',\n 'borderStyle',\n 'borderColor',\n 'borderRightWidth',\n 'borderRightStyle',\n 'borderRightColor',\n 'borderLeftWidth',\n 'borderLeftStyle',\n 'borderLeftColor',\n 'borderTopWidth',\n 'borderTopStyle',\n 'borderTopColor',\n 'borderBottomWidth',\n 'borderBottomStyle',\n 'borderBottomColor',\n 'borderRadius',\n ],\n },\n {\n name: 'DkStyleShadowInput',\n title: '阴影',\n props: {},\n value: {},\n params: ['boxShadow'],\n },\n // {\n // name: 'DkStylePositionInput',\n // title: '位置',\n // props: {},\n // value: {},\n // params: ['top', 'left', 'right', 'bottom'],\n // },\n]\n\n// 根据上面的格式生成类型\n\n// 对象内要包含: name props value params 这样生成的数组\n"],"names":[],"mappings":"AASO,MAAM,aAAkC,GAAA;AAAA,EAC7C;AAAA,IACE,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,MAAQ,EAAA;AAAA,MACN,YAAA;AAAA,MACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,KACF;AAAA,GACF;AAAA,EACA;AAAA,IACE,IAAM,EAAA,kBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,QAAQ,CAAC,UAAA,EAAY,OAAS,EAAA,YAAA,EAAc,aAAa,gBAAgB,CAAA;AAAA,GAC3E;AAAA,EACA;AAAA,IACE,IAAM,EAAA,wBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,MAAA,EAAQ,CAAC,iBAAA,EAAmB,iBAAiB,CAAA;AAAA,GAC/C;AAAA,EACA;AAAA,IACE,IAAM,EAAA,oBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,MAAQ,EAAA;AAAA,MACN,aAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA;AAAA,MACA,kBAAA;AAAA,MACA,kBAAA;AAAA,MACA,kBAAA;AAAA,MACA,iBAAA;AAAA,MACA,iBAAA;AAAA,MACA,iBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,mBAAA;AAAA,MACA,mBAAA;AAAA,MACA,mBAAA;AAAA,MACA,cAAA;AAAA,KACF;AAAA,GACF;AAAA,EACA;AAAA,IACE,IAAM,EAAA,oBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,MAAA,EAAQ,CAAC,WAAW,CAAA;AAAA,GACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQF;;;;"}
|
1
|
+
{"version":3,"file":"default.mjs","sources":["../../../src/style-input/src/default.ts"],"sourcesContent":["export type StyleInputConfigItem = {\n name: string\n title: string\n props: Record<string, any>\n value: Record<string, any>\n params: string[]\n}\n\nexport type StyleInputConfig = StyleInputConfigItem[]\nexport const defaultConfig: StyleInputConfig = [\n {\n name: 'DkStyleBoxInput',\n title: '尺寸',\n props: {},\n value: {},\n params: [\n 'marginLeft',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'paddingLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'width',\n 'height',\n ],\n },\n {\n name: 'DkStyleFontInput',\n title: '文字',\n props: {},\n value: {},\n params: ['fontSize', 'color', 'fontWeight', 'fontStyle', 'textDecoration'],\n },\n {\n name: 'DkStyleBackgroundInput',\n title: '背景',\n props: {},\n value: {},\n params: ['backgroundColor', 'backgroundImage'],\n },\n {\n name: 'DkStyleBorderInput',\n title: '边框',\n props: {},\n value: {},\n params: [\n 'borderWidth',\n 'borderStyle',\n 'borderColor',\n 'borderRightWidth',\n 'borderRightStyle',\n 'borderRightColor',\n 'borderLeftWidth',\n 'borderLeftStyle',\n 'borderLeftColor',\n 'borderTopWidth',\n 'borderTopStyle',\n 'borderTopColor',\n 'borderBottomWidth',\n 'borderBottomStyle',\n 'borderBottomColor',\n 'borderRadius',\n ],\n },\n {\n name: 'DkStyleShadowInput',\n title: '阴影',\n props: {},\n value: {},\n params: ['boxShadow'],\n },\n {\n name: 'DkStyleCustomInput',\n title: '自定义',\n props: {},\n value: {},\n params: [],\n },\n // {\n // name: 'DkStylePositionInput',\n // title: '位置',\n // props: {},\n // value: {},\n // params: ['top', 'left', 'right', 'bottom'],\n // },\n]\n\n// 根据上面的格式生成类型\n\n// 对象内要包含: name props value params 这样生成的数组\n"],"names":[],"mappings":"AASO,MAAM,aAAkC,GAAA;AAAA,EAC7C;AAAA,IACE,IAAM,EAAA,iBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,OAAO,EAAC;AAAA,IACR,OAAO,EAAC;AAAA,IACR,MAAQ,EAAA;AAAA,MACN,YAAA;AAAA,MACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,KACF;AAAA,GACF;AAAA,EACA;AAAA,IACE,IAAM,EAAA,kBAAA;AAAA,IACN,KAAO,EAAA,cAAA;AAAA,IACP,O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
|
const init = () => {
|
34
|
+
const usedParams = /* @__PURE__ */ new Set();
|
34
35
|
_components.value = props.components.filter((item) => {
|
35
36
|
return !props.hideComponents.includes(item.name);
|
36
37
|
});
|
37
38
|
const obj = {};
|
38
39
|
_components.value.forEach((item) => {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
if (item.name !== "DkStyleCustomInput") {
|
41
|
+
const paramsObj = {};
|
42
|
+
item.params.forEach((param) => {
|
43
|
+
if (props.modelValue[param] !== void 0) {
|
44
|
+
paramsObj[param] = props.modelValue[param];
|
45
|
+
usedParams.add(param);
|
46
|
+
}
|
47
|
+
});
|
48
|
+
obj[item.name] = paramsObj;
|
49
|
+
}
|
50
|
+
});
|
51
|
+
const customComponent = _components.value.find((item) => item.name === "DkStyleCustomInput");
|
52
|
+
if (customComponent) {
|
53
|
+
const customParamsObj = {};
|
54
|
+
Object.keys(props.modelValue).forEach((key) => {
|
55
|
+
if (!usedParams.has(key)) {
|
56
|
+
customParamsObj[key] = props.modelValue[key];
|
45
57
|
}
|
46
58
|
});
|
47
|
-
obj[
|
48
|
-
}
|
59
|
+
obj[customComponent.name] = customParamsObj;
|
60
|
+
}
|
61
|
+
console.log("props.modelValue", props.modelValue);
|
62
|
+
console.log(obj);
|
49
63
|
values.value = obj;
|
50
64
|
loading.value = false;
|
51
65
|
};
|