maoruibin / maoruibin/maoruibin.github.com

Vue 为属性传递动态 value

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blog
Dominant language
HTML
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

<el-dialog
  title="提示"
  :visible.sync="showTodoDetailDialog"
  width="30%"
  :before-close="handleClose">
  <span>{{todo.content}}</span>

</el-dialog>

上面使用了 dialog 组件,现在 title 是死的,如果需要他动态改变,想把它的内容指定成 data 中的一个属性,使用 bind 机制如下操作即可,

<el-dialog
  :title="todo.title"
  :visible.sync="showTodoDetailDialog"
  width="30%"
  :before-close="handleClose">
  <span>{{todo.content}}</span>

</el-dialog>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the blog entry corresponding to this issue. Check that the two examples clearly explain the difference between a fixed title and binding the title to todo.title, then confirm the rendered article presents the explanation and examples correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
content, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.