diff --git a/packages/fineui/dist/font/iconfont.eot b/packages/fineui/dist/font/iconfont.eot index 89f2da49d..6a0f685a2 100644 Binary files a/packages/fineui/dist/font/iconfont.eot and b/packages/fineui/dist/font/iconfont.eot differ diff --git a/packages/fineui/dist/font/iconfont.svg b/packages/fineui/dist/font/iconfont.svg index fc31d8c18..32deecda8 100644 --- a/packages/fineui/dist/font/iconfont.svg +++ b/packages/fineui/dist/font/iconfont.svg @@ -14,6 +14,20 @@ /> + + + + + + + + + + + + + + @@ -82,7 +96,7 @@ - + @@ -370,7 +384,7 @@ - + @@ -462,7 +476,7 @@ - + @@ -842,7 +856,7 @@ - + @@ -1452,13 +1466,13 @@ - + - + @@ -2032,7 +2046,7 @@ - + @@ -2202,11 +2216,11 @@ - + - + diff --git a/packages/fineui/dist/font/iconfont.ttf b/packages/fineui/dist/font/iconfont.ttf index 531cb42f8..85e450f3a 100644 Binary files a/packages/fineui/dist/font/iconfont.ttf and b/packages/fineui/dist/font/iconfont.ttf differ diff --git a/packages/fineui/dist/font/iconfont.woff b/packages/fineui/dist/font/iconfont.woff index 73922b30f..9c12cac44 100644 Binary files a/packages/fineui/dist/font/iconfont.woff and b/packages/fineui/dist/font/iconfont.woff differ diff --git a/packages/fineui/dist/font/iconfont.woff2 b/packages/fineui/dist/font/iconfont.woff2 index ab9f6bed5..497bc683b 100644 Binary files a/packages/fineui/dist/font/iconfont.woff2 and b/packages/fineui/dist/font/iconfont.woff2 differ diff --git a/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js b/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js index 61a48946f..0a9f9a24c 100644 --- a/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js +++ b/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js @@ -22,7 +22,13 @@ import { Label, Combo, TextItem } from "@/base"; import { PopupPanel } from "../layer"; import { CustomColorChooser } from "./colorchooser.custom"; import { ColorChooserPopup } from "./colorchooser.popup"; -import { ColorPickerEditor, ColorPicker, HexColorPicker } from "./colorpicker"; +import { + ColorPickerEditor, + ColorPicker, + HexColorPicker, + SimpleHexColorPickerEditor, + HexColorPickerEditor +} from "./colorpicker"; /** * @author windy @@ -59,8 +65,8 @@ export class HexColorChooserPopup extends Widget { extend( { type: o.simple - ? "bi.simple_hex_color_picker_editor" - : "bi.hex_color_picker_editor", + ? SimpleHexColorPickerEditor.xtype + : HexColorPickerEditor.xtype, value: o.value, height: o.simple ? 36 : 70, listeners: [ diff --git a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js index f512888be..25ffb0a2a 100644 --- a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js +++ b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js @@ -39,7 +39,7 @@ export class HexColorPickerEditor extends Widget { static EVENT_CHANGE = "EVENT_CHANGE"; props = { - baseCls: "bi-color-picker-editor", + baseCls: "bi-color-picker-editor bi-hex-color-picker-editor", height: 30, }; diff --git a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js index 3c13b1aba..14386afac 100644 --- a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js +++ b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js @@ -23,7 +23,8 @@ import { TextEditor } from "@/widget/editor/editor.text"; const RGB_WIDTH = 32, HEX_WIDTH = 70, - HEX_PREFIX_POSITION = 1; + HEX_PREFIX_POSITION = 1, + DEFAULT_HEX = "ffffff"; /** * @author windy @@ -37,7 +38,7 @@ export class SimpleHexColorPickerEditor extends Widget { static EVENT_CHANGE = "EVENT_CHANGE"; props = { - baseCls: "bi-color-picker-editor", + baseCls: "bi-color-picker-editor bi-simple-hex-color-picker-editor", height: 36, }; @@ -112,6 +113,7 @@ export class SimpleHexColorPickerEditor extends Widget { errorText: i18nText("BI-Color_Picker_Error_Text_Hex"), width: HEX_WIDTH, height: 24, + value: DEFAULT_HEX, listeners: [ { eventName: "EVENT_CHANGE", diff --git a/packages/fineui/src/case/list/list.select.js b/packages/fineui/src/case/list/list.select.js index 4301aff57..30f78ac40 100644 --- a/packages/fineui/src/case/list/list.select.js +++ b/packages/fineui/src/case/list/list.select.js @@ -71,10 +71,12 @@ export class SelectList extends Widget { itemsCreator: (op, callback) => { op.times === 1 && this.toolbar.setVisible(false); o.itemsCreator(op, (items, keywords, context, ...args) => { - callback(items, keywords, context, ...args); + const tipText = get(context, "tipText", ""); + const isEmptyTipText = isEmptyString(tipText); + // tipText 和 items 本身就是互斥的 + callback(isEmptyTipText ? items : [], keywords, context, ...args); if (op.times === 1) { - const tipText = get(context, "tipText", ""); - const visible = isEmptyString(tipText) && items && items.length > 0; + const visible = isEmptyTipText && items && items.length > 0; this.toolbar.setVisible(visible); this.toolbar.setEnable(this.isEnabled() && visible); } diff --git a/packages/fineui/src/core/func/date.js b/packages/fineui/src/core/func/date.js index b592ad7d7..599e006c7 100644 --- a/packages/fineui/src/core/func/date.js +++ b/packages/fineui/src/core/func/date.js @@ -56,7 +56,7 @@ export function getMonthDays(date, month = date.getMonth()) { if (((0 === (year % 4)) && ((0 !== (year % 100)) || (0 === (year % 400)))) && month === 1) { return 29; } - + return _MD[month]; } @@ -85,7 +85,7 @@ export function getDayOfYear(date) { const now = getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); const then = getDate(date.getFullYear(), 0, 0, 0, 0, 0); const time = now - then; - + return Math.floor(time / DAY); } @@ -108,7 +108,7 @@ export function getWeekNumber(date) { const ms = d.valueOf(); d.setMonth(0); d.setDate(1); - + return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1; } @@ -135,7 +135,7 @@ export function getOffsetQuarter(date, n) { } dt.setDate(day); dt.setMonth(dt.getMonth() + parseInt(n, 10) * 3); - + return dt; } @@ -159,7 +159,7 @@ export function getQuarterStartMonth(date) { if (nowMonth > 8) { quarterStartMonth = 9; } - + return quarterStartMonth; } @@ -179,8 +179,8 @@ export function getQuarterStartDate(date) { */ export function getQuarterEndDate(date) { const quarterEndMonth = getQuarterStartMonth(date) + 2; - - return getDate(date.getFullYear(), quarterEndMonth, getMonthDays(date)); + + return getDate(date.getFullYear(), quarterEndMonth, getMonthDays(date, quarterEndMonth)); } /** @@ -198,7 +198,7 @@ export function getOffsetMonth(date, n) { } dt.setDate(day); dt.setMonth(dt.getMonth() + parseInt(n, 10)); - + return dt; } @@ -210,7 +210,7 @@ export function getOffsetMonth(date, n) { export function getWeekStartDate(date) { const w = date.getDay(); const startOfWeek = StartOfWeek % 7; - + return getOffsetDate(date, _OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)]); } @@ -222,7 +222,7 @@ export function getWeekStartDate(date) { export function getWeekEndDate(date) { const w = date.getDay(); const startOfWeek = StartOfWeek % 7; - + return getOffsetDate(date, _OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6); } @@ -349,7 +349,7 @@ export function print(date, str) { if (!_global.navigator) { return false; } - + return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); };