Skip to content

Commit 33efe34

Browse files
committed
Merge branch 'master' into feature/platform-opt
2 parents cde9515 + 5b3b9d2 commit 33efe34

File tree

12 files changed

+456
-21
lines changed

12 files changed

+456
-21
lines changed

.github/issue_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ issueConfigs:
2727
- "在这里引用相关项目或文档地址"
2828

2929
comments:
30-
closeIssue: "issue不符合格式要求,请确保格式正确且填写所有有效信息。请确保issue中存在模板中各级小标题(如“期望的表现:”或“新功能的实现:”),且小标题下内容不是模板默认内容(如“[在这里描述期望的表现]”或“[在这里填写或简单描述功能的实现方式或需求的解决方式]”)"
30+
closeIssue: "issue不符合格式要求,请确保格式正确且填写所有有效信息。\n请保留issue模板中的各级小标题(如“期望的表现:”),并使用有效信息替换模板默认内容(如“[在这里描述期望的表现]”)"

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,27 @@
112112
<img src="https://camo.githubusercontent.com/6f1b397785cd88ec260509e2768f10604b5711b9/687474703a2f2f7777772e77636c696d622e736974652f63646e2f7863782e6a7065673f763d31" width="100" title="妹子趣图"/>
113113
<img src="https://user-images.githubusercontent.com/12904977/44563258-02dd8000-a790-11e8-961d-fb50c4f27ba1.png" width="100" title="记工无忧"/>
114114
<img src="https://user-images.githubusercontent.com/22048131/44619692-5994a800-a8bd-11e8-98f0-b2337ef49b35.png" width="100" title="北美省钱快报App"/>
115-
115+
<img src="https://user-images.githubusercontent.com/3882370/45558053-8bbc7880-b871-11e8-9b03-901f27f4e7d3.png" width="100" title="抽奖工具" />
116+
<img src="https://user-images.githubusercontent.com/16730031/45584645-e99c9f00-b909-11e8-853b-1f19b9cd76fd.jpg" width="100" title="盯事清单" />
117+
<img src="https://user-images.githubusercontent.com/18476675/45791542-adc45980-bcbc-11e8-803f-9c45c55c784b.png" width="100" title="微目标小程序" />
118+
<img src="https://user-images.githubusercontent.com/23513387/46054832-93d2bd00-c17b-11e8-9197-d5aa0c764ddb.jpg" width="100" title="微厅小程序" />
119+
<img src="https://i.loli.net/2018/10/11/5bbef01a68773.jpg" width="100" title="逗猫神器" />
120+
<img src="https://user-images.githubusercontent.com/16631463/46907861-eb2ea680-cf4b-11e8-92a2-0a8917417325.jpg" width="100" title="前端最火框架排行榜" />
121+
<img src="https://user-images.githubusercontent.com/16631463/46907868-187b5480-cf4c-11e8-8302-dcc722430b6d.jpg" width="100" title="猜谜语" />
122+
<img src="https://user-images.githubusercontent.com/38179236/47001679-9ebab500-d15d-11e8-99df-27b61e53c652.jpg" width="100" title="旅游大巴" />
123+
<img src="https://user-images.githubusercontent.com/20639676/47198055-a9af5880-d39c-11e8-8b1c-fcd4ba0ea57b.png" width="100" title="云鲜社区生鲜购" />
124+
<img src="https://user-images.githubusercontent.com/8544120/47279097-4114e580-d601-11e8-8a95-2d7dcc165d6b.jpg" width="100" title="闲停扯乎" />
125+
<img src="https://user-images.githubusercontent.com/22420/47401062-5bba9c00-d772-11e8-9717-d7c468d9b939.jpg" width="100" title="狗脸识别" />
126+
<img src="https://user-images.githubusercontent.com/31442077/47412617-c97cbd00-d79e-11e8-9002-7a0614d6ad1b.jpg" width="100" title="思政云" />
127+
<img src="https://user-images.githubusercontent.com/17083284/47612128-0b23a580-dac8-11e8-9582-70db2889e698.jpg" width="100" title="澳洲U站" />
128+
<img src="https://user-images.githubusercontent.com/16513510/47947846-8faa7400-df5f-11e8-8ee8-63c1a9fb6eac.jpg" width="100" title="莴聚" />
129+
<img src="https://user-images.githubusercontent.com/22372095/48299143-b6d6e780-e503-11e8-963a-4789e54f57d7.jpg" width="100" title="百世集团供应链TNET" />
130+
<img src="https://user-images.githubusercontent.com/15187909/48299710-c5290180-e50b-11e8-8cb5-339be1531608.jpg" width="100" />
131+
<img src="https://user-images.githubusercontent.com/1715463/49988179-d0f76000-ffb0-11e8-8a69-cd57d6e54890.jpeg" width="100" title="漂流小情书"/>
132+
<img src="https://user-images.githubusercontent.com/1715568/48662132-6b4eab80-eab8-11e8-95de-c1e21786b2d9.jpg" width="100" title="绿芽找房"/>
133+
<img src="http://jiankang.juwu168.com/blog/wp-content/uploads/2018/10/gh_36a0a852bf6f_258-1.jpg" width="100" title="慕课网" />
134+
<img src="https://user-images.githubusercontent.com/14272879/49424002-38085e00-f7d4-11e8-8242-13ddda18cec3.jpg" width="100" title="一人宴" />
135+
<img src="https://upload-images.jianshu.io/upload_images/3356839-59bfd93deb76afca.jpg" width="100" title="惠动平台">
116136
<!-- 非标准小程序码 -->
117137
<img src="https://user-images.githubusercontent.com/1176855/41755510-62b9fc90-760a-11e8-89be-b6ddbee08e63.jpg" width="100" title="暖茶阿妈的占卜小屋"/>
118138
<img src="https://user-images.githubusercontent.com/22720942/40184432-da33291c-5a22-11e8-966c-c836d1dc8078.png" width="100" />

packages/mpvue-template-compiler/build.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,10 +2810,13 @@ var observerState = {
28102810
* object's property keys into getter/setters that
28112811
* collect dependencies and dispatches updates.
28122812
*/
2813-
var Observer = function Observer (value) {
2813+
var Observer = function Observer (value, key) {
28142814
this.value = value;
28152815
this.dep = new Dep();
28162816
this.vmCount = 0;
2817+
if (key) {
2818+
this.key = key;
2819+
}
28172820
def(value, '__ob__', this);
28182821
if (Array.isArray(value)) {
28192822
var augment = hasProto
@@ -2876,7 +2879,7 @@ function copyAugment (target, src, keys) {
28762879
* returns the new observer if successfully observed,
28772880
* or the existing observer if the value already has one.
28782881
*/
2879-
function observe (value, asRootData) {
2882+
function observe (value, asRootData, key) {
28802883
if (!isObject(value)) {
28812884
return
28822885
}
@@ -2890,7 +2893,9 @@ function observe (value, asRootData) {
28902893
Object.isExtensible(value) &&
28912894
!value._isVue
28922895
) {
2893-
ob = new Observer(value);
2896+
ob = new Observer(value, key);
2897+
ob.__keyPath = ob.__keyPath ? ob.__keyPath : {};
2898+
ob.__keyPath[key] = true;
28942899
}
28952900
if (asRootData && ob) {
28962901
ob.vmCount++;
@@ -2915,11 +2920,13 @@ function defineReactive$$1 (
29152920
return
29162921
}
29172922

2923+
// TODO: 先试验标记一下 keyPath
2924+
29182925
// cater for pre-defined getter/setters
29192926
var getter = property && property.get;
29202927
var setter = property && property.set;
29212928

2922-
var childOb = !shallow && observe(val);
2929+
var childOb = !shallow && observe(val, undefined, key);
29232930
Object.defineProperty(obj, key, {
29242931
enumerable: true,
29252932
configurable: true,
@@ -2942,6 +2949,7 @@ function defineReactive$$1 (
29422949
if (newVal === value || (newVal !== newVal && value !== value)) {
29432950
return
29442951
}
2952+
29452953
/* eslint-enable no-self-compare */
29462954
if (process.env.NODE_ENV !== 'production' && customSetter) {
29472955
customSetter();
@@ -2951,8 +2959,10 @@ function defineReactive$$1 (
29512959
} else {
29522960
val = newVal;
29532961
}
2954-
childOb = !shallow && observe(newVal);
2962+
childOb = !shallow && observe(newVal, undefined, key);
29552963
dep.notify();
2964+
obj.__keyPath = obj.__keyPath ? obj.__keyPath : {};
2965+
obj.__keyPath[key] = true;
29562966
}
29572967
});
29582968
}
@@ -2985,6 +2995,9 @@ function set (target, key, val) {
29852995
return val
29862996
}
29872997
defineReactive$$1(ob.value, key, val);
2998+
// Vue.set 添加对象属性,渲染时候把val传给小程序渲染
2999+
target.__keyPath = target.__keyPath ? target.__keyPath : {};
3000+
target.__keyPath[key] = true;
29883001
ob.dep.notify();
29893002
return val
29903003
}

0 commit comments

Comments
 (0)