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 Sep 18, 2020
1 parent 6d96556 commit dea7bbf
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 82 deletions.
10 changes: 9 additions & 1 deletion src/controllers/constant.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

200 changes: 124 additions & 76 deletions src/controllers/dataVerificationCtrl.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4277,6 +4277,10 @@ export default function luckysheetHandler() {
$("#luckysheet-insertImg-btn-title").click(function () {
$("#luckysheet-imgUpload").click();
});
$("#luckysheetInsertImage").click(function () {
$("#luckysheet-imgUpload").click();
$("#luckysheet-rightclick-menu").hide();
})
$("#luckysheet-imgUpload").click(function (e) {
e.stopPropagation();
});
Expand All @@ -4301,6 +4305,10 @@ export default function luckysheetHandler() {
dataVerificationCtrl.createDialog();
dataVerificationCtrl.init();
})
$("#luckysheetDataVerification").click(function () {
$("#luckysheet-dataVerification-btn-title").click();
$("#luckysheet-rightclick-menu").hide();
})

//冻结行列
$("#luckysheet-freezen-btn-horizontal").click(function () {
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/menuButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2948,10 +2948,10 @@ const menuButton = {
}

if(attr == "tb" || attr == "tr" || attr == "fs"){
jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true, false);
jfrefreshgrid(d, Store.luckysheet_select_save, cfg, null, true, null, false);
}
else{
jfrefreshgrid(d, Store.luckysheet_select_save, undefined, undefined,undefined,false);
jfrefreshgrid(d, Store.luckysheet_select_save, undefined, undefined,undefined,undefined,false);
}
},
updateFormat_mc: function(d, foucsStatus){
Expand Down
6 changes: 4 additions & 2 deletions src/global/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,10 @@ let cellRender = function(r, c, start_r, start_c, end_r, end_c, value, luckyshee
luckysheetTableContent.rect(pos_x, pos_y, cellWidth, cellHeight);
luckysheetTableContent.clip();
luckysheetTableContent.scale(Store.zoomRatio,Store.zoomRatio);

textMetrics += 14;

let measureText = getMeasureText(value, luckysheetTableContent);
let textMetrics = measureText.width + 14;
let oneLineTextHeight = measureText.actualBoundingBoxDescent + measureText.actualBoundingBoxAscent;

let horizonAlignPos = (pos_x + space_width) ; //默认为1,左对齐
if(horizonAlign == "0"){ //居中对齐
Expand Down
50 changes: 49 additions & 1 deletion src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ export default {
"space":"space",

},

findAndReplace:{
find:"Find",
replace:"Replace",
Expand Down Expand Up @@ -867,6 +866,55 @@ export default {
fiveQuadrantDiagram: 'Five-quadrant diagram',
fiveBoxes: '5 Boxes',
},
dataVerification: {
cellRange: 'Cell range',
selectCellRange: 'Click to select cell range',
selectCellRange2: 'Please select a range of cells',
verificationCondition: 'Verification condition',
dropdown: 'drop-down list',
checkbox: 'Checkbox',
number: 'Number',
number_integer: 'Number-integer',
number_decimal: 'Number-decimal',
text_content: 'Text-content',
text_length: 'Text-length',
date: 'Date',
validity: 'Effectiveness',
placeholder1: 'Please enter the options, separated by commas, such as 1,2,3,4,5',
placeholder2: 'Please enter content',
placeholder3: 'Numeric value, such as 10',
placeholder4: 'Please enter the specified text',
placeholder5: 'Please enter the prompt displayed when the cell is selected',
selected: 'Selected',
notSelected: 'Not selected',
between: 'Between',
notBetween: 'Not between',
equal: 'Equal',
notEqualTo: 'Not equal to',
moreThanThe: 'More than the',
lessThan: 'Less than',
greaterOrEqualTo: 'Greater or equal to',
lessThanOrEqualTo: 'Less than or equal to',
include: 'Include',
exclude: 'Exclude',
earlierThan: 'Earlier than',
noEarlierThan: 'No earlier than',
laterThan: 'Later than',
noLaterThan: 'No later than',
identificationNumber: 'Identification number',
phoneNumber: 'Phone number',
remote: 'Automatic remote acquisition option',
prohibitInput: 'Prohibit input when input data is invalid',
hintShow: 'Show prompt when cell is selected',
deleteVerification: 'Delete verification',
tooltipInfo1: 'The drop-down list option cannot be empty',
tooltipInfo2: 'Checkbox content cannot be empty',
tooltipInfo3: 'The value entered is not a numeric type',
tooltipInfo4: 'The value 2 cannot be less than the value 1',
tooltipInfo5: 'The text content cannot be empty',
tooltipInfo6: 'The value entered is not a date type',
tooltipInfo7: 'Date 2 cannot be less than date 1',
},
formula:{
sum:"Sum",
average:"Average",
Expand Down
49 changes: 49 additions & 0 deletions src/locale/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,55 @@ export default {
fiveQuadrantDiagram: '五象限图',
fiveBoxes: '5个框',
},
dataVerification: {
cellRange: '单元格范围',
selectCellRange: '点击选择单元格范围',
selectCellRange2: '请选择单元格范围',
verificationCondition: '验证条件',
dropdown: '下拉列表',
checkbox: '复选框',
number: '数字',
number_integer: '数字-整数',
number_decimal: '数字-小数',
text_content: '文本-内容',
text_length: '文本-长度',
date: '日期',
validity: '有效性',
placeholder1: '请输入选项,以英文逗号分隔,如1,2,3,4,5',
placeholder2: '请输入内容',
placeholder3: '数值,如10',
placeholder4: '请输入指定的文本',
placeholder5: '请输入选中单元格时显示的提示语',
selected: '选择时',
notSelected: '未选择',
between: '介于',
notBetween: '不介于',
equal: '等于',
notEqualTo: '不等于',
moreThanThe: '大于',
lessThan: '小于',
greaterOrEqualTo: '大于等于',
lessThanOrEqualTo: '小于等于',
include: '包括',
exclude: '不包括',
earlierThan: '早于',
noEarlierThan: '不早于',
laterThan: '晚于',
noLaterThan: '不晚于',
identificationNumber: '身份证号码',
phoneNumber: '手机号',
remote: '自动远程获取选项',
prohibitInput: '输入数据无效时禁止输入',
hintShow: '选中单元格时显示提示语',
deleteVerification: '删除验证',
tooltipInfo1: '下拉列表选项不可为空',
tooltipInfo2: '复选框内容不可为空',
tooltipInfo3: '输入的值不是数值类型',
tooltipInfo4: '数值2不能小于数值1',
tooltipInfo5: '文本内容不能为空',
tooltipInfo6: '输入的值不是日期类型',
tooltipInfo7: '日期2不能小于日期1',
},
formula:{
sum:"求和",
average:"平均值",
Expand Down

0 comments on commit dea7bbf

Please sign in to comment.