little fixes
This commit is contained in:
parent
579694c829
commit
b634c50a52
@ -8,6 +8,7 @@ function createCell(cellContent = '', colIndex = 1, rowIndex = 1) {
|
|||||||
<div
|
<div
|
||||||
class="cell"
|
class="cell"
|
||||||
contenteditable
|
contenteditable
|
||||||
|
spellcheck="false"
|
||||||
data-col="${colIndex}"
|
data-col="${colIndex}"
|
||||||
data-id="${rowIndex}:${colIndex}"
|
data-id="${rowIndex}:${colIndex}"
|
||||||
data-type="cell"
|
data-type="cell"
|
||||||
|
|||||||
@ -88,8 +88,8 @@ export function createToolbar(state: ToolbarStateType): string {
|
|||||||
|
|
||||||
buttons.push(increaseDecreaseFontSize);
|
buttons.push(increaseDecreaseFontSize);
|
||||||
buttons.push(selectGroup);
|
buttons.push(selectGroup);
|
||||||
buttons.push(createAddRowButton());
|
// buttons.push(createAddRowButton());
|
||||||
buttons.push(createRemoveRowButton());
|
// buttons.push(createRemoveRowButton());
|
||||||
|
|
||||||
return buttons.join('');
|
return buttons.join('');
|
||||||
}
|
}
|
||||||
@ -171,18 +171,18 @@ function createButtonFromConfig(btnConfig: ButtonConfigType) {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createAddRowButton() {
|
// function createAddRowButton() {
|
||||||
return `
|
// return `
|
||||||
<div class="button" data-add-row-btn>
|
// <div class="button" data-add-row-btn>
|
||||||
<i class="material-icons" data-add-row-btn>add_circle</i>
|
// <i class="material-icons" data-add-row-btn>add_circle</i>
|
||||||
</div>
|
// </div>
|
||||||
`;
|
// `;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
function createRemoveRowButton() {
|
// function createRemoveRowButton() {
|
||||||
return `
|
// return `
|
||||||
<div class="button" data-remove-row-btn>
|
// <div class="button" data-remove-row-btn>
|
||||||
<i class="material-icons" data-remove-row-btn>remove_circle</i>
|
// <i class="material-icons" data-remove-row-btn>remove_circle</i>
|
||||||
</div>
|
// </div>
|
||||||
`;
|
// `;
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -38,14 +38,14 @@ export const initialState: StateType = {
|
|||||||
currentText: 'initial text',
|
currentText: 'initial text',
|
||||||
id: '0',
|
id: '0',
|
||||||
tableSize: {
|
tableSize: {
|
||||||
col: 10,
|
col: 20,
|
||||||
row: 10,
|
row: 30,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getNormalizeInitialState(params: string): StateType {
|
export function getNormalizeInitialState(params: string): StateType {
|
||||||
const state = storage(storageName(params));
|
const state = storage(storageName(params));
|
||||||
if (!state) return initialState;
|
// if (!state) return initialState;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...initialState,
|
...initialState,
|
||||||
|
|||||||
@ -51,8 +51,9 @@ export abstract class ExcelComponent extends DomListener {
|
|||||||
this.store?.dispatchToStore(action);
|
this.store?.dispatchToStore(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
storeChanged(args: StateType) {
|
storeChanged(args: StateType) {
|
||||||
console.log('CHANGE STORE: ', args, ' in component ', this.name);
|
// console.log('CHANGE STORE: ', args, ' in component ', this.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
isWatching(key: keyof StateType) {
|
isWatching(key: keyof StateType) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user