tianheng-ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -18
- package/lib/039af9192b9bb277966ceb4e4ce29c41.js +16 -0
- package/lib/2d84c80112a372bc149cad3464e90fa3.js +1617 -0
- package/lib/5977b934a4c6b480790864ea01303173.js +10834 -0
- package/lib/7745f3e776488705a38e62f85adad54d.js +16 -0
- package/lib/de8dee841ffdaaede3a2254deef30376.js +15395 -0
- package/lib/e78eab250e7f8ccac3d918dfdb06ca10.js +8904 -0
- package/lib/theme-chalk/fonts/PingFang.ttf +0 -0
- package/lib/theme-chalk/fonts/bpmn.eot +0 -0
- package/lib/theme-chalk/fonts/bpmn.svg +224 -0
- package/lib/theme-chalk/fonts/bpmn.ttf +0 -0
- package/lib/theme-chalk/fonts/bpmn.woff +0 -0
- package/lib/theme-chalk/fonts/bpmn.woff2 +0 -0
- package/lib/theme-chalk/fonts/fontawesome-webfont.eot +0 -0
- package/lib/theme-chalk/fonts/fontawesome-webfont.svg +2671 -0
- package/lib/theme-chalk/fonts/fontawesome-webfont.ttf +0 -0
- package/lib/theme-chalk/fonts/fontawesome-webfont.woff +0 -0
- package/lib/theme-chalk/fonts/fontawesome-webfont.woff2 +0 -0
- package/lib/theme-chalk/fonts/iconfont.eot +0 -0
- package/lib/theme-chalk/fonts/iconfont.svg +155 -0
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff2 +0 -0
- package/lib/theme-chalk/images/notData.png +0 -0
- package/lib/theme-chalk/index.scss +31 -0
- package/lib/theme-chalk/js/Log.js +99 -0
- package/lib/theme-chalk/js/axios.js +86 -0
- package/lib/theme-chalk/js/store/getters.js +5 -0
- package/lib/theme-chalk/js/store/modules/makingForm.js +21 -0
- package/lib/theme-chalk/js/store/store.js +26 -0
- package/lib/theme-chalk/styles/button.scss +501 -0
- package/lib/theme-chalk/styles/card.scss +29 -0
- package/lib/theme-chalk/styles/cell.scss +54 -0
- package/lib/theme-chalk/styles/codeEditor.scss +9 -0
- package/lib/theme-chalk/styles/col.scss +151 -0
- package/lib/theme-chalk/styles/dialog.scss +56 -0
- package/lib/theme-chalk/styles/empty.scss +22 -0
- package/lib/theme-chalk/styles/feature.scss +46 -0
- package/lib/theme-chalk/styles/font.css +7 -0
- package/lib/theme-chalk/styles/grid.scss +41 -0
- package/lib/theme-chalk/styles/icon.css +1944 -0
- package/lib/theme-chalk/styles/imagePreview.scss +113 -0
- package/lib/theme-chalk/styles/img.scss +35 -0
- package/lib/theme-chalk/styles/reset.scss +17 -0
- package/lib/theme-chalk/styles/root.css +64 -0
- package/lib/theme-chalk/styles/row.scss +23 -0
- package/lib/theme-chalk/styles/upload.scss +744 -0
- package/lib/theme-chalk/styles/variable.scss +80 -0
- package/lib/tianheng-ui.js +116 -0
- package/package.json +86 -48
- package/packages/Button/index.js +8 -0
- package/packages/Button/index.vue +80 -0
- package/packages/Card/index.js +8 -0
- package/packages/Card/index.vue +37 -0
- package/packages/Cell/index.js +8 -0
- package/packages/Cell/index.vue +68 -0
- package/packages/CodeEditor/index.js +8 -0
- package/packages/CodeEditor/index.vue +177 -0
- package/packages/Col/index.js +8 -0
- package/packages/Col/index.vue +43 -0
- package/packages/Dialog/index.js +8 -0
- package/packages/Dialog/index.vue +129 -0
- package/packages/Empty/index.js +8 -0
- package/packages/Empty/index.vue +35 -0
- package/packages/FormMaking/FormConfig.vue +60 -0
- package/packages/FormMaking/GenerateForm.vue +308 -0
- package/packages/FormMaking/GenerateFormItem.vue +887 -0
- package/packages/FormMaking/GenerateFormItemH5.vue +825 -0
- package/packages/FormMaking/Upload/index.vue +572 -0
- package/packages/FormMaking/WidgetConfig.vue +472 -0
- package/packages/FormMaking/WidgetForm.vue +159 -0
- package/packages/FormMaking/WidgetFormItem.vue +187 -0
- package/packages/FormMaking/custom/config.js +762 -0
- package/packages/FormMaking/custom/configs/alliance.vue +0 -0
- package/packages/FormMaking/custom/configs/blank.vue +54 -0
- package/packages/FormMaking/custom/configs/button.vue +172 -0
- package/packages/FormMaking/custom/configs/cascader.vue +175 -0
- package/packages/FormMaking/custom/configs/cell.vue +81 -0
- package/packages/FormMaking/custom/configs/checkbox.vue +234 -0
- package/packages/FormMaking/custom/configs/color.vue +137 -0
- package/packages/FormMaking/custom/configs/date.vue +158 -0
- package/packages/FormMaking/custom/configs/divider.vue +61 -0
- package/packages/FormMaking/custom/configs/editor.vue +71 -0
- package/packages/FormMaking/custom/configs/filler.vue +57 -0
- package/packages/FormMaking/custom/configs/grid.vue +103 -0
- package/packages/FormMaking/custom/configs/image.vue +138 -0
- package/packages/FormMaking/custom/configs/input.vue +176 -0
- package/packages/FormMaking/custom/configs/number.vue +140 -0
- package/packages/FormMaking/custom/configs/radio.vue +211 -0
- package/packages/FormMaking/custom/configs/rate.vue +109 -0
- package/packages/FormMaking/custom/configs/select.vue +305 -0
- package/packages/FormMaking/custom/configs/slider.vue +142 -0
- package/packages/FormMaking/custom/configs/switch.vue +130 -0
- package/packages/FormMaking/custom/configs/table.vue +105 -0
- package/packages/FormMaking/custom/configs/table_h5.vue +102 -0
- package/packages/FormMaking/custom/configs/tabs.vue +175 -0
- package/packages/FormMaking/custom/configs/text.vue +71 -0
- package/packages/FormMaking/custom/configs/textarea.vue +167 -0
- package/packages/FormMaking/custom/configs/time.vue +153 -0
- package/packages/FormMaking/custom/configs/upload.vue +155 -0
- package/packages/FormMaking/custom/index.js +32 -0
- package/packages/FormMaking/custom/items/alliance.vue +132 -0
- package/packages/FormMaking/custom/items/blank.vue +16 -0
- package/packages/FormMaking/custom/items/button.vue +27 -0
- package/packages/FormMaking/custom/items/cascader.vue +29 -0
- package/packages/FormMaking/custom/items/cell.vue +18 -0
- package/packages/FormMaking/custom/items/checkbox.vue +46 -0
- package/packages/FormMaking/custom/items/color.vue +19 -0
- package/packages/FormMaking/custom/items/date.vue +29 -0
- package/packages/FormMaking/custom/items/divider.vue +14 -0
- package/packages/FormMaking/custom/items/editor.vue +22 -0
- package/packages/FormMaking/custom/items/filler.vue +17 -0
- package/packages/FormMaking/custom/items/grid.vue +130 -0
- package/packages/FormMaking/custom/items/image.vue +70 -0
- package/packages/FormMaking/custom/items/input.vue +33 -0
- package/packages/FormMaking/custom/items/login.vue +13 -0
- package/packages/FormMaking/custom/items/number.vue +24 -0
- package/packages/FormMaking/custom/items/radio.vue +44 -0
- package/packages/FormMaking/custom/items/rate.vue +20 -0
- package/packages/FormMaking/custom/items/select.vue +32 -0
- package/packages/FormMaking/custom/items/slider.vue +34 -0
- package/packages/FormMaking/custom/items/switch.vue +22 -0
- package/packages/FormMaking/custom/items/table.vue +106 -0
- package/packages/FormMaking/custom/items/table_h5.vue +126 -0
- package/packages/FormMaking/custom/items/tabs.vue +145 -0
- package/packages/FormMaking/custom/items/text.vue +18 -0
- package/packages/FormMaking/custom/items/textarea.vue +37 -0
- package/packages/FormMaking/custom/items/time.vue +32 -0
- package/packages/FormMaking/custom/items/upload.vue +102 -0
- package/packages/FormMaking/custom/mixins/index.js +61 -0
- package/packages/FormMaking/custom/register.js +18 -0
- package/packages/FormMaking/generate.js +5 -0
- package/packages/FormMaking/iconfont/demo.css +539 -0
- package/packages/FormMaking/iconfont/demo_index.html +1159 -0
- package/packages/FormMaking/iconfont/iconfont.css +189 -0
- package/packages/FormMaking/iconfont/iconfont.eot +0 -0
- package/packages/FormMaking/iconfont/iconfont.js +1 -0
- package/packages/FormMaking/iconfont/iconfont.svg +155 -0
- package/packages/FormMaking/iconfont/iconfont.ttf +0 -0
- package/packages/FormMaking/iconfont/iconfont.woff +0 -0
- package/packages/FormMaking/iconfont/iconfont.woff2 +0 -0
- package/packages/FormMaking/index.js +33 -0
- package/packages/FormMaking/index.vue +807 -0
- package/packages/FormMaking/lang/en-US.js +187 -0
- package/packages/FormMaking/lang/zh-CN.js +187 -0
- package/packages/FormMaking/making.js +9 -0
- package/packages/FormMaking/styles/cover.scss +41 -0
- package/packages/FormMaking/styles/index.scss +785 -0
- package/packages/FormMaking/util/generateCode.js +163 -0
- package/packages/FormMaking/util/index.js +33 -0
- package/packages/FormMaking/util/request.js +28 -0
- package/packages/Grid/index.js +8 -0
- package/packages/Grid/index.vue +21 -0
- package/packages/GridItem/index.js +8 -0
- package/packages/GridItem/index.vue +69 -0
- package/packages/Icons/index.js +8 -0
- package/packages/Icons/index.vue +377 -0
- package/packages/Image/index.js +8 -0
- package/packages/Image/index.vue +146 -0
- package/packages/ImagePreview/index.js +8 -0
- package/packages/ImagePreview/index.vue +386 -0
- package/packages/Row/index.js +8 -0
- package/packages/Row/index.vue +33 -0
- package/packages/Table/action.js +8 -0
- package/packages/Table/action.vue +168 -0
- package/packages/Table/column.vue +63 -0
- package/packages/Table/index.js +8 -0
- package/packages/Table/index.vue +327 -0
- package/packages/Table/search.js +8 -0
- package/packages/Table/search.vue +163 -0
- package/packages/Table/tools.js +8 -0
- package/packages/Table/tools.vue +49 -0
- package/packages/TableMaking/custom/configs/fieldSearch.vue +17 -0
- package/packages/TableMaking/custom/configs/fieldTable.vue +15 -0
- package/packages/TableMaking/custom/items/search/index.vue +158 -0
- package/packages/TableMaking/custom/items/tools/index.vue +49 -0
- package/packages/TableMaking/generate.js +5 -0
- package/packages/TableMaking/generateTable.vue +560 -0
- package/packages/TableMaking/index.vue +234 -0
- package/packages/TableMaking/making.js +5 -0
- package/packages/TableMaking/util/index.js +433 -0
- package/packages/TableMaking/widgetConfig.vue +390 -0
- package/packages/TableMaking/widgetTable.vue +305 -0
- package/packages/Upload/ajax.js +85 -0
- package/packages/Upload/index.js +8 -0
- package/packages/Upload/index.vue +325 -0
- package/packages/Upload/upload-dragger.vue +70 -0
- package/packages/Upload/upload-list.vue +121 -0
- package/packages/Upload/upload.vue +193 -0
- package/packages/VueEditor/index.js +8 -0
- package/packages/VueEditor/index.vue +38 -0
- package/packages/Workflow/Log.js +99 -0
- package/packages/Workflow/designer/ProcessDesigner.vue +628 -0
- package/packages/Workflow/designer/index.js +7 -0
- package/packages/Workflow/designer/plugins/content-pad/contentPadProvider.js +390 -0
- package/packages/Workflow/designer/plugins/content-pad/index.js +6 -0
- package/packages/Workflow/designer/plugins/defaultEmpty.js +24 -0
- package/packages/Workflow/designer/plugins/descriptor/activitiDescriptor.json +1071 -0
- package/packages/Workflow/designer/plugins/descriptor/camundaDescriptor.json +1087 -0
- package/packages/Workflow/designer/plugins/descriptor/flowableDescriptor.json +1215 -0
- package/packages/Workflow/designer/plugins/extension-moddle/activiti/activitiExtension.js +74 -0
- package/packages/Workflow/designer/plugins/extension-moddle/activiti/index.js +9 -0
- package/packages/Workflow/designer/plugins/extension-moddle/camunda/extension.js +148 -0
- package/packages/Workflow/designer/plugins/extension-moddle/camunda/index.js +6 -0
- package/packages/Workflow/designer/plugins/extension-moddle/flowable/flowableExtension.js +74 -0
- package/packages/Workflow/designer/plugins/extension-moddle/flowable/index.js +9 -0
- package/packages/Workflow/designer/plugins/palette/CustomPalette.js +156 -0
- package/packages/Workflow/designer/plugins/palette/index.js +6 -0
- package/packages/Workflow/designer/plugins/palette/paletteProvider.js +160 -0
- package/packages/Workflow/designer/plugins/translate/customTranslate.js +41 -0
- package/packages/Workflow/designer/plugins/translate/zh.js +238 -0
- package/packages/Workflow/highlight/index.js +5 -0
- package/packages/Workflow/index.js +34 -0
- package/packages/Workflow/index.vue +399 -0
- package/packages/Workflow/modules/auto-place/CustomAutoPlace.js +81 -0
- package/packages/Workflow/modules/auto-place/index.js +6 -0
- package/packages/Workflow/modules/custom-renderer/CustomRenderer.js +17 -0
- package/packages/Workflow/modules/custom-renderer/index.js +6 -0
- package/packages/Workflow/modules/rules/CustomRules.js +16 -0
- package/packages/Workflow/modules/rules/index.js +6 -0
- package/packages/Workflow/palette/ProcessPalette.vue +106 -0
- package/packages/Workflow/palette/index.js +7 -0
- package/packages/Workflow/penal/PropertiesPanel.vue +245 -0
- package/packages/Workflow/penal/base/ElementBaseInfo.vue +80 -0
- package/packages/Workflow/penal/flow-condition/FlowCondition.vue +142 -0
- package/packages/Workflow/penal/form/ElementForm.vue +367 -0
- package/packages/Workflow/penal/index.js +7 -0
- package/packages/Workflow/penal/listeners/ElementListeners.vue +299 -0
- package/packages/Workflow/penal/listeners/UserTaskListeners.vue +322 -0
- package/packages/Workflow/penal/listeners/template.js +178 -0
- package/packages/Workflow/penal/listeners/utilSelf.js +64 -0
- package/packages/Workflow/penal/multi-instance/ElementMultiInstance.vue +200 -0
- package/packages/Workflow/penal/other/ElementOtherConfig.vue +59 -0
- package/packages/Workflow/penal/properties/ElementProperties.vue +135 -0
- package/packages/Workflow/penal/signal-message/SignalAndMessage.vue +104 -0
- package/packages/Workflow/penal/task/ElementTask.vue +73 -0
- package/packages/Workflow/penal/task/task-components/ReceiveTask.vue +97 -0
- package/packages/Workflow/penal/task/task-components/ScriptTask.vue +85 -0
- package/packages/Workflow/penal/task/task-components/UserTask.vue +535 -0
- package/packages/Workflow/theme/element-variables.scss +70 -0
- package/packages/Workflow/theme/index.scss +2 -0
- package/packages/Workflow/theme/process-designer.scss +157 -0
- package/packages/Workflow/theme/process-panel.scss +107 -0
- package/packages/Workflow/translations.js +25 -0
- package/packages/Workflow/utils.js +71 -0
- package/packages/index.js +160 -0
- package/babel.config.js +0 -15
- package/index.js +0 -11
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/App.vue +0 -28
- package/src/assets/logo.png +0 -0
- package/src/components/HelloWorld.vue +0 -58
- package/src/main.js +0 -8
@@ -0,0 +1,377 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-popover
|
4
|
+
placement="bottom-start"
|
5
|
+
:title="title"
|
6
|
+
:width="width"
|
7
|
+
trigger="click"
|
8
|
+
>
|
9
|
+
<el-input
|
10
|
+
:value="value"
|
11
|
+
slot="reference"
|
12
|
+
placeholder="请选择图标"
|
13
|
+
clearable
|
14
|
+
@clear="handleInputClear"
|
15
|
+
>
|
16
|
+
<div v-if="value" class="input-prefix" slot="prefix">
|
17
|
+
<i :class="value" class="icon" />
|
18
|
+
</div>
|
19
|
+
</el-input>
|
20
|
+
|
21
|
+
<div class="th-icons">
|
22
|
+
<i
|
23
|
+
v-for="(icon, index) in icons"
|
24
|
+
class="icon"
|
25
|
+
:class="icon"
|
26
|
+
:key="index"
|
27
|
+
@click="handleIconClick(icon)"
|
28
|
+
/>
|
29
|
+
</div>
|
30
|
+
</el-popover>
|
31
|
+
</div>
|
32
|
+
</template>
|
33
|
+
|
34
|
+
<script>
|
35
|
+
export default {
|
36
|
+
name: "ThIcons",
|
37
|
+
model: {
|
38
|
+
event: "input",
|
39
|
+
prop: "value"
|
40
|
+
},
|
41
|
+
props: {
|
42
|
+
title: {
|
43
|
+
type: String,
|
44
|
+
default: "Element图标库"
|
45
|
+
},
|
46
|
+
value: {
|
47
|
+
type: String,
|
48
|
+
default: ""
|
49
|
+
},
|
50
|
+
width: {
|
51
|
+
type: Number,
|
52
|
+
default: 400
|
53
|
+
}
|
54
|
+
},
|
55
|
+
data() {
|
56
|
+
return {
|
57
|
+
icons: [
|
58
|
+
"el-icon-platform-eleme",
|
59
|
+
"el-icon-eleme",
|
60
|
+
"el-icon-delete-solid",
|
61
|
+
"el-icon-delete",
|
62
|
+
"el-icon-s-tools",
|
63
|
+
"el-icon-setting",
|
64
|
+
"el-icon-user-solid",
|
65
|
+
"el-icon-user",
|
66
|
+
"el-icon-phone",
|
67
|
+
"el-icon-phone-outline",
|
68
|
+
"el-icon-more",
|
69
|
+
"el-icon-more-outline",
|
70
|
+
"el-icon-star-on",
|
71
|
+
"el-icon-star-off",
|
72
|
+
"el-icon-s-goods",
|
73
|
+
"el-icon-goods",
|
74
|
+
"el-icon-warning",
|
75
|
+
"el-icon-warning-outline",
|
76
|
+
"el-icon-question",
|
77
|
+
"el-icon-info",
|
78
|
+
"el-icon-remove",
|
79
|
+
"el-icon-circle-plus",
|
80
|
+
"el-icon-success",
|
81
|
+
"el-icon-error",
|
82
|
+
"el-icon-zoom-in",
|
83
|
+
"el-icon-zoom-out",
|
84
|
+
"el-icon-remove-outline",
|
85
|
+
"el-icon-circle-plus-outline",
|
86
|
+
"el-icon-circle-check",
|
87
|
+
"el-icon-circle-close",
|
88
|
+
"el-icon-s-help",
|
89
|
+
"el-icon-help",
|
90
|
+
"el-icon-minus",
|
91
|
+
"el-icon-plus",
|
92
|
+
"el-icon-check",
|
93
|
+
"el-icon-close",
|
94
|
+
"el-icon-picture",
|
95
|
+
"el-icon-picture-outline",
|
96
|
+
"el-icon-picture-outline-round",
|
97
|
+
"el-icon-upload",
|
98
|
+
"el-icon-upload2",
|
99
|
+
"el-icon-download",
|
100
|
+
"el-icon-camera-solid",
|
101
|
+
"el-icon-camera",
|
102
|
+
"el-icon-video-camera-solid",
|
103
|
+
"el-icon-video-camera",
|
104
|
+
"el-icon-message-solid",
|
105
|
+
"el-icon-bell",
|
106
|
+
"el-icon-s-cooperation",
|
107
|
+
"el-icon-s-order",
|
108
|
+
"el-icon-s-platform",
|
109
|
+
"el-icon-s-fold",
|
110
|
+
"el-icon-s-unfold",
|
111
|
+
"el-icon-s-operation",
|
112
|
+
"el-icon-s-promotion",
|
113
|
+
"el-icon-s-home",
|
114
|
+
"el-icon-s-release",
|
115
|
+
"el-icon-s-ticket",
|
116
|
+
"el-icon-s-management",
|
117
|
+
"el-icon-s-open",
|
118
|
+
"el-icon-s-shop",
|
119
|
+
"el-icon-s-marketing",
|
120
|
+
"el-icon-s-flag",
|
121
|
+
"el-icon-s-comment",
|
122
|
+
"el-icon-s-finance",
|
123
|
+
"el-icon-s-claim",
|
124
|
+
"el-icon-s-custom",
|
125
|
+
"el-icon-s-opportunity",
|
126
|
+
"el-icon-s-data",
|
127
|
+
"el-icon-s-check",
|
128
|
+
"el-icon-s-grid",
|
129
|
+
"el-icon-menu",
|
130
|
+
"el-icon-share",
|
131
|
+
"el-icon-d-caret",
|
132
|
+
"el-icon-caret-left",
|
133
|
+
"el-icon-caret-right",
|
134
|
+
"el-icon-caret-bottom",
|
135
|
+
"el-icon-caret-top",
|
136
|
+
"el-icon-bottom-left",
|
137
|
+
"el-icon-bottom-right",
|
138
|
+
"el-icon-back",
|
139
|
+
"el-icon-right",
|
140
|
+
"el-icon-bottom",
|
141
|
+
"el-icon-top",
|
142
|
+
"el-icon-top-left",
|
143
|
+
"el-icon-top-right",
|
144
|
+
"el-icon-arrow-left",
|
145
|
+
"el-icon-arrow-right",
|
146
|
+
"el-icon-arrow-down",
|
147
|
+
"el-icon-arrow-up",
|
148
|
+
"el-icon-d-arrow-left",
|
149
|
+
"el-icon-d-arrow-right",
|
150
|
+
"el-icon-video-pause",
|
151
|
+
"el-icon-video-play",
|
152
|
+
"el-icon-refresh",
|
153
|
+
"el-icon-refresh-right",
|
154
|
+
"el-icon-refresh-left",
|
155
|
+
"el-icon-finished",
|
156
|
+
"el-icon-sort",
|
157
|
+
"el-icon-sort-up",
|
158
|
+
"el-icon-sort-down",
|
159
|
+
"el-icon-rank",
|
160
|
+
"el-icon-loading",
|
161
|
+
"el-icon-view",
|
162
|
+
"el-icon-c-scale-to-original",
|
163
|
+
"el-icon-date",
|
164
|
+
"el-icon-edit",
|
165
|
+
"el-icon-edit-outline",
|
166
|
+
"el-icon-folder",
|
167
|
+
"el-icon-folder-opened",
|
168
|
+
"el-icon-folder-add",
|
169
|
+
"el-icon-folder-remove",
|
170
|
+
"el-icon-folder-delete",
|
171
|
+
"el-icon-folder-checked",
|
172
|
+
"el-icon-tickets",
|
173
|
+
"el-icon-document-remove",
|
174
|
+
"el-icon-document-delete",
|
175
|
+
"el-icon-document-copy",
|
176
|
+
"el-icon-document-checked",
|
177
|
+
"el-icon-document",
|
178
|
+
"el-icon-document-add",
|
179
|
+
"el-icon-printer",
|
180
|
+
"el-icon-paperclip",
|
181
|
+
"el-icon-takeaway-box",
|
182
|
+
"el-icon-search",
|
183
|
+
"el-icon-monitor",
|
184
|
+
"el-icon-attract",
|
185
|
+
"el-icon-mobile",
|
186
|
+
"el-icon-scissors",
|
187
|
+
"el-icon-umbrella",
|
188
|
+
"el-icon-headset",
|
189
|
+
"el-icon-brush",
|
190
|
+
"el-icon-mouse",
|
191
|
+
"el-icon-coordinate",
|
192
|
+
"el-icon-magic-stick",
|
193
|
+
"el-icon-reading",
|
194
|
+
"el-icon-data-line",
|
195
|
+
"el-icon-data-board",
|
196
|
+
"el-icon-pie-chart",
|
197
|
+
"el-icon-data-analysis",
|
198
|
+
"el-icon-collection-tag",
|
199
|
+
"el-icon-film",
|
200
|
+
"el-icon-suitcase",
|
201
|
+
"el-icon-suitcase-1",
|
202
|
+
"el-icon-receiving",
|
203
|
+
"el-icon-collection",
|
204
|
+
"el-icon-files",
|
205
|
+
"el-icon-notebook-1",
|
206
|
+
"el-icon-notebook-2",
|
207
|
+
"el-icon-toilet-paper",
|
208
|
+
"el-icon-office-building",
|
209
|
+
"el-icon-school",
|
210
|
+
"el-icon-table-lamp",
|
211
|
+
"el-icon-house",
|
212
|
+
"el-icon-no-smoking",
|
213
|
+
"el-icon-smoking",
|
214
|
+
"el-icon-shopping-cart-full",
|
215
|
+
"el-icon-shopping-cart-1",
|
216
|
+
"el-icon-shopping-cart-2",
|
217
|
+
"el-icon-shopping-bag-1",
|
218
|
+
"el-icon-shopping-bag-2",
|
219
|
+
"el-icon-sold-out",
|
220
|
+
"el-icon-sell",
|
221
|
+
"el-icon-present",
|
222
|
+
"el-icon-box",
|
223
|
+
"el-icon-bank-card",
|
224
|
+
"el-icon-money",
|
225
|
+
"el-icon-coin",
|
226
|
+
"el-icon-wallet",
|
227
|
+
"el-icon-discount",
|
228
|
+
"el-icon-price-tag",
|
229
|
+
"el-icon-news",
|
230
|
+
"el-icon-guide",
|
231
|
+
"el-icon-male",
|
232
|
+
"el-icon-female",
|
233
|
+
"el-icon-thumb",
|
234
|
+
"el-icon-cpu",
|
235
|
+
"el-icon-link",
|
236
|
+
"el-icon-connection",
|
237
|
+
"el-icon-open",
|
238
|
+
"el-icon-turn-off",
|
239
|
+
"el-icon-set-up",
|
240
|
+
"el-icon-chat-round",
|
241
|
+
"el-icon-chat-line-round",
|
242
|
+
"el-icon-chat-square",
|
243
|
+
"el-icon-chat-dot-round",
|
244
|
+
"el-icon-chat-dot-square",
|
245
|
+
"el-icon-chat-line-square",
|
246
|
+
"el-icon-message",
|
247
|
+
"el-icon-postcard",
|
248
|
+
"el-icon-position",
|
249
|
+
"el-icon-turn-off-microphone",
|
250
|
+
"el-icon-microphone",
|
251
|
+
"el-icon-close-notification",
|
252
|
+
"el-icon-bangzhu",
|
253
|
+
"el-icon-time",
|
254
|
+
"el-icon-odometer",
|
255
|
+
"el-icon-crop",
|
256
|
+
"el-icon-aim",
|
257
|
+
"el-icon-switch-button",
|
258
|
+
"el-icon-full-screen",
|
259
|
+
"el-icon-copy-document",
|
260
|
+
"el-icon-mic",
|
261
|
+
"el-icon-stopwatch",
|
262
|
+
"el-icon-medal-1",
|
263
|
+
"el-icon-medal",
|
264
|
+
"el-icon-trophy",
|
265
|
+
"el-icon-trophy-1",
|
266
|
+
"el-icon-first-aid-kit",
|
267
|
+
"el-icon-discover",
|
268
|
+
"el-icon-place",
|
269
|
+
"el-icon-location",
|
270
|
+
"el-icon-location-outline",
|
271
|
+
"el-icon-location-information",
|
272
|
+
"el-icon-add-location",
|
273
|
+
"el-icon-delete-location",
|
274
|
+
"el-icon-map-location",
|
275
|
+
"el-icon-alarm-clock",
|
276
|
+
"el-icon-timer",
|
277
|
+
"el-icon-watch-1",
|
278
|
+
"el-icon-watch",
|
279
|
+
"el-icon-lock",
|
280
|
+
"el-icon-unlock",
|
281
|
+
"el-icon-key",
|
282
|
+
"el-icon-service",
|
283
|
+
"el-icon-mobile-phone",
|
284
|
+
"el-icon-bicycle",
|
285
|
+
"el-icon-truck",
|
286
|
+
"el-icon-ship",
|
287
|
+
"el-icon-basketball",
|
288
|
+
"el-icon-football",
|
289
|
+
"el-icon-soccer",
|
290
|
+
"el-icon-baseball",
|
291
|
+
"el-icon-wind-power",
|
292
|
+
"el-icon-light-rain",
|
293
|
+
"el-icon-lightning",
|
294
|
+
"el-icon-heavy-rain",
|
295
|
+
"el-icon-sunrise",
|
296
|
+
"el-icon-sunrise-1",
|
297
|
+
"el-icon-sunset",
|
298
|
+
"el-icon-sunny",
|
299
|
+
"el-icon-cloudy",
|
300
|
+
"el-icon-partly-cloudy",
|
301
|
+
"el-icon-cloudy-and-sunny",
|
302
|
+
"el-icon-moon",
|
303
|
+
"el-icon-moon-night",
|
304
|
+
"el-icon-dish",
|
305
|
+
"el-icon-dish-1",
|
306
|
+
"el-icon-food",
|
307
|
+
"el-icon-chicken",
|
308
|
+
"el-icon-fork-spoon",
|
309
|
+
"el-icon-knife-fork",
|
310
|
+
"el-icon-burger",
|
311
|
+
"el-icon-tableware",
|
312
|
+
"el-icon-sugar",
|
313
|
+
"el-icon-dessert",
|
314
|
+
"el-icon-ice-cream",
|
315
|
+
"el-icon-hot-water",
|
316
|
+
"el-icon-water-cup",
|
317
|
+
"el-icon-coffee-cup",
|
318
|
+
"el-icon-cold-drink",
|
319
|
+
"el-icon-goblet",
|
320
|
+
"el-icon-goblet-full",
|
321
|
+
"el-icon-goblet-square",
|
322
|
+
"el-icon-goblet-square-full",
|
323
|
+
"el-icon-refrigerator",
|
324
|
+
"el-icon-grape",
|
325
|
+
"el-icon-watermelon",
|
326
|
+
"el-icon-cherry",
|
327
|
+
"el-icon-apple",
|
328
|
+
"el-icon-pear",
|
329
|
+
"el-icon-orange",
|
330
|
+
"el-icon-coffee",
|
331
|
+
"el-icon-ice-tea",
|
332
|
+
"el-icon-ice-drink",
|
333
|
+
"el-icon-milk-tea",
|
334
|
+
"el-icon-potato-strips",
|
335
|
+
"el-icon-lollipop",
|
336
|
+
"el-icon-ice-cream-square",
|
337
|
+
"el-icon-ice-cream-round"
|
338
|
+
]
|
339
|
+
};
|
340
|
+
},
|
341
|
+
created() {},
|
342
|
+
methods: {
|
343
|
+
handleIconClick(icon) {
|
344
|
+
this.$emit("input", icon);
|
345
|
+
},
|
346
|
+
handleInputClear() {
|
347
|
+
this.$emit("input", "");
|
348
|
+
}
|
349
|
+
}
|
350
|
+
};
|
351
|
+
</script>
|
352
|
+
|
353
|
+
<style lang="less" scoped>
|
354
|
+
.input-prefix {
|
355
|
+
height: 100%;
|
356
|
+
width: 32px;
|
357
|
+
display: flex;
|
358
|
+
align-items: center;
|
359
|
+
.icon {
|
360
|
+
font-size: 20px;
|
361
|
+
}
|
362
|
+
}
|
363
|
+
.th-icons {
|
364
|
+
height: 300px;
|
365
|
+
overflow-y: scroll;
|
366
|
+
.icon {
|
367
|
+
padding: 8px;
|
368
|
+
font-size: 20px;
|
369
|
+
border-radius: 2px;
|
370
|
+
}
|
371
|
+
.icon:hover {
|
372
|
+
cursor: pointer;
|
373
|
+
background-color: #f2f2f2;
|
374
|
+
// transition: .3s;
|
375
|
+
}
|
376
|
+
}
|
377
|
+
</style>
|
@@ -0,0 +1,146 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="th-img" :class="divStyle">
|
3
|
+
<slot v-if="loading" name="placeholder">
|
4
|
+
<div class="th-image__placeholder">
|
5
|
+
<i class="el-icon-loading"></i>
|
6
|
+
</div>
|
7
|
+
</slot>
|
8
|
+
<slot v-else-if="error" name="error">
|
9
|
+
<div class="th-image__error" v-if="!errorSrc">加载失败</div>
|
10
|
+
<img
|
11
|
+
v-if="errorSrc && !loading"
|
12
|
+
:src="srcKey ? src[srcKey] : errorSrc"
|
13
|
+
alt=""
|
14
|
+
class="th-image__error"
|
15
|
+
/>
|
16
|
+
</slot>
|
17
|
+
<img
|
18
|
+
v-else
|
19
|
+
class="th-img-item"
|
20
|
+
:src="srcKey ? src[srcKey] : src"
|
21
|
+
:alt="alt"
|
22
|
+
:style="imgStyle"
|
23
|
+
@click="clickHandler(srcKey ? src[srcKey] : '')"
|
24
|
+
/>
|
25
|
+
<template v-if="preview">
|
26
|
+
<th-image-preview
|
27
|
+
v-if="showViewer"
|
28
|
+
:imgArr="previewList"
|
29
|
+
:on-close="closeViewer"
|
30
|
+
:src-key="srcKey"
|
31
|
+
:start-index="startIndex"
|
32
|
+
:src="srcInfo"
|
33
|
+
/>
|
34
|
+
</template>
|
35
|
+
</div>
|
36
|
+
</template>
|
37
|
+
|
38
|
+
<script>
|
39
|
+
import ThImagePreview from "ui/ImagePreview/index.vue";
|
40
|
+
|
41
|
+
let prevOverflow = "";
|
42
|
+
|
43
|
+
export default {
|
44
|
+
name: "ThImage",
|
45
|
+
components: {
|
46
|
+
ThImagePreview
|
47
|
+
},
|
48
|
+
props: {
|
49
|
+
src: String | Object,
|
50
|
+
width: {
|
51
|
+
type: String | Number,
|
52
|
+
default: "100%"
|
53
|
+
},
|
54
|
+
height: {
|
55
|
+
type: String | Number,
|
56
|
+
default: "100%"
|
57
|
+
},
|
58
|
+
fit: String,
|
59
|
+
borderRadius: String,
|
60
|
+
alt: String,
|
61
|
+
errorSrc: String,
|
62
|
+
srcKey: String,
|
63
|
+
previewList: Array,
|
64
|
+
startIndex: Number,
|
65
|
+
displayStyle: String,
|
66
|
+
isLoding: Boolean
|
67
|
+
},
|
68
|
+
data() {
|
69
|
+
return {
|
70
|
+
loading: false,
|
71
|
+
error: false,
|
72
|
+
showViewer: false,
|
73
|
+
srcInfo: ""
|
74
|
+
};
|
75
|
+
},
|
76
|
+
computed: {
|
77
|
+
preview() {
|
78
|
+
const { previewList } = this;
|
79
|
+
return Array.isArray(previewList) && previewList.length > 0;
|
80
|
+
},
|
81
|
+
imgStyle() {
|
82
|
+
const style = {
|
83
|
+
width: typeof this.width === "string" ? this.width : this.width + "px",
|
84
|
+
height:
|
85
|
+
typeof this.height === "string" ? this.height : this.height + "px",
|
86
|
+
borderRadius: this.borderRadius,
|
87
|
+
objectFit: this.fit
|
88
|
+
};
|
89
|
+
return style;
|
90
|
+
},
|
91
|
+
divStyle() {
|
92
|
+
let className = "th-image--";
|
93
|
+
if (this.displayStyle) className = `${className}${this.displayStyle}`;
|
94
|
+
|
95
|
+
return className;
|
96
|
+
}
|
97
|
+
},
|
98
|
+
mounted() {
|
99
|
+
this.loadImg();
|
100
|
+
},
|
101
|
+
methods: {
|
102
|
+
loadImg() {
|
103
|
+
if (this.isLoding) {
|
104
|
+
this.loading = true;
|
105
|
+
}
|
106
|
+
this.error = false;
|
107
|
+
|
108
|
+
const img = new Image();
|
109
|
+
img.onload = e => this.imgLoad();
|
110
|
+
img.onerror = this.imgErr.bind(this);
|
111
|
+
|
112
|
+
img.src = this.srcKey ? this.src[this.srcKey] : this.src;
|
113
|
+
},
|
114
|
+
imgLoad() {
|
115
|
+
this.loading = false;
|
116
|
+
this.error = false;
|
117
|
+
this.$emit("on-load");
|
118
|
+
},
|
119
|
+
imgErr() {
|
120
|
+
this.loading = false;
|
121
|
+
this.error = true;
|
122
|
+
this.$emit("on-error");
|
123
|
+
},
|
124
|
+
clickHandler(e) {
|
125
|
+
if (!this.srcKey) {
|
126
|
+
return;
|
127
|
+
}
|
128
|
+
if (!this.preview) {
|
129
|
+
return;
|
130
|
+
}
|
131
|
+
if (this.srcKey) {
|
132
|
+
this.srcInfo = e;
|
133
|
+
}
|
134
|
+
prevOverflow = document.body.style.overflow;
|
135
|
+
document.body.style.overflow = "hidden";
|
136
|
+
this.showViewer = true;
|
137
|
+
},
|
138
|
+
closeViewer() {
|
139
|
+
document.body.style.overflow = prevOverflow;
|
140
|
+
this.showViewer = false;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
};
|
144
|
+
</script>
|
145
|
+
|
146
|
+
<style lang="less" scoped></style>
|