Commit 17201776 by luyt

1.优化GLCombiForm组件的实现,删除无用代码,组件内注册GLSearchItem、GLSearch

2.新增GlTableButton组件
1 parent d9b8a012
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
GLDialog, GLDialog,
GLTable, GLTable,
GLFooter, GLFooter,
GlSearch, GLSearch,
GlSearchItem GLSearchItem,
GLCombiForm
} from '../../dist/glsx-components.umd.min.js' } from '../../dist/glsx-components.umd.min.js'
import '../../dist/glsx-components.css' import '../../dist/glsx-components.css'
...@@ -28,5 +29,6 @@ ...@@ -28,5 +29,6 @@
Vue.use(GLDialog) Vue.use(GLDialog)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GlSearch)
Vue.use(GlSearchItem)
\ No newline at end of file \ No newline at end of file
Vue.use(GLSearch)
Vue.use(GLSearchItem)
Vue.use(GLCombiForm)
\ No newline at end of file \ No newline at end of file
import GlCombiForm from './src/index.vue' import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入 // 为组件提供 install 安装方法,供按需引入
GlCombiForm.install = function(Vue) { GLCombiForm.install = function(Vue) {
Vue.component(GlCombiForm.name, GlCombiForm) Vue.component(GLCombiForm.name, GLCombiForm)
} }
// 默认导出组件 // 默认导出组件
export default GlCombiForm
\ No newline at end of file \ No newline at end of file
export default GLCombiForm
\ No newline at end of file \ No newline at end of file
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
</template> </template>
<script> <script>
import GLSearch from '../../GlSearch'
import GLSearchItem from '../../GlSearchItem'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common' import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default { export default {
name: 'GLCombiForm', name: 'GLCombiForm',
...@@ -147,6 +149,10 @@ export default { ...@@ -147,6 +149,10 @@ export default {
}, },
mounted() {}, mounted() {},
components: {
GLSearch,
GLSearchItem
},
methods: { methods: {
//gl-search 方法 //gl-search 方法
......
import GLTableButton from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLTableButton.install = function(Vue) {
Vue.component(GLTableButton.name, GLTableButton)
}
// 默认导出组件
export default GLTableButton
\ No newline at end of file \ No newline at end of file
<script>
export default {
name:'GLTableButton',
props:{},
data () {
return {
};
},
created(){},
mounted(){},
methods: {},
components: {},
computed: {},
}
</script>
<style lang='scss'>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -18,16 +18,16 @@ import GLButton from './Button' ...@@ -18,16 +18,16 @@ import GLButton from './Button'
import GLDialog from './Dialog' import GLDialog from './Dialog'
import GLTable from './Table' import GLTable from './Table'
import GLFooter from './Footer' import GLFooter from './Footer'
import GlSearch from './GlSearch' import GLSearch from './GlSearch'
import GlSearchItem from './GlSearchItem' import GLSearchItem from './GlSearchItem'
import GlCombiForm from './GlCombiForm' import GLCombiForm from './GlCombiForm'
//el原始组件 //el原始组件
const ElComponent = [Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker] const ElComponent = [Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker]
// 存储组件列表 // 存储组件列表
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable, GLFooter, GlSearch, GlSearchItem,GlCombiForm].concat(ElComponent) const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable, GLFooter, GLSearch, GLSearchItem,GLCombiForm].concat(ElComponent)
// console.log('components: ', components); // console.log('components: ', components);
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册 // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
GLDialog, GLDialog,
GLTable, GLTable,
GLFooter, GLFooter,
GlSearch, GLSearch,
GlSearchItem, GLSearchItem,
GlCombiForm GLCombiForm
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!