wui-components-v2 1.0.80 → 1.0.82

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.
@@ -48,8 +48,9 @@ function initFormData() {
48
48
  fileKey: `$blob:${JSON.parse(props.entity[item.sourceId])?.base.bytesInfoVO.code}`,
49
49
  }) }]) || item.transDefaultValue || []
50
50
  }
51
+
51
52
  // 时间
52
- if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime') {
53
+ if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date') {
53
54
  return models[item.sourceId] = (props.entity && dayjs(props.entity[item.sourceId]).valueOf()) || (item.transDefaultValue && dayjs(item.transDefaultValue).valueOf()) || null
54
55
  }
55
56
 
@@ -221,7 +222,7 @@ defineExpose({
221
222
  filterable
222
223
  />
223
224
  <wd-calendar
224
- v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime'"
225
+ v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date'"
225
226
  v-model="model[item.sourceId]"
226
227
  type="datetime"
227
228
  :label="item.title"
@@ -231,6 +232,18 @@ defineExpose({
231
232
  :clearable="!item.disabled"
232
233
  :placeholder="`请输入${item.title}`"
233
234
  />
235
+ <wd-datetime-picker
236
+ v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'time'"
237
+ v-model="model[item.sourceId]"
238
+ type="time"
239
+ use-second
240
+ :label="item.title"
241
+ label-width="100px"
242
+ :prop="item.sourceId"
243
+ :readonly="item.disabled"
244
+ :clearable="!item.disabled"
245
+ :placeholder="`请输入${item.title}`"
246
+ />
234
247
  <wd-cell v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relfile' " :prop="item.sourceId" :title="item.title" title-width="100px">
235
248
  <wd-upload
236
249
  :disabled="item.disabled"
@@ -255,7 +268,12 @@ defineExpose({
255
268
  </wd-cell> -->
256
269
  <wd-cell v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'int' " :title="item.title" title-width="100px" :prop="item.sourceId">
257
270
  <view style="text-align: left">
258
- <wd-input-number v-model="model[item.sourceId]" />
271
+ <wd-input-number v-model="model[item.sourceId]" :disabled="item.disabled" :min="Number(item.min || 0)" :max="Number(item.max || Infinity)" />
272
+ </view>
273
+ </wd-cell>
274
+ <wd-cell v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'yes-no-switch' " :title="item.title" title-width="100px" :prop="item.sourceId">
275
+ <view style="text-align: left">
276
+ <wd-switch v-model="model[item.sourceId]" size="16" :disabled="item.disabled" active-value="是" inactive-value="否" />
259
277
  </view>
260
278
  </wd-cell>
261
279
  <!-- <SelectColPicker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",
package/type.ts CHANGED
@@ -48,6 +48,7 @@ export interface Fields extends Columns {
48
48
  transDefaultValue: string
49
49
  required: boolean
50
50
  max?: string
51
+ min?: string
51
52
  }
52
53
 
53
54
  // 编辑按钮配置