fix: excel autoFouce=false

This commit is contained in:
liyulin 2023-03-17 10:15:54 +08:00
parent b3e7fdc295
commit a52e1f970b
4 changed files with 4 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>Vite + Vue</title>
<script type="module" crossorigin src="/vue-office/examples/dist/assets/index-5eec29f6.js"></script>
<script type="module" crossorigin src="/vue-office/examples/dist/assets/index-87a1bd54.js"></script>
<link rel="stylesheet" href="/vue-office/examples/dist/assets/index-e7e9fac4.css">
</head>
<body>

View File

@ -1,11 +1,10 @@
export function readOnlyInput(ref){
let root = ref.value;
if(root){
let nodes = root.querySelectorAll('.hide-input');
let nodes = root.querySelectorAll('input');
console.log(nodes);
for(let node of nodes){
let input = node.childNodes[0];
input && !input.readOnly && (input.readOnly = true);
node && !node.readOnly && (node.readOnly = true);
}
document.activeElement && document.activeElement.blur();
}

View File

@ -67,9 +67,6 @@ export default defineComponent({
onMounted(() => {
observer.observe(rootRef.value, observerConfig);
observerCallback(rootRef);
rootRef.value.addEventListener('focus', ()=>{
debugger
})
window.xs = xs = new Spreadsheet(rootRef.value, {
mode: 'read',