Skip to content

Commit

Permalink
fix: recalculate bug
Browse files Browse the repository at this point in the history
  • Loading branch information
icheer committed Apr 25, 2021
1 parent f047d13 commit 0914562
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/index.mjs

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 如旧浏览器不支持shadowDOM, 使用以下polyfill -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2/"></script>
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.5.0/webcomponents-bundle.min.js"></script>
<script type="module" src="./lib/index.js"></script>
<link
rel="stylesheet"
Expand Down Expand Up @@ -79,6 +79,7 @@
padding: 0;
margin: 0;
background-color: #fefbec;
overflow: hidden;
}
h1 {
font-size: 30px;
Expand All @@ -97,40 +98,44 @@
.card {
position: relative;
border: 1px solid #aaa;
margin: 0 0 0 40px;
margin: 0 0 0 30px;
width: 1255px;
height: 345px;
overflow: auto;
}
.wrap {
position: relative;
height: calc(100vh - 455px);
display: flex;
height: calc(100vh - 435px);
margin-top: 10px;
}
.wrap > * {
width: 50%;
height: 100%;
float: left;
white-space: nowrap;
position: relative;
}
pre {
.wrap pre {
width: 48%;
height: 100%;
box-sizing: border-box;
margin: 0;
padding: 0 10px 0 40px;
margin: 0 20px 0 30px;
padding: 0;
overflow: auto;
border: 1px solid #ddd;
}
code {
height: 100%;
/* height: 100%; */
box-sizing: border-box;
white-space: pre;
margin: 0;
padding: 0;
border: 1px solid #ddd;

}
.usage {
box-sizing: border-box;
border: 1px solid #ddd;
margin-right: 30px;
padding: 10px;
}
h2 {
Expand All @@ -140,7 +145,7 @@
</head>
<body>
<h1>
<span>web-spreadsheet document</span>
<span>web-spreadsheet documentation</span>
<a href="https://github.com/icheer/web-spreadsheet" target="_blank">Github</a>
</h1>
<div class="card">
Expand Down Expand Up @@ -327,7 +332,6 @@ <h2>TODO: ...</h2>
<script>
(function () {
var code = document.querySelector('script.real-code').outerHTML.replace(' class="real-code"', '');
console.log(code);
document.querySelector('pre code').innerText = code;
hljs.highlightAll();
})();
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/components/sheet-cell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ svelte:options(immutable tag="sheet-cell")
row[key] = value;
const shouldRefreshRow = !!row._errorMsg[key] !== !!message;
row._errorMsg[key] = message;
if (shouldRefreshRow) {
row._id = genRandId();
}
row._id = genRandId();
row = { ...row };
setTimeout(() => {
isRewriting = false;
Expand Down

1 comment on commit 0914562

@vercel
Copy link

@vercel vercel bot commented on 0914562 Apr 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.