123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- const instalcePublic = {
- name: {
- type: String,
- },
- disabled: {
- type: [Boolean],
- },
- modelValue: {
- required: false,
- default: '',
- },
- placeholder: {
- require: false,
- default: '请输入',
- },
- }
- export const colorPropsDesc = {
- ...instalcePublic,
- width: {
- type: String,
- default: '100px',
- },
- height: {
- type: String,
- default: '34px',
- },
- }
- export const filePropsDesc = {
- ...instalcePublic,
- placeholder: {
- require: false,
- default: '请选择',
- },
- othPlaceholder: {
- require: false,
- default: '',
- },
- accept: {
- type: String,
- },
- scale: {
- type: String,
- },
- multiple: {
- type: Boolean,
- },
- preview: {
- type: Boolean,
- },
- maxSize: {
- type: Number,
- },
- maxLen: {
- type: Number,
- },
- }
- export const switchPropsDesc = {
- ...instalcePublic,
- width: {
- type: [Number, String],
- },
- height: {
- type: [Number, String],
- },
- }
- export const checkboxPropsDesc = {
- ...switchPropsDesc,
- label: {
- type: String,
- required: false,
- },
- }
- export const radioPropsDesc = {
- ...checkboxPropsDesc,
- icon: {
- type: String,
- },
- tip: {
- type: String,
- },
- }
- export const textPropsDesc = {
- ...instalcePublic,
- maxlength: {
- type: [String, Number],
- },
- placeholder: {
- type: String,
- default: '请输入',
- },
- readonly: {
- type: Boolean,
- default: false,
- },
- other: {
- type: Object,
- default: () => ({}),
- },
- right: {
- type: Boolean,
- },
- }
- export const textEmitsDesc = ['update:modelValue', 'focus', 'blur', 'click', 'keydown']
- export const textareaPropsDesc = {
- ...textPropsDesc,
- rich: {
- type: Boolean,
- },
- }
- export const richtextPropsDesc = {
- ...textareaPropsDesc,
- onUpdatePos: Function,
- }
- export const selectPropsDesc = {
- ...textPropsDesc,
- stopEl: {
- type: String,
- require: false,
- },
- floatingClass: {
- type: String,
- require: false,
- },
- showOptions: {
- type: Boolean,
- require: false,
- },
- placeholder: { ...textPropsDesc.placeholder, default: '请选择' },
- unplaceholder: { ...textPropsDesc.placeholder, default: '暂无选项' },
- hideScroll: {
- type: Boolean,
- default: false,
- },
- options: {
- type: Array,
- default: () => [],
- },
- dire: {
- type: String,
- default: 'bottom',
- },
- }
- export const searchPropsDesc = {
- ...selectPropsDesc,
- unplaceholder: { ...textPropsDesc.placeholder, default: '无搜索结果' },
- }
- export const numberPropsDesc = {
- ...textPropsDesc,
- inInput: {
- type: Boolean,
- default: true,
- },
- ctrl: {
- type: Boolean,
- default: true,
- },
- step: {
- type: Number,
- require: true,
- default: 1,
- },
- min: {
- type: [Number, String],
- require: false,
- },
- max: {
- type: [Number, String],
- require: false,
- },
- limit: {
- type: Number,
- default: 0,
- },
- inch: {
- type: [Boolean, String],
- default: false,
- },
- rangeInput: {
- type: Boolean,
- default: true,
- },
- rangeTips: {
- type: Boolean,
- default: false,
- },
- }
- export const rangePropsDesc = {
- ...numberPropsDesc,
- min: { ...numberPropsDesc.min, require: true },
- min: { ...numberPropsDesc.min, require: true },
- }
- const summary = {
- ...checkboxPropsDesc,
- ...radioPropsDesc,
- ...selectPropsDesc,
- ...textPropsDesc,
- ...rangePropsDesc,
- ...numberPropsDesc,
- ...switchPropsDesc,
- ...textareaPropsDesc,
- ...filePropsDesc,
- ...searchPropsDesc,
- ...richtextPropsDesc,
- ...colorPropsDesc,
- }
- for (let key in summary) {
- summary[key] = {
- ...summary[key],
- default: undefined,
- }
- }
- export const inputEmitDesc = {
- text: textEmitsDesc,
- }
- export const inputPropsDesc = {
- ...summary,
- type: {
- type: String,
- required: true,
- default: 'text',
- },
- width: {
- type: [Number, String],
- },
- height: {
- type: [Number, String],
- },
- require: {
- type: Boolean,
- },
- error: {
- type: String,
- },
- disabled: {
- type: Boolean,
- },
- }
|