Commit 3e945783 authored by 何虹's avatar 何虹 💬

更改组件命名

parent acadc917
<template> <template>
<div> <div>
<hsTable <hs-table
maxHeight='500px' maxHeight='500px'
:elInfo="elInfo" :elInfo="elInfo"
:allSourceData='allSourceData' :allSourceData='allSourceData'
></hsTable> ></hs-table>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsAction', name: 'hs-action',
props: { props: {
elInfo: { elInfo: {
type: Object, type: Object,
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
import jsoneditor from '../common/jsoneditor' import jsoneditor from '../common/jsoneditor'
import ucComponent from '../ucClass/uc_component' import ucComponent from '../ucClass/uc_component'
export default { export default {
name: 'hsButtonGroup', name: 'hs-button-group',
mixins: [ucComponent], mixins: [ucComponent],
components: { components: {
jsoneditor jsoneditor
......
...@@ -23,7 +23,7 @@ import uuidv1 from 'uuid/v1' ...@@ -23,7 +23,7 @@ import uuidv1 from 'uuid/v1'
import ucComponent from '../ucClass/uc_component' import ucComponent from '../ucClass/uc_component'
export default { export default {
mixins: [ucComponent], mixins: [ucComponent],
name: 'hsCarousel', name: 'hs-carousel',
components: { components: {
jsoneditor jsoneditor
}, },
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsCascader', name: 'hs-cascader',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsCheckboxGroup", name: "hs-checkbox-group",
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsCheckbox', name: 'hs-checkbox',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsComputed", name: "hs-computed",
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsDatePicker", name: "hs-date-picker",
props: { props: {
elInfo: { elInfo: {
type: Object, type: Object,
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsDialog', name: 'hs-dialog',
props: { props: {
visible: {}, visible: {},
allSourceData: { allSourceData: {
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsDivider', name: 'hs-divider',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</el-checkbox> </el-checkbox>
</template> </template>
<template v-if="item.type==='hsSelectPlus'"> <template v-if="item.type==='hsSelectPlus'">
<hsSelectPlus <hs-select-plus
:writeBackObject='formParms' :writeBackObject='formParms'
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
...@@ -95,10 +95,10 @@ ...@@ -95,10 +95,10 @@
:containerType='type' :containerType='type'
:requestMethod='item.requestMethod' :requestMethod='item.requestMethod'
> >
</hsSelectPlus> </hs-select-plus>
</template> </template>
<template v-if="item.type==='hsFile'"> <template v-if="item.type==='hsFile'">
<hsFile <hs-file
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
:elInfo='item.elInfo' :elInfo='item.elInfo'
...@@ -107,10 +107,10 @@ ...@@ -107,10 +107,10 @@
:uploadFileFun='item.uploadFileFun' :uploadFileFun='item.uploadFileFun'
:containerType='type' :containerType='type'
> >
</hsFile> </hs-file>
</template> </template>
<template v-if="item.type==='hsComputed'"> <template v-if="item.type==='hsComputed'">
<hsComputed <hs-computed
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
:elInfo='item.elInfo' :elInfo='item.elInfo'
...@@ -119,10 +119,10 @@ ...@@ -119,10 +119,10 @@
:prop='item.prop' :prop='item.prop'
:containerType='type' :containerType='type'
> >
</hsComputed> </hs-computed>
</template> </template>
<template v-if="item.type==='hsInput'"> <template v-if="item.type==='hsInput'">
<hsInput <hs-input
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
:elInfo='item.elInfo' :elInfo='item.elInfo'
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
:prop='item.prop' :prop='item.prop'
:containerType='type' :containerType='type'
> >
</hsInput> </hs-input>
</template> </template>
</div> </div>
......
...@@ -39,7 +39,7 @@ import _ from 'lodash' ...@@ -39,7 +39,7 @@ import _ from 'lodash'
import dyncFormItemComponentTable from './dyncFormItemComponentTable' import dyncFormItemComponentTable from './dyncFormItemComponentTable'
import dyncFormItemComponentQuery from './dyncFormItemComponentQuery' import dyncFormItemComponentQuery from './dyncFormItemComponentQuery'
export default { export default {
name: 'hsDyncForm', name: 'hs-dyncForm',
mixins: [ucComponent], mixins: [ucComponent],
components: { components: {
jsoneditor, jsoneditor,
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsFile', name: 'hs-file',
props: { props: {
uploadFileFun: { uploadFileFun: {
type: Function type: Function
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsGantt', name: 'hs-gantt',
props: { props: {
elInfo: { elInfo: {
type: Object, type: Object,
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsInput", name: "hs-input",
props: { props: {
prop: {}, prop: {},
formData: { formData: {
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsLineBar', name: 'hs-line-bar',
props: { props: {
elInfo: { elInfo: {
type: Object, type: Object,
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsRadio', name: 'hs-radio',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -88,7 +88,7 @@ import commonUtility from '../funTools/commonUtility' ...@@ -88,7 +88,7 @@ import commonUtility from '../funTools/commonUtility'
import dialogIframe from '../common/dialogTemplate/dialogIframe' import dialogIframe from '../common/dialogTemplate/dialogIframe'
export default { export default {
mixins: [ucComponent], mixins: [ucComponent],
name: 'hsSelectPlus', name: 'hs-select-plus',
components: { components: {
jsoneditor, jsoneditor,
dialogIframe dialogIframe
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsSwitch", name: "hs-switch",
props: { props: {
disabled: { disabled: {
type: Boolean, type: Boolean,
......
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
</el-date-picker> </el-date-picker>
</template> </template>
<template v-if="item.showType==='elSwitch'"> <template v-if="item.showType==='elSwitch'">
<hsSwitch <hs-switch
style="width:100%" style="width:100%"
size='mini' size='mini'
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:disabled='disabled' :disabled='disabled'
> >
</hsSwitch> </hs-switch>
</template> </template>
<template v-if="item.showType==='elCheckbox'"> <template v-if="item.showType==='elCheckbox'">
<el-checkbox <el-checkbox
...@@ -78,17 +78,17 @@ ...@@ -78,17 +78,17 @@
</el-checkbox> </el-checkbox>
</template> </template>
<template v-if="item.showType==='hsComputed'"> <template v-if="item.showType==='hsComputed'">
<hsComputed <hs-computed
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
:elInfo='item.elInfo' :elInfo='item.elInfo'
:readonly='disabled' :readonly='disabled'
:formData='formParms' :formData='formParms'
> >
</hsComputed> </hs-computed>
</template> </template>
<template v-if="item.showType==='hsSelectPlus'"> <template v-if="item.showType==='hsSelectPlus'">
<hsSelectPlus <hs-select-plus
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
:allSourceData='item.allSourceData' :allSourceData='item.allSourceData'
:elInfo='item.elInfo' :elInfo='item.elInfo'
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
:readonly='disabled' :readonly='disabled'
:requestMethod='item.requestMethod' :requestMethod='item.requestMethod'
> >
</hsSelectPlus> </hs-select-plus>
</template> </template>
</div> </div>
......
...@@ -337,7 +337,7 @@ export default { ...@@ -337,7 +337,7 @@ export default {
dialogUpload, dialogUpload,
dialogIframe dialogIframe
}, },
name: 'hsTable', name: 'hs-table',
props: { props: {
importInfo: { importInfo: {
// 导入信息 // 导入信息
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsTabsQueryBiLinkTables', name: 'hs-tabs-query-bi-lin-tables',
props: { props: {
pageSource: {}, pageSource: {},
allSourceData: { allSourceData: {
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsTabs', name: 'hs-tabs',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: "hsTags", name: "hs-tags",
props: { props: {
value: "", value: "",
elInfo: { elInfo: {
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
components: { components: {
jsoneditor jsoneditor
}, },
name: 'hsTree', name: 'hs-tree',
props: { props: {
allSourceData: { allSourceData: {
type: Object, type: Object,
......
import Vue from 'vue' import Vue from 'vue'
import hsInput from './hs-input/index.vue' const requireComponent_ = require.context('./', true, /index.vue$/)
const components={ const obj={}
'hs-input':hsInput requireComponent_.keys().forEach(fileName => {
} const componentConfig = requireComponent_(fileName)
Object.keys(components).forEach(name=>{ const { name } = componentConfig.default
Vue.component(name, components[name]) if (name) {
Vue.component(name, componentConfig.default || componentConfig)
obj[name]=componentConfig
}
}) })
export default components export default obj
// const requireComponent_ = require.context('./', true, /index.vue$/) \ No newline at end of file
// const obj={}
// requireComponent_.keys().forEach(fileName => {
// const componentConfig = requireComponent_(fileName)
// const { name } = componentConfig.default
// if (name) {
// Vue.component(name, componentConfig.default || componentConfig)
// obj[name]=componentConfig
// }
// })
// export default obj
\ 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