@ebiz/designer-components 0.0.30 → 0.0.32
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/dist/designer-components.css +1 -1
- package/dist/index.mjs +21039 -20619
- package/package.json +1 -1
- package/src/components/EbizMap.vue +542 -0
- package/src/components/EbizTableSort.vue +2 -3
- package/src/components/EbizTdesignButtonDialog.vue +12 -30
- package/src/components/TdesignButton.vue +6 -0
- package/src/components/senior/EbizSData/index.vue +228 -0
- package/src/components/senior/EbizSForm/index.vue +385 -0
- package/src/components/senior/EbizSForm/item.vue +478 -0
- package/src/components/senior/EbizSForm/mItems/DateTimePicker.vue +52 -0
- package/src/components/senior/EbizSForm/mItems/Picker.vue +64 -0
- package/src/index.js +10 -3
- package/src/router/index.js +12 -0
- package/src/views/EbizMap.vue +202 -0
- package/src/views/EbizSDataDemo.vue +137 -0
- package/src/views/Home.vue +3 -1
- package/src/components/EbizSForm.vue +0 -398
- package/src/components/EbizSFormItem.vue +0 -587
@@ -0,0 +1,478 @@
|
|
1
|
+
<template>
|
2
|
+
<t-form-item :class="['ebiz-s-form-item', className]" :for="forAttr" :help="help" :label="label" :name="name"
|
3
|
+
:style="customStyle" :rules="rules" :label-width="labelWidth" :label-align="labelAlign" :status="status"
|
4
|
+
@validate="handleValidate">
|
5
|
+
<!-- 输入框 -->
|
6
|
+
<template v-if="type === 'input'">
|
7
|
+
<t-input v-model="computedModelValue" :placeholder="placeholder || '请输入'" :disabled="disabled"
|
8
|
+
:readonly="readonly" :clearable="clearable" :max-length="maxLength" :max-character="maxCharacter"
|
9
|
+
:show-limit-number="showLimitNumber" @change="handleChange" />
|
10
|
+
</template>
|
11
|
+
|
12
|
+
<!-- 数字输入框 -->
|
13
|
+
<template v-else-if="type === 'number'">
|
14
|
+
<t-input-number v-model="computedModelValue" :placeholder="placeholder || '请输入'" :disabled="disabled"
|
15
|
+
:readonly="readonly" :max="max" :min="min" :step="step" :format="format" @change="handleChange" />
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<!-- 文本域 -->
|
19
|
+
<template v-else-if="type === 'textarea'">
|
20
|
+
<t-textarea v-model="computedModelValue" :placeholder="placeholder || '请输入'" :disabled="disabled"
|
21
|
+
:readonly="readonly" :autosize="autosize" :maxlength="maxLength" :max-character="maxCharacter"
|
22
|
+
:show-limit-number="showLimitNumber" @change="handleChange" />
|
23
|
+
</template>
|
24
|
+
|
25
|
+
<!-- 选择器 -->
|
26
|
+
<template v-else-if="type === 'select'">
|
27
|
+
<t-select v-model="computedModelValue" :options="options" :placeholder="placeholder || '请选择'"
|
28
|
+
:disabled="disabled" :clearable="clearable" :filterable="filterable" :multiple="multiple"
|
29
|
+
:loading="loading" @change="handleChange" />
|
30
|
+
</template>
|
31
|
+
|
32
|
+
<!-- 日期选择器 -->
|
33
|
+
<template v-else-if="type === 'date'">
|
34
|
+
<t-date-picker v-model="computedModelValue" :placeholder="placeholder || '请选择日期'" :disabled="disabled"
|
35
|
+
:clearable="clearable" :format="dateFormat || 'YYYY-MM-DD'" :mode="dateMode || 'date'"
|
36
|
+
@change="handleChange" />
|
37
|
+
</template>
|
38
|
+
|
39
|
+
<!-- 时间选择器 -->
|
40
|
+
<template v-else-if="type === 'time'">
|
41
|
+
<t-time-picker v-model="computedModelValue" :placeholder="placeholder || '请选择时间'" :disabled="disabled"
|
42
|
+
:clearable="clearable" :format="timeFormat || 'HH:mm:ss'" @change="handleChange" />
|
43
|
+
</template>
|
44
|
+
|
45
|
+
<!-- 单选框组 -->
|
46
|
+
<template v-else-if="type === 'radio'">
|
47
|
+
<t-radio-group v-model="computedModelValue" :disabled="disabled" :options="options"
|
48
|
+
@change="handleChange" />
|
49
|
+
</template>
|
50
|
+
|
51
|
+
<!-- 复选框组 -->
|
52
|
+
<template v-else-if="type === 'checkbox'">
|
53
|
+
<t-checkbox-group v-model="computedModelValue" :disabled="disabled" :options="options" :max="max"
|
54
|
+
@change="handleChange" />
|
55
|
+
</template>
|
56
|
+
|
57
|
+
<!-- 开关 -->
|
58
|
+
<template v-else-if="type === 'switch'">
|
59
|
+
<t-switch v-model="computedModelValue" :disabled="disabled" @change="handleChange" />
|
60
|
+
</template>
|
61
|
+
|
62
|
+
<!-- 滑块 -->
|
63
|
+
<template v-else-if="type === 'slider'">
|
64
|
+
<t-slider v-model="computedModelValue" :disabled="disabled" :max="max" :min="min" :step="step"
|
65
|
+
:range="range" :marks="marks" @change="handleChange" />
|
66
|
+
</template>
|
67
|
+
|
68
|
+
<!-- 上传 -->
|
69
|
+
<template v-else-if="type === 'upload'">
|
70
|
+
<t-upload v-model="computedModelValue" :disabled="disabled" :accept="accept" :multiple="multiple" :max="max"
|
71
|
+
:action="action" :headers="headers" :with-credentials="withCredentials" :before-upload="beforeUpload"
|
72
|
+
:format-response="formatResponse" :theme="uploadTheme || 'file'" @change="handleChange" />
|
73
|
+
</template>
|
74
|
+
|
75
|
+
<!-- 级联选择器 -->
|
76
|
+
<template v-else-if="type === 'cascader'">
|
77
|
+
<t-cascader v-model="computedModelValue" :disabled="disabled" :options="options"
|
78
|
+
:placeholder="placeholder || '请选择'" :clearable="clearable" :filterable="filterable" :multiple="multiple"
|
79
|
+
@change="handleChange" />
|
80
|
+
</template>
|
81
|
+
|
82
|
+
<!-- 树形选择器 -->
|
83
|
+
<template v-else-if="type === 'tree-select'">
|
84
|
+
<t-tree-select v-model="computedModelValue" :disabled="disabled" :data="treeData || options"
|
85
|
+
:placeholder="placeholder || '请选择'" :clearable="clearable" :filterable="filterable" :multiple="multiple"
|
86
|
+
@change="handleChange" />
|
87
|
+
</template>
|
88
|
+
|
89
|
+
<!-- 颜色选择器 -->
|
90
|
+
<template v-else-if="type === 'color-picker'">
|
91
|
+
<t-color-picker v-model="computedModelValue" :disabled="disabled" :clearable="clearable"
|
92
|
+
@change="handleChange" />
|
93
|
+
</template>
|
94
|
+
|
95
|
+
<!-- 默认插槽,用于自定义控件 -->
|
96
|
+
<template v-else>
|
97
|
+
<slot>
|
98
|
+
<div class="custom-control">
|
99
|
+
<slot name="default"></slot>
|
100
|
+
</div>
|
101
|
+
</slot>
|
102
|
+
</template>
|
103
|
+
</t-form-item>
|
104
|
+
</template>
|
105
|
+
|
106
|
+
<script>
|
107
|
+
/**
|
108
|
+
* @displayName PC端表单项
|
109
|
+
* @description PC端表单项组件,基于TDesign FormItem封装,支持多种控件类型
|
110
|
+
* @category 表单组件
|
111
|
+
* @name EbizSFormItem
|
112
|
+
*/
|
113
|
+
export default {
|
114
|
+
name: "EbizSFormItem"
|
115
|
+
}
|
116
|
+
</script>
|
117
|
+
|
118
|
+
<script setup>
|
119
|
+
import { defineProps, defineEmits, computed } from 'vue';
|
120
|
+
import {
|
121
|
+
FormItem as TFormItem,
|
122
|
+
Input as TInput,
|
123
|
+
InputNumber as TInputNumber,
|
124
|
+
Textarea as TTextarea,
|
125
|
+
Select as TSelect,
|
126
|
+
DatePicker as TDatePicker,
|
127
|
+
TimePicker as TTimePicker,
|
128
|
+
RadioGroup as TRadioGroup,
|
129
|
+
CheckboxGroup as TCheckboxGroup,
|
130
|
+
Switch as TSwitch,
|
131
|
+
Slider as TSlider,
|
132
|
+
Upload as TUpload,
|
133
|
+
Cascader as TCascader,
|
134
|
+
TreeSelect as TTreeSelect,
|
135
|
+
ColorPicker as TColorPicker
|
136
|
+
} from 'tdesign-vue-next';
|
137
|
+
|
138
|
+
const props = defineProps({
|
139
|
+
/**
|
140
|
+
* 组件类型
|
141
|
+
* @options input|number|textarea|select|date|time|radio|checkbox|switch|slider|upload|cascader|tree-select|color-picker
|
142
|
+
*/
|
143
|
+
type: {
|
144
|
+
type: String,
|
145
|
+
default: undefined,
|
146
|
+
validator: (val) => [
|
147
|
+
'input', 'number', 'textarea', 'select', 'date', 'time', 'radio',
|
148
|
+
'checkbox', 'switch', 'slider', 'upload', 'cascader', 'tree-select',
|
149
|
+
'color-picker'
|
150
|
+
].includes(val)
|
151
|
+
},
|
152
|
+
/**
|
153
|
+
* 绑定的值
|
154
|
+
*/
|
155
|
+
modelValue: {
|
156
|
+
type: [String, Number, Boolean, Array, Object],
|
157
|
+
default: undefined
|
158
|
+
},
|
159
|
+
/**
|
160
|
+
* 表单项标签
|
161
|
+
*/
|
162
|
+
label: {
|
163
|
+
type: String,
|
164
|
+
default: ''
|
165
|
+
},
|
166
|
+
/**
|
167
|
+
* 表单项字段名,唯一标识
|
168
|
+
*/
|
169
|
+
name: {
|
170
|
+
type: String,
|
171
|
+
default: ''
|
172
|
+
},
|
173
|
+
/**
|
174
|
+
* html元素原生属性for
|
175
|
+
*/
|
176
|
+
forAttr: {
|
177
|
+
type: String,
|
178
|
+
default: undefined
|
179
|
+
},
|
180
|
+
/**
|
181
|
+
* 表单项帮助文本
|
182
|
+
*/
|
183
|
+
help: {
|
184
|
+
type: [String, Function],
|
185
|
+
default: ''
|
186
|
+
},
|
187
|
+
/**
|
188
|
+
* 是否禁用
|
189
|
+
*/
|
190
|
+
disabled: {
|
191
|
+
type: Boolean,
|
192
|
+
default: false
|
193
|
+
},
|
194
|
+
/**
|
195
|
+
* 是否只读
|
196
|
+
*/
|
197
|
+
readonly: {
|
198
|
+
type: Boolean,
|
199
|
+
default: false
|
200
|
+
},
|
201
|
+
/**
|
202
|
+
* 表单项规则
|
203
|
+
*/
|
204
|
+
rules: {
|
205
|
+
type: [Array, Object],
|
206
|
+
default: undefined
|
207
|
+
},
|
208
|
+
/**
|
209
|
+
* 自定义样式
|
210
|
+
*/
|
211
|
+
customStyle: {
|
212
|
+
type: [String, Object],
|
213
|
+
default: ''
|
214
|
+
},
|
215
|
+
/**
|
216
|
+
* 自定义类名
|
217
|
+
*/
|
218
|
+
className: {
|
219
|
+
type: String,
|
220
|
+
default: ''
|
221
|
+
},
|
222
|
+
/**
|
223
|
+
* 表单项标签宽度
|
224
|
+
*/
|
225
|
+
labelWidth: {
|
226
|
+
type: [String, Number],
|
227
|
+
default: undefined
|
228
|
+
},
|
229
|
+
/**
|
230
|
+
* 表单项标签对齐方式
|
231
|
+
* @options left|right|top
|
232
|
+
*/
|
233
|
+
labelAlign: {
|
234
|
+
type: String,
|
235
|
+
default: undefined,
|
236
|
+
validator: (val) => ['left', 'right', 'top'].includes(val)
|
237
|
+
},
|
238
|
+
/**
|
239
|
+
* 表单项状态
|
240
|
+
* @options default|success|warning|error
|
241
|
+
*/
|
242
|
+
status: {
|
243
|
+
type: String,
|
244
|
+
default: undefined,
|
245
|
+
validator: (val) => ['default', 'success', 'warning', 'error'].includes(val)
|
246
|
+
},
|
247
|
+
/**
|
248
|
+
* 占位文本
|
249
|
+
*/
|
250
|
+
placeholder: {
|
251
|
+
type: String,
|
252
|
+
default: ''
|
253
|
+
},
|
254
|
+
/**
|
255
|
+
* 是否可清空
|
256
|
+
*/
|
257
|
+
clearable: {
|
258
|
+
type: Boolean,
|
259
|
+
default: true
|
260
|
+
},
|
261
|
+
/**
|
262
|
+
* 最大长度
|
263
|
+
*/
|
264
|
+
maxLength: {
|
265
|
+
type: Number,
|
266
|
+
default: undefined
|
267
|
+
},
|
268
|
+
/**
|
269
|
+
* 最大字符数
|
270
|
+
*/
|
271
|
+
maxCharacter: {
|
272
|
+
type: Number,
|
273
|
+
default: undefined
|
274
|
+
},
|
275
|
+
/**
|
276
|
+
* 是否显示字数限制
|
277
|
+
*/
|
278
|
+
showLimitNumber: {
|
279
|
+
type: Boolean,
|
280
|
+
default: false
|
281
|
+
},
|
282
|
+
/**
|
283
|
+
* 选项数据,用于select, radio, checkbox等
|
284
|
+
*/
|
285
|
+
options: {
|
286
|
+
type: Array,
|
287
|
+
default: () => []
|
288
|
+
},
|
289
|
+
/**
|
290
|
+
* 树形数据,用于tree-select
|
291
|
+
*/
|
292
|
+
treeData: {
|
293
|
+
type: Array,
|
294
|
+
default: undefined
|
295
|
+
},
|
296
|
+
/**
|
297
|
+
* 是否支持过滤
|
298
|
+
*/
|
299
|
+
filterable: {
|
300
|
+
type: Boolean,
|
301
|
+
default: false
|
302
|
+
},
|
303
|
+
/**
|
304
|
+
* 是否支持多选
|
305
|
+
*/
|
306
|
+
multiple: {
|
307
|
+
type: Boolean,
|
308
|
+
default: false
|
309
|
+
},
|
310
|
+
/**
|
311
|
+
* 加载状态
|
312
|
+
*/
|
313
|
+
loading: {
|
314
|
+
type: Boolean,
|
315
|
+
default: false
|
316
|
+
},
|
317
|
+
/**
|
318
|
+
* 日期格式
|
319
|
+
*/
|
320
|
+
dateFormat: {
|
321
|
+
type: String,
|
322
|
+
default: 'YYYY-MM-DD'
|
323
|
+
},
|
324
|
+
/**
|
325
|
+
* 日期选择器模式
|
326
|
+
* @options date|week|month|quarter|year
|
327
|
+
*/
|
328
|
+
dateMode: {
|
329
|
+
type: String,
|
330
|
+
default: 'date',
|
331
|
+
validator: (val) => ['date', 'week', 'month', 'quarter', 'year'].includes(val)
|
332
|
+
},
|
333
|
+
/**
|
334
|
+
* 时间格式
|
335
|
+
*/
|
336
|
+
timeFormat: {
|
337
|
+
type: String,
|
338
|
+
default: 'HH:mm:ss'
|
339
|
+
},
|
340
|
+
/**
|
341
|
+
* 最大值
|
342
|
+
*/
|
343
|
+
max: {
|
344
|
+
type: Number,
|
345
|
+
default: undefined
|
346
|
+
},
|
347
|
+
/**
|
348
|
+
* 最小值
|
349
|
+
*/
|
350
|
+
min: {
|
351
|
+
type: Number,
|
352
|
+
default: undefined
|
353
|
+
},
|
354
|
+
/**
|
355
|
+
* 步长
|
356
|
+
*/
|
357
|
+
step: {
|
358
|
+
type: Number,
|
359
|
+
default: 1
|
360
|
+
},
|
361
|
+
/**
|
362
|
+
* 格式化函数
|
363
|
+
*/
|
364
|
+
format: {
|
365
|
+
type: Function,
|
366
|
+
default: undefined
|
367
|
+
},
|
368
|
+
/**
|
369
|
+
* 文本域自适应高度
|
370
|
+
*/
|
371
|
+
autosize: {
|
372
|
+
type: [Boolean, Object],
|
373
|
+
default: false
|
374
|
+
},
|
375
|
+
/**
|
376
|
+
* 滑块是否为范围选择
|
377
|
+
*/
|
378
|
+
range: {
|
379
|
+
type: Boolean,
|
380
|
+
default: false
|
381
|
+
},
|
382
|
+
/**
|
383
|
+
* 滑块刻度标记
|
384
|
+
*/
|
385
|
+
marks: {
|
386
|
+
type: Object,
|
387
|
+
default: () => ({})
|
388
|
+
},
|
389
|
+
/**
|
390
|
+
* 上传接受的文件类型
|
391
|
+
*/
|
392
|
+
accept: {
|
393
|
+
type: String,
|
394
|
+
default: ''
|
395
|
+
},
|
396
|
+
/**
|
397
|
+
* 上传接口地址
|
398
|
+
*/
|
399
|
+
action: {
|
400
|
+
type: String,
|
401
|
+
default: ''
|
402
|
+
},
|
403
|
+
/**
|
404
|
+
* 上传请求头
|
405
|
+
*/
|
406
|
+
headers: {
|
407
|
+
type: Object,
|
408
|
+
default: () => ({})
|
409
|
+
},
|
410
|
+
/**
|
411
|
+
* 上传是否携带cookie
|
412
|
+
*/
|
413
|
+
withCredentials: {
|
414
|
+
type: Boolean,
|
415
|
+
default: false
|
416
|
+
},
|
417
|
+
/**
|
418
|
+
* 上传前的钩子函数
|
419
|
+
*/
|
420
|
+
beforeUpload: {
|
421
|
+
type: Function,
|
422
|
+
default: undefined
|
423
|
+
},
|
424
|
+
/**
|
425
|
+
* 上传响应格式化函数
|
426
|
+
*/
|
427
|
+
formatResponse: {
|
428
|
+
type: Function,
|
429
|
+
default: undefined
|
430
|
+
},
|
431
|
+
/**
|
432
|
+
* 上传组件主题
|
433
|
+
* @options file|image|image-flow
|
434
|
+
*/
|
435
|
+
uploadTheme: {
|
436
|
+
type: String,
|
437
|
+
default: 'file',
|
438
|
+
validator: (val) => ['file', 'image', 'image-flow'].includes(val)
|
439
|
+
}
|
440
|
+
});
|
441
|
+
|
442
|
+
const emit = defineEmits([
|
443
|
+
'update:modelValue',
|
444
|
+
'change',
|
445
|
+
'validate'
|
446
|
+
]);
|
447
|
+
|
448
|
+
// 计算属性处理v-model双向绑定
|
449
|
+
const computedModelValue = computed({
|
450
|
+
get: () => props.modelValue,
|
451
|
+
set: (val) => {
|
452
|
+
emit('update:modelValue', val);
|
453
|
+
}
|
454
|
+
});
|
455
|
+
|
456
|
+
/**
|
457
|
+
* 值变更事件
|
458
|
+
* @param {*} val 新值
|
459
|
+
*/
|
460
|
+
const handleChange = (val) => {
|
461
|
+
emit('change', val);
|
462
|
+
};
|
463
|
+
|
464
|
+
/**
|
465
|
+
* 验证事件
|
466
|
+
* @param {Object} validateResult 验证结果
|
467
|
+
*/
|
468
|
+
const handleValidate = (validateResult) => {
|
469
|
+
emit('validate', validateResult);
|
470
|
+
};
|
471
|
+
</script>
|
472
|
+
|
473
|
+
<style scoped>
|
474
|
+
|
475
|
+
.custom-control {
|
476
|
+
width: 100%;
|
477
|
+
}
|
478
|
+
</style>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<div @click="visible = true"
|
4
|
+
style="display: flex; width: 100%; justify-content: flex-end; align-items: center;">
|
5
|
+
<div v-if="pickerValue" style="margin-right: 10px;">
|
6
|
+
{{ pickerValue }}
|
7
|
+
</div>
|
8
|
+
<div v-else style="margin-right: 10px; color: rgba(0, 0, 0, 0.4);">
|
9
|
+
年 月 日
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<!-- <EbizMobileDateTimePicker :visible="visible" is-popup :mode="['date']" :title="properties.title"
|
14
|
+
:start="properties.start" :format="properties.format" @confirm="onConfirm" @cancel="onCancel" /> -->
|
15
|
+
</div>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<script setup>
|
19
|
+
import { ref, defineProps, defineEmits } from 'vue';
|
20
|
+
|
21
|
+
|
22
|
+
const visible = ref(false)
|
23
|
+
const pickerValue = ref('')
|
24
|
+
|
25
|
+
const emit = defineEmits(['update:modelValue', 'onCancel'])
|
26
|
+
const props = defineProps({
|
27
|
+
modelValue: {
|
28
|
+
type: Object
|
29
|
+
},
|
30
|
+
properties: {
|
31
|
+
type: Object,
|
32
|
+
default: () => {
|
33
|
+
return {
|
34
|
+
title: '选择日期',
|
35
|
+
start: '1900-01-01',
|
36
|
+
format: 'YYYY-MM-DD'
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
})
|
41
|
+
|
42
|
+
const onCancel = () => {
|
43
|
+
visible.value = false
|
44
|
+
emit('onCancel')
|
45
|
+
}
|
46
|
+
const onConfirm = (val) => {
|
47
|
+
console.log(val)
|
48
|
+
pickerValue.value = val
|
49
|
+
visible.value = false
|
50
|
+
emit('update:modelValue', val)
|
51
|
+
}
|
52
|
+
</script>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<div @click="visible = true"
|
4
|
+
style="display: flex; width: 100%; justify-content: flex-end; align-items: center;">
|
5
|
+
<div v-if="pickerValue" style="margin-right: 10px;">
|
6
|
+
<template v-for="(item, key) in options" :key="key">
|
7
|
+
<div v-if="item.value == pickerValue[0]">
|
8
|
+
{{ item.label }}
|
9
|
+
</div>
|
10
|
+
</template>
|
11
|
+
|
12
|
+
</div>
|
13
|
+
<div v-else style="margin-right: 10px; color: rgba(0, 0, 0, 0.4);">
|
14
|
+
{{placeholder}}
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<!-- <EbizMobilePicker :visible="visible" is-popup :columns="options" :mode="['date']" :title="properties.title"
|
19
|
+
:start="properties.start" :format="properties.format" @confirm="onConfirm" @cancel="onCancel" /> -->
|
20
|
+
</div>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<script setup>
|
24
|
+
import { ref, defineProps, defineEmits } from 'vue';
|
25
|
+
|
26
|
+
|
27
|
+
const visible = ref(false)
|
28
|
+
const pickerValue = ref('')
|
29
|
+
|
30
|
+
const emit = defineEmits(['update:modelValue', 'onCancel'])
|
31
|
+
const props = defineProps({
|
32
|
+
modelValue: {
|
33
|
+
type: Object
|
34
|
+
},
|
35
|
+
placeholder: {
|
36
|
+
type: String,
|
37
|
+
default: '请选择'
|
38
|
+
},
|
39
|
+
options: {
|
40
|
+
type: Array,
|
41
|
+
default: () => {
|
42
|
+
return []
|
43
|
+
}
|
44
|
+
},
|
45
|
+
properties: {
|
46
|
+
type: Object,
|
47
|
+
default: () => {
|
48
|
+
return {
|
49
|
+
title: '选择',
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
})
|
54
|
+
|
55
|
+
const onCancel = () => {
|
56
|
+
visible.value = false
|
57
|
+
emit('onCancel')
|
58
|
+
}
|
59
|
+
const onConfirm = (val) => {
|
60
|
+
pickerValue.value = val
|
61
|
+
visible.value = false
|
62
|
+
emit('update:modelValue', val[0])
|
63
|
+
}
|
64
|
+
</script>
|
package/src/index.js
CHANGED
@@ -61,8 +61,6 @@ import EbizTdesignLoading from './components/EbizTdesignLoading.vue';
|
|
61
61
|
import EbizAutoForm from './components/EbizAutoForm.vue';
|
62
62
|
import EbizDepartmentSelector from './components/EbizDepartmentSelector.vue';
|
63
63
|
import EbizTdesignButtonDialog from './components/EbizTdesignButtonDialog.vue';
|
64
|
-
import EbizSForm from './components/EbizSForm.vue';
|
65
|
-
import EbizSFormItem from './components/EbizSFormItem.vue';
|
66
64
|
import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
|
67
65
|
|
68
66
|
// import EbizDescriptions from './components/EbizDescriptions.vue';
|
@@ -84,6 +82,12 @@ import EbizTimeline from "./components/TdesignTimeline.vue";
|
|
84
82
|
import {TimelineItem as EbizTimelineItem} from 'tdesign-vue-next';
|
85
83
|
import { LoadingPlugin as EbizLoading } from 'tdesign-vue-next';
|
86
84
|
|
85
|
+
import EbizMap from './components/EbizMap.vue';
|
86
|
+
|
87
|
+
import EbizSData from './components/senior/EbizSData/index.vue';
|
88
|
+
import EbizSForm from "./components/senior/EbizSForm/index.vue";
|
89
|
+
import EbizSFormItem from "./components/senior/EbizSForm/item.vue";
|
90
|
+
|
87
91
|
// 导出组件
|
88
92
|
export {
|
89
93
|
MyComponent,
|
@@ -197,7 +201,10 @@ export {
|
|
197
201
|
EbizLoading,
|
198
202
|
// 弹窗按钮组件
|
199
203
|
EbizTdesignButtonDialog,
|
200
|
-
|
204
|
+
EbizMap,
|
205
|
+
|
206
|
+
// PC端高级组件
|
207
|
+
EbizSData,
|
201
208
|
EbizSForm,
|
202
209
|
EbizSFormItem
|
203
210
|
};
|
package/src/router/index.js
CHANGED
@@ -322,6 +322,18 @@ const routes = [
|
|
322
322
|
name: 'EbizSForm',
|
323
323
|
component: () => import('../views/EbizSFormDemo.vue'),
|
324
324
|
meta: { title: 'PC端表单组件示例' }
|
325
|
+
},
|
326
|
+
{
|
327
|
+
path: '/ebiz-map',
|
328
|
+
name: 'EbizMap',
|
329
|
+
component: () => import('../views/EbizMap.vue'),
|
330
|
+
meta: { title: '地图经纬度选择器组件示例' }
|
331
|
+
},
|
332
|
+
{
|
333
|
+
path: '/ebiz-s-data',
|
334
|
+
name: 'EbizSData',
|
335
|
+
component: () => import('../views/EbizSDataDemo.vue'),
|
336
|
+
meta: { title: 'Ebiz数据组件示例' }
|
325
337
|
}
|
326
338
|
]
|
327
339
|
|