Commit 2ede6617 by luyt

add:gl-component调整测试链接引入方式

1 parent 860de73e
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start"> <!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> <el-button>上左</el-button>
</el-tooltip> --> </el-tooltip> -->
<Popover popper-class="bubble-box" placement="top" width="600" trigger="click"> <el-popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<div class="bubble-content"> <div class="bubble-content">
<el-table :data="gridData"> <el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column> <el-table-column width="150" property="date" label="日期"></el-table-column>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</el-table> </el-table>
</div> </div>
<el-button slot="reference">click 激活</el-button> <el-button slot="reference">click 激活</el-button>
</Popover> </el-popover>
<GLFooter></GLFooter> <GLFooter></GLFooter>
<!-- <el-popover <!-- <el-popover
placement="bottom" placement="bottom"
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
GLExternal, GLExternal,
GLButton, GLButton,
GLDialog, GLDialog,
GLTable} from '../../dist/glsx-components.umd.min.js' GLTable,
GLFooter
} from '../../dist/glsx-components.umd.min.js'
import '../../dist/glsx-components.css' import '../../dist/glsx-components.css'
const permissions = { const permissions = {
...@@ -23,3 +25,4 @@ ...@@ -23,3 +25,4 @@
Vue.use(GLExternal) Vue.use(GLExternal)
Vue.use(GLDialog) Vue.use(GLDialog)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter)
\ No newline at end of file \ No newline at end of file
...@@ -45,16 +45,16 @@ Object.keys(filters).forEach(key => { ...@@ -45,16 +45,16 @@ Object.keys(filters).forEach(key => {
// Vue.directive(key, directives[key]) // Vue.directive(key, directives[key])
// }) // })
// element ui组件 // // element ui组件
import '@/plugins/element.js' // import '@/plugins/element.js'
import '@/theme/theme.scss' // import '@/theme/theme.scss'
// import '../dist/glsx-components.css' // // import '../dist/glsx-components.css'
//开发完成后,本地测试使用我们第二次封装的组件 // //开发完成后,本地测试使用我们第二次封装的组件
import './index' // import './index'
//开发完成后,打包后本地测试,我们第二次封装的组件 //开发完成后,打包后本地测试,我们第二次封装的组件
// import './localtest/index' import './localtest/index'
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -25,17 +25,14 @@ ...@@ -25,17 +25,14 @@
// install // install
// } // }
/*** /***
* new line * new line
*/ */
// 导入颜色选择器组件 // 导入颜色选择器组件
import '@/plugins/element.js' // import '@/plugins/element.js'
import {Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip} from '@/plugins/element.js'
import '@/theme/theme.scss' import '@/theme/theme.scss'
// test 组件 // test 组件
import TestComp from './TestComp' import TestComp from './TestComp'
...@@ -47,8 +44,12 @@ import GLFooter from './Footer' ...@@ -47,8 +44,12 @@ import GLFooter from './Footer'
// 一次性注册所有的过滤器 本地测试 // 一次性注册所有的过滤器 本地测试
import filters from '@/filters' import filters from '@/filters'
//el原始组件
const ElComponent =[Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip]
// 存储组件列表 // 存储组件列表
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable,GLFooter] const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable, GLFooter].concat(ElComponent)
// console.log('components: ', components);
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册 // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const install = function(Vue) { const install = function(Vue) {
...@@ -69,6 +70,7 @@ if (typeof window !== 'undefined' && window.Vue) { ...@@ -69,6 +70,7 @@ if (typeof window !== 'undefined' && window.Vue) {
export default { export default {
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装 // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
install, install,
...ElComponent,
TestComp, TestComp,
GLExternal, GLExternal,
GLButton, GLButton,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
*/ */
import Vue from 'vue' import Vue from 'vue'
import { Table, TableColumn,Popover,Button, ButtonGroup, Loading, Input, Form, FormItem ,Pagination,Tooltip } from 'element-ui' import { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip } from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css' //todo 按需引入插件样式 // import 'element-ui/lib/theme-chalk/index.css' //todo 按需引入插件样式
import 'element-ui/lib/theme-chalk/table.css' import 'element-ui/lib/theme-chalk/table.css'
import 'element-ui/lib/theme-chalk/table-column.css' import 'element-ui/lib/theme-chalk/table-column.css'
...@@ -32,7 +32,7 @@ import 'element-ui/lib/theme-chalk/tooltip.css' ...@@ -32,7 +32,7 @@ import 'element-ui/lib/theme-chalk/tooltip.css'
// 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题 // 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题
const fixElTableErr = table => { const fixElTableErr = table => {
const oldResizeListener = table.methods.resizeListener const oldResizeListener = table.methods.resizeListener
table.methods.resizeListener = function () { table.methods.resizeListener = function() {
window.requestAnimationFrame(oldResizeListener.bind(this)) window.requestAnimationFrame(oldResizeListener.bind(this))
} }
} }
...@@ -50,3 +50,9 @@ Vue.use(Form) ...@@ -50,3 +50,9 @@ Vue.use(Form)
Vue.use(FormItem) Vue.use(FormItem)
Vue.use(Pagination) Vue.use(Pagination)
Vue.use(Tooltip) Vue.use(Tooltip)
//打包后的组件dist 测试组件可能需要的
export {
Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!