@joker.front/core 1.2.136
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 +91 -0
- package/dist/bundle.es.js +3589 -0
- package/dist/bundle.js +3643 -0
- package/package.json +50 -0
- package/types/component.d.ts +216 -0
- package/types/components/component.d.ts +13 -0
- package/types/components/container.d.ts +15 -0
- package/types/components/template.d.ts +7 -0
- package/types/docs/build/docs.d.ts +1 -0
- package/types/docs/build/markdown-it-demo.d.ts +3 -0
- package/types/docs/build/utils.d.ts +3 -0
- package/types/docs/common/loading.d.ts +2 -0
- package/types/docs/main.d.ts +1 -0
- package/types/event-bus.d.ts +15 -0
- package/types/eventBus.d.ts +15 -0
- package/types/filter.d.ts +13 -0
- package/types/global.d.ts +13 -0
- package/types/hmr.d.ts +15 -0
- package/types/index.d.ts +10 -0
- package/types/observer/dep.d.ts +46 -0
- package/types/observer/index.d.ts +46 -0
- package/types/observer/watcher.d.ts +46 -0
- package/types/parser/command/code.d.ts +6 -0
- package/types/parser/command/condition.d.ts +22 -0
- package/types/parser/command/for.d.ts +23 -0
- package/types/parser/command/section.d.ts +8 -0
- package/types/parser/comment.d.ts +6 -0
- package/types/parser/component.d.ts +23 -0
- package/types/parser/element.d.ts +9 -0
- package/types/parser/index.d.ts +77 -0
- package/types/parser/parser.d.ts +82 -0
- package/types/parser/render.d.ts +86 -0
- package/types/parser/text.d.ts +6 -0
- package/types/parser/vnode.d.ts +180 -0
- package/types/props.d.ts +9 -0
- package/types/src/component.d.ts +216 -0
- package/types/src/event-bus.d.ts +15 -0
- package/types/src/filter.d.ts +13 -0
- package/types/src/hmr.d.ts +15 -0
- package/types/src/index.d.ts +10 -0
- package/types/src/observer/dep.d.ts +46 -0
- package/types/src/observer/index.d.ts +46 -0
- package/types/src/observer/watcher.d.ts +46 -0
- package/types/src/parser/command/code.d.ts +6 -0
- package/types/src/parser/command/condition.d.ts +22 -0
- package/types/src/parser/command/for.d.ts +23 -0
- package/types/src/parser/command/section.d.ts +8 -0
- package/types/src/parser/comment.d.ts +6 -0
- package/types/src/parser/component.d.ts +23 -0
- package/types/src/parser/element.d.ts +9 -0
- package/types/src/parser/index.d.ts +77 -0
- package/types/src/parser/parser.d.ts +82 -0
- package/types/src/parser/render.d.ts +86 -0
- package/types/src/parser/text.d.ts +6 -0
- package/types/src/parser/vnode.d.ts +182 -0
- package/types/src/props.d.ts +9 -0
- package/types/src/utils/DI.d.ts +15 -0
- package/types/utils/DI.d.ts +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Joker(front)
|
|
2
|
+
|
|
3
|
+
## 前端 核心平台
|
|
4
|
+
|
|
5
|
+
Joker.front 是 Jokers.pub 旗下前端项目,负责前端渲染
|
|
6
|
+
|
|
7
|
+
Joker.front 旨在提供一套渐进式前端框架,提供多端运行能力,目前已完成 Joker.H5 前端项目框架,后续将提供 Joker.native/Joker.wx 等
|
|
8
|
+
|
|
9
|
+
## 特色
|
|
10
|
+
|
|
11
|
+
1. 双向数据监听
|
|
12
|
+
|
|
13
|
+
2. 单向数据流
|
|
14
|
+
|
|
15
|
+
3. vnode 虚拟 dom 节点,可扩展多端输出
|
|
16
|
+
|
|
17
|
+
4. 更快的运行速度,数据变更实时响应,无延迟、无 dom 树对比,使用更方便
|
|
18
|
+
|
|
19
|
+
5. 新的语法,不限制根节点数目
|
|
20
|
+
|
|
21
|
+
6. Class API 开发模式
|
|
22
|
+
|
|
23
|
+
7. 提供组件化、混入等基础功能
|
|
24
|
+
|
|
25
|
+
8. 提供数据劫持/监听;Node 监听;状态管理器等功能
|
|
26
|
+
|
|
27
|
+
## 特别说明
|
|
28
|
+
|
|
29
|
+
**本框架为底层核心库,需要配合 joker-cli 和 Joker Front Tool 一起使用**
|
|
30
|
+
|
|
31
|
+
## 实例
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
<div @click="点击事件" attr1="@(sss+1)" @tap.stop.prevent.once.self="tab事件(其他参数)">
|
|
35
|
+
@变量
|
|
36
|
+
@方法(参数)
|
|
37
|
+
@if (true)
|
|
38
|
+
{
|
|
39
|
+
<p>我是一句话</p>
|
|
40
|
+
<p>
|
|
41
|
+
@变量
|
|
42
|
+
@方法(1)
|
|
43
|
+
@(1+1)
|
|
44
|
+
|
|
45
|
+
</p>
|
|
46
|
+
}
|
|
47
|
+
else if{
|
|
48
|
+
<p>我是else if</p>
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
{
|
|
52
|
+
<p>我是else</p>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@for (let i = 0; i < 数组.length; i++)
|
|
57
|
+
{
|
|
58
|
+
<p>@数组[i]</p>
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@for(let index in 数组)
|
|
63
|
+
{
|
|
64
|
+
<p>suoyin :@index value: @数组[index]</p>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@for (let item of 对象)
|
|
69
|
+
{
|
|
70
|
+
<p>@item.a</p>
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@for (let(index, item) in 数组)
|
|
74
|
+
{
|
|
75
|
+
<p>索引:@index 项:@item</p>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
<ChildrenComponent @click="组件回执方法" prop1="@变量">
|
|
80
|
+
@section("id",内容参数1,内容参数2){
|
|
81
|
+
<p>内容参数1</p>
|
|
82
|
+
<p>@父组件变量</p>
|
|
83
|
+
}
|
|
84
|
+
</ChildrenComponent>
|
|
85
|
+
|
|
86
|
+
<!--内容部分-->
|
|
87
|
+
|
|
88
|
+
@RenderSection()
|
|
89
|
+
|
|
90
|
+
@RenderSection("id",@对外传参)
|
|
91
|
+
```
|