Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

修改take()方法的获取方式 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
frostime merged 5 commits into siyuan-note:main from tengfei-xy:main
Apr 25, 2024
Merged

Conversation

@tengfei-xy
Copy link
Contributor

@tengfei-xy tengfei-xy commented Apr 24, 2024
edited
Loading

原来的方法会在第一次回调时恢复被修改前的数值,之后再修改时正常。
新的方法纯粹把getElement()当做获取元素的功能。

load()被调用后,应该同步到设置页面的html里,但好像并没有,不确定什么地方有问题,但在load()加了一行代码就好了

@tengfei-xy tengfei-xy changed the title (削除) 修改getElement()方法和方法说明 (削除ここまで) (追記) 修改getElement()方法和方法说明、以及页面加载后没有显示到设置页面中的问题 (追記ここまで) Apr 24, 2024
Copy link
Collaborator

@frostime frostime left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外为什么要把 getElements 的赋值顺序颠倒?
设置项应该是以 item 为准,除非是用户输入否则任何时候都应该是 element 从 item 里面取值啊

break;
case 'slider':
element.value = item.value;
element.ariaLabel = item.value;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把 ariaLabel 删掉会影响 slider 的悬浮显示

Copy link
Contributor Author

@tengfei-xy tengfei-xy Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抱歉,原来的提交代码并不太合理,本质只需要修改take()的代码即可,出现的问题是,这个take在页面刷新后,第一次修改textinput的时候,会有异常,无法正常实时读取,第二次修改后,正常。但页面刷新后会重新出现。

@tengfei-xy tengfei-xy changed the title (削除) 修改getElement()方法和方法说明、以及页面加载后没有显示到设置页面中的问题 (削除ここまで) (追記) 修改take()方法的获取方式 (追記ここまで) Apr 25, 2024
@frostime frostime merged commit 2c45caf into siyuan-note:main Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@frostime frostime frostime left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /