mirror of
https://github.com/vxcontrol/ncform.git
synced 2026-07-18 16:24:27 -04:00
feat: 透传部分组件属性
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<el-color-picker
|
||||
v-else
|
||||
v-model="modelVal"
|
||||
v-bind="mergeConfig"
|
||||
:disabled="disabled || readonly"
|
||||
></el-color-picker>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
v-else
|
||||
v-model="modelVal"
|
||||
:disabled="disabled || readonly"
|
||||
:min="mergeConfig.min"
|
||||
:max="mergeConfig.max"
|
||||
:step="mergeConfig.step"
|
||||
:size="mergeConfig.size"
|
||||
v-bind="mergeConfig"
|
||||
></el-input-number>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,6 +19,9 @@
|
||||
clear: none;
|
||||
}
|
||||
}
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.v-layout {
|
||||
@@ -30,6 +30,9 @@
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
.el-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.ncform-input-number-preview {
|
||||
|
||||
@@ -4,20 +4,7 @@
|
||||
v-model="modelVal"
|
||||
:disabled="disabled || readonly"
|
||||
:placeholder="placeholder"
|
||||
:max="mergeConfig.max"
|
||||
:allow-half="mergeConfig.allowHalf"
|
||||
:low-threshold="mergeConfig.lowThreshold"
|
||||
:high-threshold="mergeConfig.highThreshold"
|
||||
:colors="mergeConfig.colors"
|
||||
:void-color="mergeConfig.voidColor"
|
||||
:disabled-void-color="mergeConfig.disabledVoidColor"
|
||||
:icon-classes="mergeConfig.iconClasses"
|
||||
:void-icon-class="mergeConfig.voidIconClass"
|
||||
:disabled-void-icon-class="mergeConfig.disabledVoidIconClass"
|
||||
:show-text="mergeConfig.showText"
|
||||
:show-score="mergeConfig.showScore"
|
||||
:text-color="mergeConfig.textColor"
|
||||
:texts="mergeConfig.texts"
|
||||
v-bind="mergeConfig"
|
||||
></el-rate>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
v-model="modelVal"
|
||||
:disabled="disabled || readonly"
|
||||
:placeholder="placeholder"
|
||||
:min="mergeConfig.min"
|
||||
:max="mergeConfig.max"
|
||||
:step="mergeConfig.step"
|
||||
v-bind="mergeConfig"
|
||||
></el-slider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,15 +3,7 @@
|
||||
<el-switch
|
||||
v-model="modelVal"
|
||||
:disabled="disabled || readonly"
|
||||
:width="mergeConfig.width"
|
||||
:active-icon-class="mergeConfig.activeIconClass"
|
||||
:inactive-icon-class="mergeConfig.inactiveIconClass"
|
||||
:active-text="mergeConfig.activeText"
|
||||
:inactive-text="mergeConfig.inactiveText"
|
||||
:active-value="mergeConfig.activeValue"
|
||||
:inactive-value="mergeConfig.inactiveValue"
|
||||
:active-color="mergeConfig.activeColor"
|
||||
:inactive-color="mergeConfig.inactiveColor"
|
||||
v-bind="mergeConfig"
|
||||
></el-switch>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
v-else
|
||||
v-show="!hidden"
|
||||
v-model="inputVal"
|
||||
v-bind="mergeConfig"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
:placeholder="placeholder"
|
||||
:rows="mergeConfig.rows"
|
||||
:autosize="mergeConfig.autoSize"
|
||||
@blur="onBlur"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
@@ -40,23 +40,14 @@
|
||||
ref="upload"
|
||||
:class="[readonly ? 'is-read-only' : '']"
|
||||
:disabled="readonly || disabled"
|
||||
:action="mergeConfig.uploadUrl"
|
||||
:multiple="mergeConfig.multiple"
|
||||
:data="mergeConfig.data"
|
||||
v-bind="mergeConfig"
|
||||
:show-file-list="showFileList"
|
||||
:drag="mergeConfig.drag"
|
||||
:accept="mergeConfig.accept"
|
||||
:list-type="mergeConfig.listType"
|
||||
:auto-upload="mergeConfig.autoUpload"
|
||||
:limit="mergeConfig.limit"
|
||||
:on-change="handleUploadChange"
|
||||
:on-success="handleUploadSucess"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleUploadExceed"
|
||||
:on-remove="handleUploadRemove"
|
||||
:file-list="fileList"
|
||||
:name="mergeConfig.fileField"
|
||||
:headers="mergeConfig.headers"
|
||||
>
|
||||
<!-- 1. 可拖拽 -->
|
||||
<template v-if="!readonly && mergeConfig.drag" slot="trigger">
|
||||
@@ -196,7 +187,7 @@
|
||||
return {
|
||||
// 组件特有的配置属性
|
||||
defaultConfig: {
|
||||
uploadUrl: '', // 上传的地址
|
||||
action: '', // 上传的地址
|
||||
multiple: false, // 是否支持多选
|
||||
data: {}, // 上传时附带的额外参数
|
||||
showFileList: true, // 是否显示已上传文件列表
|
||||
@@ -215,7 +206,7 @@
|
||||
resField: '', // 获取返回结果的字段,
|
||||
fileNameField: 'name',
|
||||
fileUrlField: 'url',
|
||||
fileField: 'file',
|
||||
name: 'file',
|
||||
headers: {}
|
||||
},
|
||||
uploadInfo: {
|
||||
|
||||
Reference in New Issue
Block a user