perf: 添加Firefox兼容处理

This commit is contained in:
pipipi-pikachu 2021-03-30 22:40:39 +08:00
parent a38cc04cf8
commit 0dcfb797a9
7 changed files with 11 additions and 6 deletions

View File

@ -25,7 +25,9 @@ module.exports = {
'block-no-empty': true,
'block-opening-brace-newline-after': 'always',
'block-opening-brace-space-before': 'always',
'declaration-block-no-duplicate-properties': true,
'declaration-block-no-duplicate-properties': [true, {
ignoreProperties: ['overflow'],
}],
'declaration-block-semicolon-newline-after': 'always',
'declaration-block-trailing-semicolon': 'always',
'selector-pseudo-element-colon-notation': 'double',

View File

@ -29,12 +29,12 @@ export const copyText = (text: string) => {
// 读取剪贴板
export const readClipboard = (): Promise<string> => {
return new Promise((resolve, reject) => {
if (navigator.clipboard) {
if (navigator.clipboard?.readText) {
navigator.clipboard.readText().then(text => {
if (!text) reject('剪贴板为空或者不包含文本')
return resolve(text)
})
}
else reject('浏览器不支持或禁止访问剪贴板')
else reject('浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V')
})
}

View File

@ -8,7 +8,6 @@
fill="none"
:stroke="gridColor"
stroke-width="0.3"
shape-rendering="crispEdges"
stroke-dasharray="5"
></path>
</SvgWrapper>
@ -52,10 +51,10 @@ export default defineComponent({
let path = ''
for (let i = 0; i <= Math.floor(maxY / gridSize); i++) {
path += `M0 ${i * gridSize}, L${maxX} ${i * gridSize}`
path += `M0 ${i * gridSize} L${maxX} ${i * gridSize} `
}
for (let i = 0; i <= Math.floor(maxX / gridSize); i++) {
path += `M${i * gridSize} 0, L${i * gridSize} ${maxY}`
path += `M${i * gridSize} 0 L${i * gridSize} ${maxY} `
}
return path
}

View File

@ -217,6 +217,7 @@ export default defineComponent({
.editor-content {
width: 100%;
height: 360px;
overflow: auto;
overflow: overlay;
position: relative;
border-right: 1px solid #ccc;

View File

@ -122,6 +122,7 @@ export default defineComponent({
.content {
padding: 12px;
font-size: 13px;
overflow: auto;
overflow: overlay;
}
</style>

View File

@ -79,6 +79,7 @@ export default defineComponent({
display: flex;
flex-wrap: wrap;
align-content: flex-start;
overflow: auto;
overflow: overlay;
.thumbnail {

View File

@ -44,6 +44,7 @@
height: imgPosition.height,
filter: filter,
}"
@dragstart.prevent
alt=""
/>
</div>