mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
perf: 添加Firefox兼容处理
This commit is contained in:
parent
a38cc04cf8
commit
0dcfb797a9
@ -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',
|
||||
|
@ -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')
|
||||
})
|
||||
}
|
@ -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
|
||||
}
|
||||
|
@ -217,6 +217,7 @@ export default defineComponent({
|
||||
.editor-content {
|
||||
width: 100%;
|
||||
height: 360px;
|
||||
overflow: auto;
|
||||
overflow: overlay;
|
||||
position: relative;
|
||||
border-right: 1px solid #ccc;
|
||||
|
@ -122,6 +122,7 @@ export default defineComponent({
|
||||
.content {
|
||||
padding: 12px;
|
||||
font-size: 13px;
|
||||
overflow: auto;
|
||||
overflow: overlay;
|
||||
}
|
||||
</style>
|
@ -79,6 +79,7 @@ export default defineComponent({
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
overflow: auto;
|
||||
overflow: overlay;
|
||||
|
||||
.thumbnail {
|
||||
|
@ -44,6 +44,7 @@
|
||||
height: imgPosition.height,
|
||||
filter: filter,
|
||||
}"
|
||||
@dragstart.prevent
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user