Closed seayao closed 1 year ago
如果img的属性是空字符串就会出现问题(大概率),规律还没发现。
这个问题很严重:
<template>
<div>
<el-button readonly disabled>我是按钮</el-button>
<el-button readonly disabled />
<el-button readonly/>
</div>
</template>
编译出来的效果:
<template>
<div>
<el-button readonlydisabled>{{ $t('我是按钮') }}</el-button>
<el-button readonlydisable />
<el-button readonl />
</div>
</template>
其中第一个el-button的属性readonlydisabled会被合在一起,第二个el-button的readonlydisable单词少了一个d,第三个el-button少了一个单词y
demo: https://github.com/Pasoul/vue2-tsx-app/blob/master/src/views/attrs/index.vue
目前有很多文件已经替换好了,才发现的这个问题,项目已经不能回退了,能不能出个命令给我们校对一下,我们拉一个新的分支,执行你这个命令之后,能够把连续两个为空的属性的文件找到,我们人工再去修复
目前有很多文件已经替换好了,才发现的这个问题,项目已经不能回退了,能不能出个命令给我们校对一下,我们拉一个新的分支,执行你这个命令之后,能够把连续两个为空的属性的文件找到,我们人工再去修复
有的,it --exportExcel 生成excel进行翻译校对,或者--output 输出到指定文件,这种不会覆盖原始文件,可以对比转换前后差异。真的不好意思。
目前有很多文件已经替换好了,才发现的这个问题,项目已经不能回退了,能不能出个命令给我们校对一下,我们拉一个新的分支,执行你这个命令之后,能够把连续两个为空的属性的文件找到,我们人工再去修复
有的,it --exportExcel 生成excel进行翻译校对,或者--output 输出到指定文件,这种不会覆盖原始可以,可以对比转换前后差异。真的不好意思。
我理解的应该不是校对翻译,而是校对源码,因为源码可能已经存在错误了(属性错误,属性丢失等)。
目前有很多文件已经替换好了,才发现的这个问题,项目已经不能回退了,能不能出个命令给我们校对一下,我们拉一个新的分支,执行你这个命令之后,能够把连续两个为空的属性的文件找到,我们人工再去修复
有的,it --exportExcel 生成excel进行翻译校对,或者--output 输出到指定文件,这种不会覆盖原始可以,可以对比转换前后差异。真的不好意思。
我理解的应该不是校对翻译,而是校对源码,因为源码可能已经存在错误了(属性错误,属性丢失等)。
这个不可实现吧。例如在标签
,从语法上说aa属性是正确,而从业务角度说这个aa是否正确,又根据实际场景来,没有规律可循看了下源码大概是这个函数:
onclosetag(tagName, isImplied) {
shouldIgnore = false
// 如果是自闭合标签
if (isImplied) {
htmlString = htmlString.slice(0, htmlString.length - 2) + '/>'
return
}
htmlString += `</${tagName}>`
},
函数里面写了注释说只有自闭合标签才会处理,但是实际情况不是自闭合的标签也会处理错误(可能有别的函数)源码没有都看。 就是如果能走到这个函数里面的,期望可以列出文件名。
@Pasoul @seayao
是我对alt=''这种空值属性没有分隔导致的。你们试着通过正则搜索文件里有关disabled ,readonly这类布尔类型属性,它们会受到这个Bug影响
@IFreeOvO
<Hello title="" v-else></Hello>
组件如果这么写,编译后的title变成了这样:
<Hello title v-else></Hello>
看了下好像是htmlparser2无法区分两者,attributes 都是{'title': '', 'v-else': ''}
。这对我们代码会有影响吗。我担心子组件会拿title这么判断:
if (this.title === '') {}
@IFreeOvO
<Hello title="" v-else></Hello>
组件如果这么写,编译后的title变成了这样:
<Hello title v-else></Hello>
看了下好像是htmlparser2无法区分两者,attributes 都是
{'title': '', 'v-else': ''}
。这对我们代码会有影响吗。我担心子组件会拿title这么判断:if (this.title === '') {}
这个能修。我晚上改下。htmlparser2它文档没更新,我昨天翻issues也才注意到,其实htmlparser2可以识别出来title 和title=''。它文档用法没写全
@Pasoul @seayao 已修复
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。
场景1:
场景2:
场景3:
场景4:(不只是alt属性)
有的情况也能正确替换,可能和alt属性的位置有关系。