【发布时间】:2018-02-01 11:19:25
【问题描述】:
我正在处理一个包含许多文件 (100+) 的项目。
我要更新的每个页面上都有两个 FE 属性。例如,
property1: {
type: String,
notify: true,
value: "PropOne"
},
property2: {
type: String,
notify: true,
value: "PropTwo"
},
我可以单独对“PropOne”和“Prop2”进行 grep,但为了更准确,我宁愿匹配整个属性对象。
有没有办法使用 GREP 之类的方法来查找和更新值?
编辑:预期输出为:
property1: {
type: String,
notify: true,
value: "this is new PropOne"
},
property2: {
type: String,
notify: true,
value: "this is new PropTwo"
},
【问题讨论】:
-
预期输出是什么?
-
我想得到 property1: { type: String, notify: true, value: "this is the new PropOne" }, property2: { type: String, notify: true, value: "这是新的 PropTwo" },
-
不在 cmets 中,更新问题。