Skip to content

Commit 7885777

Browse files
committed
处理resize边界问题
1 parent a86d918 commit 7885777

File tree

14 files changed

+201
-60
lines changed

14 files changed

+201
-60
lines changed

examples/App.vue

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@
2626
<br />
2727
<h2 class="title">tips</h2>
2828
<el-button type="primary" id="tips" @click="tipsHandle">上</el-button>
29-
<el-button type="primary" id="tips1" @mouseenter.native="tips1Handle"
30-
>右</el-button
31-
>
29+
<el-button type="primary" id="tips1" @mouseenter.native="tips1Handle">右</el-button>
3230
<el-button type="primary" id="tips2" @click="tips2Handle">下</el-button>
33-
<el-button type="primary" id="tips3" @click="tips3Handle"
34-
>左-自定义样式</el-button
35-
>
31+
<el-button type="primary" id="tips3" @click="tips3Handle">左-自定义样式</el-button>
3632
<h2 class="title">page</h2>
3733
{{ this.info }}
3834
<el-button type="primary" id="tips" @click="pageHandle">自定义</el-button>
@@ -59,18 +55,9 @@
5955
</el-table-column>
6056
<el-table-column label="操作">
6157
<template slot-scope="scope">
62-
<el-button size="mini" @click="submitHandle(scope.$index, scope.row)"
63-
>编辑</el-button
64-
>
65-
<el-button
66-
size="mini"
67-
type="danger"
68-
@click="confirmHandle(scope.$index, scope.row)"
69-
>删除</el-button
70-
>
71-
<el-button type="primary" id="tipst" @click="tipstHandle" size="mini"
72-
>上</el-button
73-
>
58+
<el-button size="mini" @click="submitHandle(scope.$index, scope.row)">编辑</el-button>
59+
<el-button size="mini" type="danger" @click="confirmHandle(scope.$index, scope.row)">删除</el-button>
60+
<el-button type="primary" id="tipst" @click="tipstHandle" size="mini">上</el-button>
7461
</template>
7562
</el-table-column>
7663
</el-table>
@@ -257,7 +244,7 @@ export default {
257244
}
258245
}
259246
},
260-
area: ["901px", "101px"],
247+
area: ["901px", "501px"],
261248
title: "这是一个标题这是一个标题这是一个标题这是一个标题",
262249
maxmin: true,
263250
shade: false,

examples/form.vue

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
</el-form-item>
5454
<el-form-item>
5555
<el-button type="primary" @click="onSubmit">立即创建</el-button>
56+
<el-button type="primary" @click="pageHandle">新弹窗</el-button>
5657
<el-button @click="quxiao">取消</el-button>
5758
</el-form-item>
5859
</el-form>
5960
</template>
6061

6162
<script>
62-
// import formComp from "./form1.vue";
63+
import formComp from "./form1.vue";
6364
export default {
6465
data() {
6566
return {
@@ -104,6 +105,33 @@ export default {
104105
}
105106
},
106107
methods: {
108+
pageHandle() {
109+
const id = this.$layer.iframe({
110+
content: {
111+
content: formComp,
112+
parent: this,
113+
data: {
114+
info: this.info,
115+
fn: () => {
116+
alert(1);
117+
}
118+
}
119+
},
120+
area: ["901px", "201px"],
121+
title: "这是一个标题这是一个标题这是一个标题这是一个标题",
122+
maxmin: true,
123+
shade: false,
124+
shadeClose: false,
125+
scrollbar: false,
126+
resize: true,
127+
btn: ['a', 'b'],
128+
cancel: () => {
129+
alert(2110);
130+
}
131+
});
132+
console.log(id);
133+
// this.$layer.full(id);
134+
},
107135
onSubmit() {
108136
// const id = this.$layer.iframe({
109137
// content: {

examples/form1.vue

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
</el-form-item>
2020
<el-form-item>
2121
<el-button type="primary" @click="onSubmit">立即创建</el-button>
22+
<el-button type="primary" @click="pageHandle">新弹窗</el-button>
2223
<el-button @click="quxiao">取消</el-button>
2324
</el-form-item>
2425
</el-form>
2526
</template>
2627

2728
<script>
29+
import formComp from "./form.vue";
2830
export default {
2931
data() {
3032
return {
@@ -53,7 +55,7 @@ export default {
5355
},
5456
fn: {
5557
type: Function,
56-
default: function() { }
58+
default: function () { }
5759
},
5860
lydata: {
5961
type: Object,
@@ -63,6 +65,33 @@ export default {
6365
}
6466
},
6567
methods: {
68+
pageHandle() {
69+
const id = this.$layer.iframe({
70+
content: {
71+
content: formComp,
72+
parent: this,
73+
data: {
74+
info: this.info,
75+
fn: () => {
76+
alert(1);
77+
}
78+
}
79+
},
80+
area: ["901px", "101px"],
81+
title: "这是一个标题这是一个标题这是一个标题这是一个标题",
82+
maxmin: true,
83+
shade: false,
84+
shadeClose: false,
85+
scrollbar: false,
86+
resize: true,
87+
btn: ['a', 'b'],
88+
cancel: () => {
89+
alert(2110);
90+
}
91+
});
92+
console.log(id);
93+
// this.$layer.full(id);
94+
},
6695
onSubmit() {
6796
// console.log("submit!");
6897
// alert(JSON.stringify(this.form));

lib/vue-layer.common.js

Lines changed: 46 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/vue-layer.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/vue-layer.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)