Commit 4abd3be7 by limin

Merge branch 'master' of http://192.168.3.233:8090/npm/glsx-components into master

2 parents d61b1e84 7af4d760
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<!DOCTYPE> <!DOCTYPE>
<html> <html>
<head>
<meta charset="utf-8"> <head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta charset="utf-8">
<title>组件说明文档</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://unpkg.com/docute@4/dist/docute.css"> <title>组件说明文档</title>
<link rel="stylesheet" href="./glsx-components.css"> <!-- <link rel="stylesheet" href="https://unpkg.com/docute@4/dist/docute.css"> -->
</head> <link rel="stylesheet" href="./docute4.23.3.css">
<body> <link rel="stylesheet" href="./glsx-components.css">
<div id="docute"> </head>
首页
</div> <body>
<script src="https://unpkg.com/docute@4/dist/docute.js"></script> <div id="docute">
<script src="./glsx-components.umd.min.js"></script> 首页
<script> </div>
new Docute({ <!-- <script src="https://unpkg.com/docute@4/dist/docute.js"></script> -->
target: '#docute', <script src="./docute.4.23.3.js"></script>
sidebar: [ <script src="./glsx-components.umd.min.js"></script>
<script>
new Docute({
target: '#docute',
sidebar: [{
title: '组件文档',
links: [
{ {
title: '组件文档', title: 'TestComp',
links: [ link: '/components/TestComp'
},
{ {
title: 'TestComp', title: 'GLTable',
link: '/components/TestComp' link: '/components/GLTable'
}, },
{ {
title: 'GLTable', title: 'Popover(el)-气泡框',
link: '/components/GLTable' link: '/components/Popover'
}
]
} }
] ]
}) }]
</script> })
</body> </script>
</body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -28,7 +28,8 @@ function generateMd(){ ...@@ -28,7 +28,8 @@ function generateMd(){
} }
function copyFile(){ function copyFile(){
return src(['./dist/*.js','./dist/*.css','./documents/index.html']).pipe(dest('./website/')) // return src(['./dist/*.js','./dist/*.css','./documents/index.html']).pipe(dest('./website/'))
return src(['./dist/*.js','./dist/*.css','./documents/**/*.*']).pipe(dest('./website/'))
} }
// require("./build/gulp.css.js") // require("./build/gulp.css.js")
exports.default = series(generateMd,copyFile) exports.default = series(generateMd,copyFile)
......
...@@ -38,18 +38,56 @@ ...@@ -38,18 +38,56 @@
<hr /> <hr />
<h3>el-tooltip调整</h3> <h3>el-tooltip调整</h3>
<gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start"> <!-- <gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> <el-button>上左</el-button> -->
<!-- <template slot='content'> <!-- <template slot='content'>
<p>Here's some contact info</p> <p>Here's some contact info</p>
</template> --> </template> -->
<!-- <template v-slot:content> <!-- <template v-slot:content>
<p>Here's some contact info</p> <p>Here's some contact info</p>
</template> --> </template> -->
<template #content> <!-- <template #content>
<p>Here's some contact info</p> <p>Here's some contact info</p>
</template> </template>
</gl-tooltip> </gl-tooltip> -->
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button>
</el-tooltip> -->
<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>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
<!-- <el-popover
placement="bottom"
title="标题"
width="200"
trigger="manual"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
v-model="visible">
<el-button slot="reference" @click="visible = !visible">手动激活</el-button>
</el-popover> -->
<!-- <el-popover
placement="top"
width="160"
v-model="visible">
<p>这是一段内容这是一段内容确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="visible = false">确定</el-button>
</div>
<el-button slot="reference">删除</el-button>
</el-popover> -->
</div> </div>
</template> </template>
...@@ -136,13 +174,13 @@ export default { ...@@ -136,13 +174,13 @@ export default {
prop: 'liveStatus2', prop: 'liveStatus2',
line: 1, line: 1,
addHtml: 'shareImgUrl', addHtml: 'shareImgUrl',
children:[ children: [
{ {
label: '直播状态3', label: '直播状态3',
prop: 'liveStatus3', prop: 'liveStatus3',
line: 1, line: 1,
addHtml: 'shareImgUrl' addHtml: 'shareImgUrl'
} }
] ]
} }
] ]
...@@ -197,6 +235,63 @@ export default { ...@@ -197,6 +235,63 @@ export default {
name1: '123', name1: '123',
name2: '123' name2: '123'
} }
],
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-04',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// }
] ]
} }
}, },
...@@ -225,5 +320,6 @@ export default { ...@@ -225,5 +320,6 @@ export default {
margin-top: 60px; margin-top: 60px;
// padding-top: 60px; // padding-top: 60px;
padding-bottom: 50px; padding-bottom: 50px;
height: 2000px;
} }
</style> </style>
import GlPopover from './src/index.vue' import Popover from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入 // 为组件提供 install 安装方法,供按需引入
GlPopover.install = function(Vue) { Popover.install = function(Vue) {
Vue.component(GlPopover.name, GlPopover) Vue.component(Popover.name, Popover)
} }
// 默认导出组件 // 默认导出组件
export default GlPopover
\ No newline at end of file \ No newline at end of file
export default Popover
\ No newline at end of file \ No newline at end of file
#### Demo1 注:内嵌滚动效果
<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>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1:true,
demo2:true,
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
]
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```html
<!-- 加上 <div class="bubble-content"> 滚动效果 -->
<template>
<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>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
</template>
<script>
export default {
data() {
return {
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
]
}
}
}
</script>
```
</div>
#### Demo2 注:最大宽度(文字 380px)
<el-popover
placement="top"
width="200"
trigger="click"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<el-button slot="reference">click 激活</el-button>
</el-popover>
<el-button type="warning" @click="toggleShow(2)">显示代码</el-button>
# 用来作为 markdown 代码的示例部分
<div v-if="demo2">
```html
<template>
<el-popover
placement="top"
width="200"
trigger="click"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<el-button slot="reference">click 激活</el-button>
</el-popover>
</template>
```
</div>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="gl-popover"> <el-popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<el-popover class="" v-bind="$attrs" v-on="$listeners"> <div class="bubble-content">
<slot></slot> <el-table :data="gridData">
</el-popover> <el-table-column width="150" property="date" label="日期"></el-table-column>
</div> <el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
</template> </template>
<script> <script>
export default { export default {
name: "GlPopover", name: 'Popover',
props: { props: {
// props的种类参考el-popover
eltype: { demoProps: {
type: String, type: String,
default: "base" default: ''
}
},
data() {
return {
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// }
]
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.gl-popover{ .gl-popover {
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -545,9 +545,5 @@ export default { ...@@ -545,9 +545,5 @@ export default {
border: none; border: none;
} }
// 气泡(基础用法)
.base-popper {
padding: 10px !important;
max-width: 380px !important;
}
</style> </style>
...@@ -43,13 +43,12 @@ import GLExternal from './External' ...@@ -43,13 +43,12 @@ import GLExternal from './External'
import GLButton from './Button' import GLButton from './Button'
import GLDialog from './Dialog' import GLDialog from './Dialog'
import GLTable from './Table' import GLTable from './Table'
import GlTooltip from './GlTooltip'
// 一次性注册所有的过滤器 本地测试 // 一次性注册所有的过滤器 本地测试
import filters from '@/filters' import filters from '@/filters'
// 存储组件列表 // 存储组件列表
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable, GlTooltip] const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable]
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册 // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const install = function(Vue) { const install = function(Vue) {
...@@ -74,6 +73,5 @@ export default { ...@@ -74,6 +73,5 @@ export default {
GLExternal, GLExternal,
GLButton, GLButton,
GLDialog, GLDialog,
GLTable, GLTable
GlTooltip
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!