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