cloud-web-corejs 1.0.244 → 1.0.246

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.
@@ -1,28 +1,29 @@
1
1
  <template>
2
- <div v-show="false">
2
+ <div>
3
3
  <el-form-item label-width="0">
4
- <el-divider class="custom-divider">{{i18nt('designer.setting.customLabelIcon')}}</el-divider>
4
+ <el-divider class="custom-divider">{{
5
+ i18nt("designer.setting.customLabelIcon")
6
+ }}</el-divider>
5
7
  </el-form-item>
6
8
  <el-form-item :label="i18nt('designer.setting.labelIconClass')">
7
- <el-input type="text" v-model="optionModel.labelIconClass"></el-input>
9
+ <icon-picker v-model="optionModel.labelIconClass"></icon-picker>
8
10
  </el-form-item>
9
11
  </div>
10
12
  </template>
11
13
 
12
14
  <script>
13
- import i18n from "../../../../../components/xform/utils/i18n"
14
-
15
- export default {
16
- name: "labelIconClass-editor",
17
- mixins: [i18n],
18
- props: {
19
- designer: Object,
20
- selectedWidget: Object,
21
- optionModel: Object,
22
- },
23
- }
15
+ import i18n from "@base/components/xform/utils/i18n";
16
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
17
+ export default {
18
+ name: "labelIconClass-editor",
19
+ components: { IconPicker },
20
+ mixins: [i18n],
21
+ props: {
22
+ designer: Object,
23
+ selectedWidget: Object,
24
+ optionModel: Object,
25
+ },
26
+ };
24
27
  </script>
25
28
 
26
- <style scoped>
27
-
28
- </style>
29
+ <style scoped></style>
@@ -1,37 +1,37 @@
1
1
  <template>
2
- <el-form-item :label="i18nt('designer.setting.labelIconPosition')" v-show="false">
2
+ <el-form-item :label="i18nt('designer.setting.labelIconPosition')">
3
3
  <el-select v-model="optionModel.labelIconPosition">
4
- <el-option v-for="item in labelIconPosition" :key="item.value" :label="item.label"
5
- :value="item.value">
4
+ <el-option
5
+ v-for="item in labelIconPosition"
6
+ :key="item.value"
7
+ :label="item.label"
8
+ :value="item.value"
9
+ >
6
10
  </el-option>
7
11
  </el-select>
8
12
  </el-form-item>
9
13
  </template>
10
14
 
11
15
  <script>
12
- import i18n from "../../../../../components/xform/utils/i18n"
16
+ import i18n from "../../../../../components/xform/utils/i18n";
13
17
 
14
- export default {
15
- name: "labelIconPosition-editor",
16
- mixins: [i18n],
17
- props: {
18
- designer: Object,
19
- selectedWidget: Object,
20
- optionModel: Object,
21
- },
22
- data() {
23
- return {
24
- labelIconPosition: [
25
- {label: 'front', value: 'front'},
26
- {label: 'rear', value: 'rear'},
27
- ],
28
-
29
- }
30
- },
31
-
32
- }
18
+ export default {
19
+ name: "labelIconPosition-editor",
20
+ mixins: [i18n],
21
+ props: {
22
+ designer: Object,
23
+ selectedWidget: Object,
24
+ optionModel: Object,
25
+ },
26
+ data() {
27
+ return {
28
+ labelIconPosition: [
29
+ { label: "前面", value: "front" },
30
+ { label: "后面", value: "rear" },
31
+ ],
32
+ };
33
+ },
34
+ };
33
35
  </script>
34
36
 
35
- <style scoped>
36
-
37
- </style>
37
+ <style scoped></style>
@@ -1,23 +1,77 @@
1
1
  <template>
2
- <el-form-item :label="i18nt('designer.setting.labelTooltip')" v-show="false">
3
- <el-input type="text" v-model="optionModel.labelTooltip"></el-input>
4
- </el-form-item>
2
+ <div>
3
+ <el-form-item :label="i18nt('designer.setting.labelTooltip')">
4
+ <a href="javascript:void(0);" class="a-link link-oneLind" @click="openDialog">
5
+ <span>{{ optionModel.labelTooltip }}</span>
6
+ <i class="el-icon-edit"></i>
7
+ </a>
8
+ </el-form-item>
9
+ <el-dialog
10
+ v-if="dialogVisible"
11
+ custom-class="dialog-style"
12
+ :title="i18nt('designer.setting.labelTooltip')"
13
+ :visible.sync="dialogVisible"
14
+ :show-close="true"
15
+ :append-to-body="true"
16
+ :modal="false"
17
+ :close-on-click-modal="false"
18
+ :close-on-press-escape="false"
19
+ :destroy-on-close="true"
20
+ width="520px"
21
+ v-dialog-drag
22
+ >
23
+ <el-input
24
+ type="textarea"
25
+ :rows="14"
26
+ class="label-tooltip-textarea"
27
+ v-model="labelTooltipValue"
28
+ clearable
29
+ ></el-input>
30
+ <div class="dialog-footer" slot="footer">
31
+ <el-button @click="dialogVisible = false" class="button-sty" icon="el-icon-close">
32
+ {{ i18nt("designer.hint.cancel") }}
33
+ </el-button>
34
+ <el-button type="primary" @click="submitDialog" class="button-sty" icon="el-icon-check">
35
+ {{ i18nt("designer.hint.confirm") }}
36
+ </el-button>
37
+ </div>
38
+ </el-dialog>
39
+ </div>
5
40
  </template>
6
41
 
7
42
  <script>
8
- import i18n from "../../../../../components/xform/utils/i18n"
43
+ import i18n from "../../../../../components/xform/utils/i18n";
9
44
 
10
- export default {
11
- name: "labelTooltip-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
45
+ export default {
46
+ name: "labelTooltip-editor",
47
+ mixins: [i18n],
48
+ props: {
49
+ designer: Object,
50
+ selectedWidget: Object,
51
+ optionModel: Object,
52
+ },
53
+ data() {
54
+ return {
55
+ dialogVisible: false,
56
+ labelTooltipValue: "",
57
+ };
58
+ },
59
+ methods: {
60
+ openDialog() {
61
+ this.labelTooltipValue = this.optionModel.labelTooltip || "";
62
+ this.dialogVisible = true;
17
63
  },
18
- }
64
+ submitDialog() {
65
+ const value = (this.labelTooltipValue || "").trim();
66
+ this.optionModel.labelTooltip = value || null;
67
+ this.dialogVisible = false;
68
+ },
69
+ },
70
+ };
19
71
  </script>
20
72
 
21
73
  <style scoped>
22
-
74
+ ::v-deep .label-tooltip-textarea textarea {
75
+ min-height: 320px;
76
+ }
23
77
  </style>
@@ -202,9 +202,9 @@ const ADVANCED_PROPERTIES = {
202
202
  'round': 'round-editor',
203
203
  'circle': 'circle-editor',
204
204
  'icon': 'icon-editor',
205
- // 'labelIconClass': 'labelIconClass-editor',
206
- // 'labelIconPosition': 'labelIconPosition-editor',
207
- // 'labelTooltip': 'labelTooltip-editor',
205
+ labelIconClass: "labelIconClass-editor",
206
+ labelIconPosition: "labelIconPosition-editor",
207
+ labelTooltip: "labelTooltip-editor",
208
208
  // 'appendButton': 'appendButton-editor',
209
209
  // 'appendButtonDisabled': 'appendButtonDisabled-editor',
210
210
  // 'buttonIcon': 'buttonIcon-editor',
@@ -16,6 +16,7 @@ import {
16
16
  traverseAllWidgetsNew,
17
17
  } from "../../../../components/xform/utils/util";
18
18
  import { tableTreeMixins } from "../../../../mixins/tableTree/index.js";
19
+ import { applyColumnLabelIcon } from "../../../../components/xform/utils/tableColumnHelper";
19
20
 
20
21
  let modules = {};
21
22
  const baseRefUtil = {
@@ -699,17 +700,7 @@ modules = {
699
700
  visible: t.show,
700
701
  slots: {},
701
702
  };
702
- if (t.required) {
703
- col.title = col.title;
704
- /* if(!isEditTable){
705
- col.titlePrefix = {
706
- icon: "vxe-cell--required-icon"
707
- }
708
- } */
709
- col.titlePrefix = {
710
- icon: "vxe-cell--required-icon",
711
- };
712
- }
703
+ applyColumnLabelIcon(col, t);
713
704
  if (t.treeNode) {
714
705
  col.treeNode = true;
715
706
  }
@@ -17,14 +17,22 @@
17
17
  <span v-if="!!subWidget.options.labelIconClass" class="custom-label">
18
18
  <template v-if="subWidget.options.labelIconPosition === 'front'">
19
19
  <template v-if="!!subWidget.options.labelTooltip">
20
- <el-tooltip :content="subWidget.options.labelTooltip" effect="light">
20
+ <el-tooltip
21
+ :content="subWidget.options.labelTooltip"
22
+ effect="light"
23
+ popper-class="label-tooltip-pre-line"
24
+ >
21
25
  <i :class="subWidget.options.labelIconClass"></i></el-tooltip>{{subWidget.options.label}}</template>
22
26
  <template v-else>
23
27
  <i :class="subWidget.options.labelIconClass"></i>{{subWidget.options.label}}</template>
24
28
  </template>
25
29
  <template v-else-if="subWidget.options.labelIconPosition === 'rear'">
26
30
  <template v-if="!!subWidget.options.labelTooltip">
27
- {{subWidget.options.label}}<el-tooltip :content="subWidget.options.labelTooltip" effect="light">
31
+ {{subWidget.options.label}}<el-tooltip
32
+ :content="subWidget.options.labelTooltip"
33
+ effect="light"
34
+ popper-class="label-tooltip-pre-line"
35
+ >
28
36
  <i :class="subWidget.options.labelIconClass"></i></el-tooltip></template>
29
37
  <template v-else>
30
38
  {{subWidget.options.label}}<i :class="subWidget.options.labelIconClass"></i></template>
@@ -0,0 +1,284 @@
1
+ {
2
+ "elementIcons": [
3
+ "platform-eleme",
4
+ "eleme",
5
+ "delete-solid",
6
+ "delete",
7
+ "s-tools",
8
+ "setting",
9
+ "user-solid",
10
+ "user",
11
+ "phone",
12
+ "phone-outline",
13
+ "more",
14
+ "more-outline",
15
+ "star-on",
16
+ "star-off",
17
+ "s-goods",
18
+ "goods",
19
+ "warning",
20
+ "warning-outline",
21
+ "question",
22
+ "info",
23
+ "remove",
24
+ "circle-plus",
25
+ "success",
26
+ "error",
27
+ "zoom-in",
28
+ "zoom-out",
29
+ "remove-outline",
30
+ "circle-plus-outline",
31
+ "circle-check",
32
+ "circle-close",
33
+ "s-help",
34
+ "help",
35
+ "minus",
36
+ "plus",
37
+ "check",
38
+ "close",
39
+ "picture",
40
+ "picture-outline",
41
+ "picture-outline-round",
42
+ "upload",
43
+ "upload2",
44
+ "download",
45
+ "camera-solid",
46
+ "camera",
47
+ "video-camera-solid",
48
+ "video-camera",
49
+ "message-solid",
50
+ "bell",
51
+ "s-cooperation",
52
+ "s-order",
53
+ "s-platform",
54
+ "s-fold",
55
+ "s-unfold",
56
+ "s-operation",
57
+ "s-promotion",
58
+ "s-home",
59
+ "s-release",
60
+ "s-ticket",
61
+ "s-management",
62
+ "s-open",
63
+ "s-shop",
64
+ "s-marketing",
65
+ "s-flag",
66
+ "s-comment",
67
+ "s-finance",
68
+ "s-claim",
69
+ "s-custom",
70
+ "s-opportunity",
71
+ "s-data",
72
+ "s-check",
73
+ "s-grid",
74
+ "menu",
75
+ "share",
76
+ "d-caret",
77
+ "caret-left",
78
+ "caret-right",
79
+ "caret-bottom",
80
+ "caret-top",
81
+ "bottom-left",
82
+ "bottom-right",
83
+ "back",
84
+ "right",
85
+ "bottom",
86
+ "top",
87
+ "top-left",
88
+ "top-right",
89
+ "arrow-left",
90
+ "arrow-right",
91
+ "arrow-down",
92
+ "arrow-up",
93
+ "d-arrow-left",
94
+ "d-arrow-right",
95
+ "video-pause",
96
+ "video-play",
97
+ "refresh",
98
+ "refresh-right",
99
+ "refresh-left",
100
+ "finished",
101
+ "sort",
102
+ "sort-up",
103
+ "sort-down",
104
+ "rank",
105
+ "loading",
106
+ "view",
107
+ "c-scale-to-original",
108
+ "date",
109
+ "edit",
110
+ "edit-outline",
111
+ "folder",
112
+ "folder-opened",
113
+ "folder-add",
114
+ "folder-remove",
115
+ "folder-delete",
116
+ "folder-checked",
117
+ "tickets",
118
+ "document-remove",
119
+ "document-delete",
120
+ "document-copy",
121
+ "document-checked",
122
+ "document",
123
+ "document-add",
124
+ "printer",
125
+ "paperclip",
126
+ "takeaway-box",
127
+ "search",
128
+ "monitor",
129
+ "attract",
130
+ "mobile",
131
+ "scissors",
132
+ "umbrella",
133
+ "headset",
134
+ "brush",
135
+ "mouse",
136
+ "coordinate",
137
+ "magic-stick",
138
+ "reading",
139
+ "data-line",
140
+ "data-board",
141
+ "pie-chart",
142
+ "data-analysis",
143
+ "collection-tag",
144
+ "film",
145
+ "suitcase",
146
+ "suitcase-1",
147
+ "receiving",
148
+ "collection",
149
+ "files",
150
+ "notebook-1",
151
+ "notebook-2",
152
+ "toilet-paper",
153
+ "office-building",
154
+ "school",
155
+ "table-lamp",
156
+ "house",
157
+ "no-smoking",
158
+ "smoking",
159
+ "shopping-cart-full",
160
+ "shopping-cart-1",
161
+ "shopping-cart-2",
162
+ "shopping-bag-1",
163
+ "shopping-bag-2",
164
+ "sold-out",
165
+ "sell",
166
+ "present",
167
+ "box",
168
+ "bank-card",
169
+ "money",
170
+ "coin",
171
+ "wallet",
172
+ "discount",
173
+ "price-tag",
174
+ "news",
175
+ "guide",
176
+ "male",
177
+ "female",
178
+ "thumb",
179
+ "cpu",
180
+ "link",
181
+ "connection",
182
+ "open",
183
+ "turn-off",
184
+ "set-up",
185
+ "chat-round",
186
+ "chat-line-round",
187
+ "chat-square",
188
+ "chat-dot-round",
189
+ "chat-dot-square",
190
+ "chat-line-square",
191
+ "message",
192
+ "postcard",
193
+ "position",
194
+ "turn-off-microphone",
195
+ "microphone",
196
+ "close-notification",
197
+ "bangzhu",
198
+ "time",
199
+ "odometer",
200
+ "crop",
201
+ "aim",
202
+ "switch-button",
203
+ "full-screen",
204
+ "copy-document",
205
+ "mic",
206
+ "stopwatch",
207
+ "medal-1",
208
+ "medal",
209
+ "trophy",
210
+ "trophy-1",
211
+ "first-aid-kit",
212
+ "discover",
213
+ "place",
214
+ "location",
215
+ "location-outline",
216
+ "location-information",
217
+ "add-location",
218
+ "delete-location",
219
+ "map-location",
220
+ "alarm-clock",
221
+ "timer",
222
+ "watch-1",
223
+ "watch",
224
+ "lock",
225
+ "unlock",
226
+ "key",
227
+ "service",
228
+ "mobile-phone",
229
+ "bicycle",
230
+ "truck",
231
+ "ship",
232
+ "basketball",
233
+ "football",
234
+ "soccer",
235
+ "baseball",
236
+ "wind-power",
237
+ "light-rain",
238
+ "lightning",
239
+ "heavy-rain",
240
+ "sunrise",
241
+ "sunrise-1",
242
+ "sunset",
243
+ "sunny",
244
+ "cloudy",
245
+ "partly-cloudy",
246
+ "cloudy-and-sunny",
247
+ "moon",
248
+ "moon-night",
249
+ "dish",
250
+ "dish-1",
251
+ "food",
252
+ "chicken",
253
+ "fork-spoon",
254
+ "knife-fork",
255
+ "burger",
256
+ "tableware",
257
+ "sugar",
258
+ "dessert",
259
+ "ice-cream",
260
+ "hot-water",
261
+ "water-cup",
262
+ "coffee-cup",
263
+ "cold-drink",
264
+ "goblet",
265
+ "goblet-full",
266
+ "goblet-square",
267
+ "goblet-square-full",
268
+ "refrigerator",
269
+ "grape",
270
+ "watermelon",
271
+ "cherry",
272
+ "apple",
273
+ "pear",
274
+ "orange",
275
+ "coffee",
276
+ "ice-tea",
277
+ "ice-drink",
278
+ "milk-tea",
279
+ "potato-strips",
280
+ "lollipop",
281
+ "ice-cream-square",
282
+ "ice-cream-round"
283
+ ]
284
+ }
@@ -0,0 +1,145 @@
1
+ <template>
2
+ <el-select :value="value" :disabled="disabled" clearable @clear="clearHandle">
3
+ <template slot="prefix">
4
+ <span class="icon-picker-selected" v-if="value !== '' && value != null">
5
+ <i :class="value"></i>
6
+ </span>
7
+ </template>
8
+
9
+ <el-option class="icon-picker-option" :value="value">
10
+ <div>
11
+ <ul>
12
+ <li
13
+ v-for="icon in icons.elementIcons"
14
+ :key="icon"
15
+ @click="iconClick('el-icon-' + icon)"
16
+ >
17
+ <span><i :class="'el-icon-' + icon"></i></span>
18
+ </li>
19
+ <div class="clearfix"></div>
20
+ </ul>
21
+ </div>
22
+ </el-option>
23
+ </el-select>
24
+ </template>
25
+
26
+ <script>
27
+ import icons from "./icons.json";
28
+
29
+ export default {
30
+ name: "icon-picker",
31
+ props: {
32
+ value: {
33
+ type: String | null,
34
+ required: true,
35
+ },
36
+ disabled: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ },
41
+ model: {
42
+ prop: "value",
43
+ event: "change",
44
+ },
45
+ data() {
46
+ return {
47
+ icons: icons,
48
+ };
49
+ },
50
+ methods: {
51
+ iconClick(className) {
52
+ this.$emit("change", className);
53
+ },
54
+
55
+ clearHandle() {
56
+ this.$emit("change", "");
57
+ },
58
+ },
59
+ };
60
+ </script>
61
+
62
+ <style scoped>
63
+ ::v-deep .el-input--prefix .el-input__inner {
64
+ padding-left: 30px;
65
+ }
66
+ ::v-deep .el-input--suffix .el-input__inner {
67
+ padding-right: 30px;
68
+ }
69
+ ::v-deep .el-input__prefix {
70
+ left: 5px !important;
71
+ right: unset !important;
72
+ line-height: 38px;
73
+ }
74
+ .clearfix {
75
+ clear: both;
76
+ }
77
+
78
+ .icon-picker-option.el-select-dropdown__item {
79
+ width: 307px;
80
+ height: auto;
81
+ max-height: 200px;
82
+ overflow-y: auto;
83
+ padding: 0;
84
+ }
85
+
86
+ .icon-picker-option.el-select-dropdown__item.hover,
87
+ .icon-picker-option.el-select-dropdown__item:hover {
88
+ background-color: #fff;
89
+ cursor: default;
90
+ }
91
+
92
+ .icon-picker-option.el-select-dropdown__item.selected {
93
+ color: #606266;
94
+ font-weight: normal;
95
+ }
96
+
97
+ .icon-picker-option::-webkit-scrollbar {
98
+ width: 7px;
99
+ background-color: #eee;
100
+ }
101
+
102
+ .icon-picker-option::-webkit-scrollbar-track {
103
+ background-color: #eee;
104
+ }
105
+
106
+ .icon-picker-option::-webkit-scrollbar-thumb {
107
+ background: #d7d7d7;
108
+ border-radius: 7px;
109
+ }
110
+
111
+ .icon-picker-option > div {
112
+ cursor: default;
113
+ }
114
+
115
+ .icon-picker-option ul {
116
+ display: block;
117
+ margin: 0;
118
+ padding: 0;
119
+ }
120
+
121
+ .icon-picker-option ul > li {
122
+ display: block;
123
+ margin: 0;
124
+ padding: 0;
125
+ float: left;
126
+ text-align: center;
127
+ cursor: pointer;
128
+ width: 30px;
129
+ height: 30px;
130
+ line-height: 30px;
131
+ font-size: 16px;
132
+ }
133
+
134
+ .icon-picker-option ul > li:hover {
135
+ color: #327edb;
136
+ font-size: 18px;
137
+ }
138
+
139
+ .icon-picker-selected > i {
140
+ color: #333333;
141
+ line-height: 30px;
142
+ margin-left: 6px;
143
+ font-size: 16px;
144
+ }
145
+ </style>