Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(bug): bug
Browse files Browse the repository at this point in the history
bug
  • Loading branch information
wpxp123456 committed Aug 17, 2020
1 parent 249aa02 commit 7263008
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 41 deletions.
16 changes: 9 additions & 7 deletions src/controllers/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ function orderbydatafiler(str, stc, edr, edc, index, asc) {
}

if(hasMc){
const locale_filter = locale().filter;

if(isEditMode()){
alert("筛选选区有合并单元格,无法执行此操作!");
alert(locale_filter.mergeError);
}
else{
tooltip.info("筛选选区有合并单元格,无法执行此操作!", "");
tooltip.info(locale_filter.mergeError, "");
}

return;
Expand Down Expand Up @@ -134,13 +136,15 @@ function createFilter() {
if(Store.luckysheet_select_save.length > 1){
$("#luckysheet-rightclick-menu").hide();
$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();
$("#" + container).attr("tabindex", 0).focus();
$("#" + Store.container).attr("tabindex", 0).focus();

const locale_splitText = locale().splitText;

if(isEditMode()){
alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试");
alert(locale_splitText.tipNoMulti);
}
else{
tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", "");
tooltip.info(locale_splitText.tipNoMulti, "");
}

return;
Expand Down Expand Up @@ -277,8 +281,6 @@ function createFilterOptions(luckysheet_filter_save, filterObj) {
file.filter_select = luckysheet_filter_save;
}



function initialFilterHandler(){
//filter event handler
let hidefilersubmenu = null;
Expand Down
1 change: 0 additions & 1 deletion src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ export default function luckysheetHandler() {
// setTimeout(function(){
luckysheetscrollevent();
// },10);

})
.mousewheel(function (event, delta) {
event.preventDefault();
Expand Down
66 changes: 49 additions & 17 deletions src/controllers/rowColumnOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ import {getMeasureText} from '../global/getRowlen';
import { luckysheet_searcharray } from '../controllers/sheetSearch';
import Store from '../store';



export function rowColumnOperationInitial(){


//表格行标题 mouse事件
//表格行标题 mouse事件
$("#luckysheet-rows-h").mousedown(function (event) {
//有批注在编辑时
luckysheetPostil.removeActivePs();
Expand Down Expand Up @@ -809,7 +806,6 @@ export function rowColumnOperationInitial(){
}
});


//表格行标题 改变行高按钮
$("#luckysheet-rows-change-size").mousedown(function (event) {
//有批注在编辑时
Expand Down Expand Up @@ -915,6 +911,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
alert(locale_drag.noMulti);
Expand All @@ -926,6 +926,8 @@ export function rowColumnOperationInitial(){
return;
}



let $t = $(this), value = $t.parent().find("input").val();
if (!isRealNum(value)) {
if(isEditMode()){
Expand Down Expand Up @@ -956,6 +958,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-addTopRows").click(function (event) {
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -984,10 +990,10 @@ export function rowColumnOperationInitial(){

if (value < 1 || value > 100) {
if(isEditMode()){
alert(llocale_info.tipInputNumberLimit);
alert(locale_info.tipInputNumberLimit);
}
else{
tooltip.info(llocale_info.tipInputNumberLimit, "");
tooltip.info(locale_info.tipInputNumberLimit, "");
}
return;
}
Expand All @@ -998,6 +1004,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-addLeftCols").click(function (event) {
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
Expand Down Expand Up @@ -1026,10 +1036,10 @@ export function rowColumnOperationInitial(){

if (value < 1 || value > 100) {
if(isEditMode()){
alert(llocale_info.tipInputNumberLimit);
alert(locale_info.tipInputNumberLimit);
}
else{
tooltip.info(llocale_info.tipInputNumberLimit, "");
tooltip.info(locale_info.tipInputNumberLimit, "");
}
return;
}
Expand All @@ -1043,6 +1053,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
alert(locale_drag.noMulti);
Expand Down Expand Up @@ -1070,10 +1084,10 @@ export function rowColumnOperationInitial(){

if (value < 1 || value > 100) {
if(isEditMode()){
alert(llocale_info.tipInputNumberLimit);
alert(locale_info.tipInputNumberLimit);
}
else{
tooltip.info(llocale_info.tipInputNumberLimit, "");
tooltip.info(locale_info.tipInputNumberLimit, "");
}

return;
Expand All @@ -1086,6 +1100,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
alert(locale_drag.noMulti);
Expand Down Expand Up @@ -1113,10 +1131,10 @@ export function rowColumnOperationInitial(){

if (value < 1 || value > 100) {
if(isEditMode()){
alert(llocale_info.tipInputNumberLimit);
alert(locale_info.tipInputNumberLimit);
}
else{
tooltip.info(llocale_info.tipInputNumberLimit, "");
tooltip.info(locale_info.tipInputNumberLimit, "");
}

return;
Expand All @@ -1129,6 +1147,10 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const _locale = locale();
const locale_drag = _locale.drag;
const locale_info = _locale.info;

if(Store.luckysheet_select_save.length > 1){
if(isEditMode()){
alert(locale_drag.noMulti);
Expand Down Expand Up @@ -1156,10 +1178,10 @@ export function rowColumnOperationInitial(){

if (value < 1 || value > 100) {
if(isEditMode()){
alert(llocale_info.tipInputNumberLimit);
alert(locale_info.tipInputNumberLimit);
}
else{
tooltip.info(llocale_info.tipInputNumberLimit, "");
tooltip.info(locale_info.tipInputNumberLimit, "");
}

return;
Expand All @@ -1174,6 +1196,8 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const locale_drag = locale().drag;

if(Store.luckysheet_select_save.length > 1){
if(Store.luckysheetRightHeadClickIs == "row"){
if(isEditMode()){
Expand Down Expand Up @@ -1202,6 +1226,8 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const locale_drag = locale().drag;

if(Store.luckysheet_select_save.length > 1){
if(Store.luckysheetRightHeadClickIs == "row"){
if(isEditMode()){
Expand Down Expand Up @@ -1230,6 +1256,8 @@ export function rowColumnOperationInitial(){
$("#luckysheet-rightclick-menu").hide();
luckysheetContainerFocus();

const locale_drag = locale().drag;

if(Store.luckysheet_select_save.length > 1){
if(Store.luckysheetRightHeadClickIs == "row"){
if(isEditMode()){
Expand Down Expand Up @@ -1366,6 +1394,8 @@ export function rowColumnOperationInitial(){
}

if(has_PartMC){
const locale_drag = locale().drag;

if(isEditMode()){
alert(locale_drag.noPartMerge);
}
Expand Down Expand Up @@ -1418,11 +1448,13 @@ export function rowColumnOperationInitial(){
let size = parseInt($(this).siblings("input[type='number']").val().trim());

if(size < 0 || size > 255){
const locale_info = locale().info;

if(isEditMode()){
alert(llocale_info.tipRowHeightLimit);
alert(locale_info.tipRowHeightLimit);
}
else{
tooltip.info(llocale_info.tipRowHeightLimit, "");
tooltip.info(locale_info.tipRowHeightLimit, "");
}

return;
Expand Down
Loading

0 comments on commit 7263008

Please sign in to comment.