efront 3.28.0 → 3.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.md CHANGED
@@ -144,7 +144,7 @@ efront 默认读取当前路径下的`_envs/`和用户目录的`.efront/_envs/`
144
144
  * with 语句中的变量无法准确识别,最好不要使用。如果非要在efront环境下使用,请在with语句外提前声明,with中出现的未声明的变量。
145
145
  * 如果要导出无服务器项目,不要使用异步方法加载本地文件的数据
146
146
  * 从 efront2.5 开始`template`将被识别为 efront 保留字,专门用来指代同名的 html 文件的内容
147
-
147
+ * 从 efront3.29 开始`.xht`文件将被识别为组件文件,如果文件内未提供入口,入口函数将由 efront 自动生成并填充
148
148
  # 相关链接
149
149
 
150
150
  [看图片,用白前](http://efront.cc/baiplay)
@@ -1 +0,0 @@
1
- <img ng-src="user.avatar||'images/avatar.png'" draggable="false"/>
@@ -1,19 +0,0 @@
1
- function main(elem) {
2
- if (!isElement(elem)) {
3
- elem = document.createElement("img");
4
- }
5
- if (!/^img$/i.test(elem.tagName)) {
6
- care(elem, function (src) {
7
- css(elem, { backgroundImage: `url('${src}')` });
8
- })
9
- }
10
- var size = +elem.getAttribute('size');
11
- if (size) {
12
- css(elem, {
13
- width: fromPixel(size),
14
- height: fromPixel(size)
15
- });
16
- }
17
- return elem;
18
- }
19
- main.toString = template.toString;
@@ -1,7 +0,0 @@
1
- & {
2
- border-radius: 50%;
3
- display: inline-block;
4
- background-repeat: no-repeat;
5
- background-size: cover;
6
- background-position: center;
7
- }
@@ -1 +0,0 @@
1
- <i></i><span>返回</span>
@@ -1,9 +0,0 @@
1
- function main(bak) {
2
- var e = bak || document.createElement("back");
3
- e.innerHTML = back;
4
- var btn = button(e);
5
- onclick(btn, function () {
6
- history.back();
7
- });
8
- return btn;
9
- }
@@ -1,26 +0,0 @@
1
- & {
2
- font-size: 14px;
3
- >i {
4
- &:before {
5
- content : "‹";
6
- font-size: 2em;
7
- }
8
- font-style : normal;
9
- margin-top : -12px;
10
- }
11
-
12
- >span {
13
- margin-left: 10px;
14
- margin-top : -10px;
15
- }
16
-
17
- >span,
18
- >i {
19
- position : absolute;
20
- left : 10px;
21
- top : 50%;
22
- height : 20px;
23
- line-height: 20px;
24
- font-style : normal;
25
- }
26
- }
@@ -1,35 +0,0 @@
1
- <caption><strong>cloneVisible</strong>&nbsp;&nbsp;<i>vs.</i>&nbsp;&nbsp;<strong>html2canvas</strong></caption>
2
- <thead>
3
- <tr>
4
- <th>原图</th>
5
- <th>cloneVisible</th>
6
- <th>html2canvas</th>
7
- </tr>
8
- </thead>
9
- <tbody>
10
- <tr>
11
- <td>
12
- <div
13
- style="width:100px;height:100px;position:relative;background-color:#223223;overflow:hidden;border-radius:100px;">
14
- <div
15
- style="border:5px dashed;line-height:40px;text-align:center;text-shadow:1px 3px 0 red;color:#ff3;text-indent:20px">
16
- abc
17
- <span class='cl-c'>cl-c</span>
18
- <input style="width:10px;height:10px;-webkit-appearance:none" />
19
- <span style="writing-mode:vertical-rl;letter-spacing:12px">
20
- 书生<br />意气
21
- </span>
22
- </div>
23
- <style>
24
- .cl-c {
25
- display: block;
26
- float: right;
27
- }
28
- </style>
29
-
30
- </div>
31
- </td>
32
- <td></td>
33
- <td></td>
34
- </tr>
35
- </tbody>
@@ -1,25 +0,0 @@
1
- function main() {
2
- var html = document.createElement("table");
3
- html.innerHTML = cloneVisible_test;
4
- var [td1, td2, td3] = html.children[2].children[0].children;
5
- var ele=td1.children[0]
6
- setTimeout(function () {
7
- var clone = cloneVisible(ele);
8
- appendChild(td2, clone);
9
- ele.with ? ele.with.push(clone) : ele.with = [clone];
10
- var e1 = window.e1 = ele.querySelector("input");
11
- var e2 = window.e2 = clone.querySelector("input");
12
- var s1 = window.s1 = getComputedStyle(e1);
13
- var s2 = window.s2 = getComputedStyle(e2);
14
- for (var k in s1) {
15
- if (s1[k] !== s2[k] && !/cssText/.test(k)) {
16
- console.warn(k, 'src:', s1[k], 'dst:', s2[k]);
17
- }
18
- }
19
-
20
- html2canvas(ele, { backgroundColor: "rgba(0,0,0,0)" }).then(function (e) {
21
- appendChild(td3, e);
22
- });
23
- });
24
- return html;
25
- }
@@ -1,57 +0,0 @@
1
- caption,
2
- td,
3
-
4
- th {
5
- position: relative;
6
- padding: 10px 16px;
7
- background: #fff;
8
- strong{
9
- color: #666;
10
- }
11
-
12
- >div {
13
- span {
14
- &:before {
15
- content: '<a>pseudo</a>';
16
- display: 'inline-block';
17
- padding: 0 16px;
18
- color: blue;
19
- }
20
- }
21
- }
22
-
23
- >clone,
24
- >canvas {
25
- position: absolute !important;
26
- left: 16px !important;
27
- top: 10px !important;
28
- }
29
- }
30
-
31
- & {
32
- border-collapse: collapse;
33
-
34
- td,
35
- th {
36
-
37
- border: 2px solid #ccc;
38
- }
39
-
40
- td {
41
- background: #fff;
42
- @mask-color1 : rgba(255, 255, 255, .6);
43
- @mask-color2 : rgba(0, 0, 0, 0);
44
- @mask-color3 : rgba(0, 0, 0, .1);
45
- background:
46
- linear-gradient(45deg, @mask-color1, 25%, @mask-color1, 25%, @mask-color2, 75%, @mask-color1, 75%, @mask-color1),
47
- linear-gradient(45deg, @mask-color1, 25%, @mask-color1, 25%, @mask-color2, 75%, @mask-color1, 75%, @mask-color1),
48
- linear-gradient(45deg, @mask-color3, 25%, @mask-color3, 25%, @mask-color2, 75%, @mask-color3, 75%, @mask-color3),
49
- linear-gradient(45deg, @mask-color3, 25%, @mask-color3, 25%, @mask-color2, 75%, @mask-color3, 75%, @mask-color3);
50
- background-size: 20px 20px;
51
- background-position: 0 0, 10px 10px, 10px 0, 0 10px;
52
- background-repeat: repeat;
53
- background-clip: border-box;
54
-
55
- }
56
-
57
- }