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

更改组件命名

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