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 @@
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button>
</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">
<el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column>
......@@ -56,7 +56,7 @@
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</Popover>
</el-popover>
<GLFooter></GLFooter>
<!-- <el-popover
placement="bottom"
......
......@@ -9,7 +9,9 @@
GLExternal,
GLButton,
GLDialog,
GLTable} from '../../dist/glsx-components.umd.min.js'
GLTable,
GLFooter
} from '../../dist/glsx-components.umd.min.js'
import '../../dist/glsx-components.css'
const permissions = {
......@@ -22,4 +24,5 @@
Vue.use(GLButton, permissions)
Vue.use(GLExternal)
Vue.use(GLDialog)
Vue.use(GLTable)
\ No newline at end of file
Vue.use(GLTable)
Vue.use(GLFooter)
\ No newline at end of file
......@@ -45,16 +45,16 @@ Object.keys(filters).forEach(key => {
// Vue.directive(key, directives[key])
// })
// element ui组件
import '@/plugins/element.js'
import '@/theme/theme.scss'
// import '../dist/glsx-components.css'
// // element ui组件
// import '@/plugins/element.js'
// import '@/theme/theme.scss'
// // import '../dist/glsx-components.css'
//开发完成后,本地测试使用我们第二次封装的组件
import './index'
// //开发完成后,本地测试使用我们第二次封装的组件
// import './index'
//开发完成后,打包后本地测试,我们第二次封装的组件
// import './localtest/index'
import './localtest/index'
Vue.config.productionTip = false
......
......@@ -25,17 +25,14 @@
// install
// }
/***
* 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'
// test 组件
import TestComp from './TestComp'
......@@ -47,8 +44,12 @@ import GLFooter from './Footer'
// 一次性注册所有的过滤器 本地测试
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 注册插件,则所有的组件都将被注册
const install = function(Vue) {
......@@ -69,6 +70,7 @@ if (typeof window !== 'undefined' && window.Vue) {
export default {
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
install,
...ElComponent,
TestComp,
GLExternal,
GLButton,
......
......@@ -12,10 +12,10 @@
/**
* new line 2021-12-15
*
*
*/
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/table.css'
import 'element-ui/lib/theme-chalk/table-column.css'
......@@ -32,7 +32,7 @@ import 'element-ui/lib/theme-chalk/tooltip.css'
// 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题
const fixElTableErr = table => {
const oldResizeListener = table.methods.resizeListener
table.methods.resizeListener = function () {
table.methods.resizeListener = function() {
window.requestAnimationFrame(oldResizeListener.bind(this))
}
}
......@@ -49,4 +49,10 @@ Vue.use(Input)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Pagination)
Vue.use(Tooltip)
\ No newline at end of file
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!