larry011

larry011

FE

Member Since 7 years ago

广州

Experience Points
17
follower
Lessons Completed
24
follow
Lessons Completed
173
stars
Best Reply Awards
12
repos

22 contributions in the last year

Pinned
⚡ React + Redux + Saga + Koa2 + HMR + SSR
⚡ docker-ffmpeg-nvidia
⚡ sortablejs drag & drop support cross iframe
⚡ security and hacking tools, exploits, proof of concepts, shellcodes, scripts
⚡ Script to execute in memory a sequence of opcodes
⚡ Windows memory hacking library
Activity
May
19
2 days ago
started
started time in 1 day ago
May
8
1 week ago
started
started time in 1 week ago
May
7
2 weeks ago
Apr
30
3 weeks ago
Activity icon
fork

larry011 forked alibaba/designable

⚡ 🧩 Make everything designable 🧩
larry011 MIT License Updated
fork time in 2 weeks ago
Apr
27
3 weeks ago
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

fix(reactive-vue): stop tracking if watcher is destroyed #3074

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

在执行 reactiveRender 前判断一下绑定的 vue 实例是否已经被销毁,避免出现意料之外的依赖收集

larry011
larry011

覆盖率没达标,麻烦完善下测试用例

已补充测试用例

push

larry011 push larry011/formily

larry011
larry011

fix(reactive-vue): add tests

commit sha: ef7f996301143f8b28fa161ac213226ec50819ed

push time in 3 weeks ago
push

larry011 push larry011/formily

larry011
larry011

fix(reactive-vue): stop tracking if watcher is destroyed #3074

commit sha: 8ff92933edac182cdc6b8c46fd3e876289d50c1e

push time in 3 weeks ago
push

larry011 push larry011/formily

larry011
larry011

fix(reactive-vue): stop tracking if watcher is destroyed #3074

commit sha: 195a3933f2dbb7e00414bb5824091a2a2089c59f

push time in 3 weeks ago
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

[Bug Report] tracker 会在 vue 实例被销毁后依然可以被触发

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

切换 title1 的值

What is expected?

控制台不会输出 should disposed

What is actually happening?

控制台输出了 should disposed

Package

@formily/[email protected]


pull request

larry011 pull request alibaba/formily

larry011
larry011

fix(reactive-vue): stop tracking if watch is destroyed #3074

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

push

larry011 push larry011/formily

larry011
larry011

fix(path): fix range all match is not expect (#3067)

larry011
larry011

chore(release): 😊 publish v2.0.20

larry011
larry011

chore: update CHANGELOG.md by github-tag-release

larry011
larry011

fix(antd): fix the problem that when optionAsValue, the value is lost when searched or paged (#3064)

larry011
larry011

fix(vue): fix unexpected dep collection during $mount() #3015 (#3065)

larry011
larry011

feat(react): support components interceptor (#3069)

larry011
larry011

fix(vue): fix render loop cause by functional component in mapProps (#3070)

  • fix(vue): fix render loop cause by functional component in mapProps

  • fix(vue): fix type error

larry011
larry011

fix(core): fix field validateFirst not working (#3071)

larry011
larry011

feat(next/antd): fix SelectTable optionAsValue and add disabled props in ArrayBase icon button (#3072)

  • fix(next/antd): fix SelectTable when optionAsValue, the value is lost when searched or paged

  • feat(next/antd): add disabled props in ArrayBase icon button

larry011
larry011

fix(reactive-vue): stop tracking if watch is destroyed #3074

commit sha: dd6b4fd515fe158a87b80831cd60d98fabcceff5

push time in 3 weeks ago
Activity icon
issue

larry011 issue alibaba/formily

larry011
larry011

[Bug Report] tracker 会在 vue 实例被销毁后依然可以被触发

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

切换 title1 的值

What is expected?

控制台不会输出 should disposed

What is actually happening?

控制台输出了 should disposed

Package

@formily/[email protected]


Apr
25
3 weeks ago
push

larry011 push larry011/formily

larry011
larry011

fix(vue): fix unexpected dep collection during $mount() #3015

commit sha: d3e0be2a5118a0fa8f54eda211ed3156ca8bfc8e

push time in 3 weeks ago
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

fix(vue): fix unexpected dep collection during $mount() #3015

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

larry011
larry011

CLA麻烦签一下

已签

Apr
23
4 weeks ago
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库

业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。

  <div>
    <Field
      title="模板"
      name="template"
      :required="true"
      :dataSource="templates"
      :component="[Select, { placeholder: '请输入' }]"
      :decorator="[FormItem, {}]"
    />
    <div v-if="form.values.template">
      <ObjectField :name="form.values.template">
        <component :is="form.values.template" />
      </ObjectField>
    </div>
  </div>

复现路径

先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。 image

再切换成 tmpl2 的字段,会发现页面没有更新

What is expected?

页面能展示 tmpl2 组件的表单

What is actually happening?

页面没有响应

Package

@formily/[email protected]


如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常

larry011
larry011

顺便提一个问题,我打算针对这个pr写测试用例,但是发现 vue-testing-library 更新 dom 好像有点问题,第二次更新会失效,不知道是不是我使用方法不对。

image

红框里面是我复制上面一样的修改和断言逻辑,只是value不同,但跑测试会失败

Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库

业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。

  <div>
    <Field
      title="模板"
      name="template"
      :required="true"
      :dataSource="templates"
      :component="[Select, { placeholder: '请输入' }]"
      :decorator="[FormItem, {}]"
    />
    <div v-if="form.values.template">
      <ObjectField :name="form.values.template">
        <component :is="form.values.template" />
      </ObjectField>
    </div>
  </div>

复现路径

先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。 image

再切换成 tmpl2 的字段,会发现页面没有更新

What is expected?

页面能展示 tmpl2 组件的表单

What is actually happening?

页面没有响应

Package

@formily/[email protected]


如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常

larry011
larry011

@MisicDemone 我这边发现是在 ReactiveField.ts 中 createField 时,会触发父级 tracker 的依赖收集导致,下面 csb 可以简单复现。我提了一个 pr ,不知道思路对不对,欢迎斧正 #3065

https://codesandbox.io/s/jovial-waterfall-fkpt5p?file=/src/components/HelloWorld.vue

pull request

larry011 pull request alibaba/formily

larry011
larry011

fix(vue): fix unexpected dep collection during $mount() #3015

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

push

larry011 push larry011/formily

larry011
larry011

fix(vue): fix unexpected dep collection during $mount() #3015

commit sha: 44246036eab67f569b4f0987f400ec231fc59e49

push time in 3 weeks ago
Activity icon
fork

larry011 forked alibaba/formily

⚡ Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3
larry011 MIT License Updated
fork time in 3 weeks ago
Apr
13
1 month ago
Apr
8
1 month ago
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库

业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。

  <div>
    <Field
      title="模板"
      name="template"
      :required="true"
      :dataSource="templates"
      :component="[Select, { placeholder: '请输入' }]"
      :decorator="[FormItem, {}]"
    />
    <div v-if="form.values.template">
      <ObjectField :name="form.values.template">
        <component :is="form.values.template" />
      </ObjectField>
    </div>
  </div>

复现路径

先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。 image

再切换成 tmpl2 的字段,会发现页面没有更新

What is expected?

页面能展示 tmpl2 组件的表单

What is actually happening?

页面没有响应

Package

@formily/[email protected]


如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常

larry011
larry011

用法问题,template变化的时候可能formGraph还未清除,建议联动整体采用formEffect来实现,否则需要加scheduler

https://codesandbox.io/s/tender-lucy-vmu9q7?file=/src/App.vue

建议联动整体采用formEffect来实现

请问具体是指下面这种方式吗?

createForm({
  effects(){
    onFieldValuesChange()
 }
})
Activity icon
issue

larry011 issue comment alibaba/formily

larry011
larry011

[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库

业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。

  <div>
    <Field
      title="模板"
      name="template"
      :required="true"
      :dataSource="templates"
      :component="[Select, { placeholder: '请输入' }]"
      :decorator="[FormItem, {}]"
    />
    <div v-if="form.values.template">
      <ObjectField :name="form.values.template">
        <component :is="form.values.template" />
      </ObjectField>
    </div>
  </div>

复现路径

先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。 image

再切换成 tmpl2 的字段,会发现页面没有更新

What is expected?

页面能展示 tmpl2 组件的表单

What is actually happening?

页面没有响应

Package

@formily/[email protected]


如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常

larry011
larry011

建议联动整体采用formEffect来实现

请问具体是指下面这种方式吗?

createForm({
  effects(){
    onFieldValuesChange()
 }
})
Apr
5
1 month ago
Activity icon
issue

larry011 issue alibaba/formily

larry011
larry011

[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库

业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。

  <div>
    <Field
      title="模板"
      name="template"
      :required="true"
      :dataSource="templates"
      :component="[Select, { placeholder: '请输入' }]"
      :decorator="[FormItem, {}]"
    />
    <div v-if="form.values.template">
      <ObjectField :name="form.values.template">
        <component :is="form.values.template" />
      </ObjectField>
    </div>
  </div>

复现路径

先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。 image

再切换成 tmpl2 的字段,会发现页面没有更新

What is expected?

页面能展示 tmpl2 组件的表单

What is actually happening?

页面没有响应

Package

@formily/[email protected]


如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常

Activity icon
created branch
createdAt 1 month ago
Mar
15
2 months ago
started
started time in 2 months ago
Mar
7
2 months ago
started
started time in 2 months ago
Feb
25
2 months ago
started
started time in 2 months ago