Commit a04316ba authored by 田翔's avatar 田翔

fix: 音频60s,视频15秒

parent 4a50fe6b
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.4.2", "version": "5.4.3",
"description": "5.4.2 录音以及视频增加时长配置", "description": "5.4.3 音频60s,视频15秒",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -2081,7 +2081,7 @@ const fileWidgets = [ ...@@ -2081,7 +2081,7 @@ const fileWidgets = [
fileType: { fileType: {
title: '文件类型', title: '文件类型',
type: 'string', type: 'string',
widget: 'select', widget: 'FileTypeSelect',
enum: ['全部', '图片', '文档', '音频', '视频'], enum: ['全部', '图片', '文档', '音频', '视频'],
enumNames: ['全部', '图片', '文档', '音频', '视频'], enumNames: ['全部', '图片', '文档', '音频', '视频'],
default: '全部', default: '全部',
......
import React, { useMemo, useState } from 'react'
import { Select } from 'antd'
const options = ['全部', '图片', '文档', '音频', '视频']
const FileTypeSelect = (props) => {
const { value, onChange, addons } = props
const selectChange = (value) => {
onChange(value)
if (value === '音频') {
addons.setValue('durationTime', 60)
} else if (value === '视频') {
addons.setValue('durationTime', 15)
}
}
return (
<Select value={value} onChange={selectChange}>
{
options.map(v => <Select.Option key={v} value={v}>{v}</Select.Option>)
}
</Select>
)
}
export default FileTypeSelect
\ No newline at end of file
...@@ -2,12 +2,14 @@ import PercentSlider from './PercentSlider' ...@@ -2,12 +2,14 @@ import PercentSlider from './PercentSlider'
import ShowText from './ShowText' import ShowText from './ShowText'
import Formatting from './Formatting' import Formatting from './Formatting'
import DecimalDigits from './DecimalDigits' import DecimalDigits from './DecimalDigits'
import FileTypeSelect from './FileTypeSelect'
const groupStyle = { const groupStyle = {
PercentSlider, PercentSlider,
ShowText, ShowText,
Formatting, Formatting,
DecimalDigits, DecimalDigits,
FileTypeSelect,
} }
export default groupStyle export default groupStyle
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment