From 54568e171117358e4e3dcac82ff9339781dc9f8d Mon Sep 17 00:00:00 2001 From: timelyportfolio Date: Sun, 6 Sep 2020 15:48:30 -0500 Subject: [PATCH] update element examples to 2.13.2 --- inst/examples/vue_component_examples.R | 213 ++++++++++++++----------- 1 file changed, 123 insertions(+), 90 deletions(-) diff --git a/inst/examples/vue_component_examples.R b/inst/examples/vue_component_examples.R index d98b33e..deaee8d 100644 --- a/inst/examples/vue_component_examples.R +++ b/inst/examples/vue_component_examples.R @@ -37,101 +37,134 @@ browsable( #### Element examples #################################### element <- htmlDependency( name = "element", - version = "1.4.13", - src = c(href="https://unpkg.com/element-ui@1.4.13/lib/"), + version = "2.13.2", + src = c(href="https://unpkg.com/element-ui@2.13.2/lib/"), script = "index.js", - stylesheet = "theme-default/index.css" + stylesheet = "theme-chalk/index.css" ) tl <- tagList( tags$script(" -ELEMENT.locale( -{ - el: { - datepicker: { - now: 'Now', - today: 'Today', - cancel: 'Cancel', - clear: 'Clear', - confirm: 'OK', - selectDate: 'Select date', - selectTime: 'Select time', - startDate: 'Start Date', - startTime: 'Start Time', - endDate: 'End Date', - endTime: 'End Time', - year: '', - month1: 'January', - month2: 'February', - month3: 'March', - month4: 'April', - month5: 'May', - month6: 'June', - month7: 'July', - month8: 'August', - month9: 'September', - month10: 'October', - month11: 'November', - month12: 'December', - // week: 'week', - weeks: { - sun: 'Sun', - mon: 'Mon', - tue: 'Tue', - wed: 'Wed', - thu: 'Thu', - fri: 'Fri', - sat: 'Sat' - }, - months: { - jan: 'Jan', - feb: 'Feb', - mar: 'Mar', - apr: 'Apr', - may: 'May', - jun: 'Jun', - jul: 'Jul', - aug: 'Aug', - sep: 'Sep', - oct: 'Oct', - nov: 'Nov', - dec: 'Dec' - } - }, - select: { - loading: 'Loading', - noMatch: 'No matching data', - noData: 'No data', - placeholder: 'Select' - }, - pagination: { - goto: 'Go to', - pagesize: '/page', - total: 'Total {total}', - pageClassifier: '' - }, - messagebox: { - title: 'Message', - confirm: 'OK', - cancel: 'Cancel', - error: 'Illegal input' - }, - upload: { - delete: 'Delete', - preview: 'Preview', - continue: 'Continue' - }, - table: { - emptyText: 'No Data', - confirmFilter: 'Confirm', - resetFilter: 'Reset', - clearFilter: 'All' - }, - tree: { - emptyText: 'No Data' - } - } - }) + ELEMENT.locale({ + el: { + colorpicker: { + confirm: 'OK', + clear: 'Clear' + }, + datepicker: { + now: 'Now', + today: 'Today', + cancel: 'Cancel', + clear: 'Clear', + confirm: 'OK', + selectDate: 'Select date', + selectTime: 'Select time', + startDate: 'Start Date', + startTime: 'Start Time', + endDate: 'End Date', + endTime: 'End Time', + prevYear: 'Previous Year', + nextYear: 'Next Year', + prevMonth: 'Previous Month', + nextMonth: 'Next Month', + year: '', + month1: 'January', + month2: 'February', + month3: 'March', + month4: 'April', + month5: 'May', + month6: 'June', + month7: 'July', + month8: 'August', + month9: 'September', + month10: 'October', + month11: 'November', + month12: 'December', + week: 'week', + weeks: { + sun: 'Sun', + mon: 'Mon', + tue: 'Tue', + wed: 'Wed', + thu: 'Thu', + fri: 'Fri', + sat: 'Sat' + }, + months: { + jan: 'Jan', + feb: 'Feb', + mar: 'Mar', + apr: 'Apr', + may: 'May', + jun: 'Jun', + jul: 'Jul', + aug: 'Aug', + sep: 'Sep', + oct: 'Oct', + nov: 'Nov', + dec: 'Dec' + } + }, + select: { + loading: 'Loading', + noMatch: 'No matching data', + noData: 'No data', + placeholder: 'Select' + }, + cascader: { + noMatch: 'No matching data', + loading: 'Loading', + placeholder: 'Select', + noData: 'No data' + }, + pagination: { + goto: 'Go to', + pagesize: '/page', + total: 'Total {total}', + pageClassifier: '' + }, + messagebox: { + title: 'Message', + confirm: 'OK', + cancel: 'Cancel', + error: 'Illegal input' + }, + upload: { + deleteTip: 'press delete to remove', + delete: 'Delete', + preview: 'Preview', + continue: 'Continue' + }, + table: { + emptyText: 'No Data', + confirmFilter: 'Confirm', + resetFilter: 'Reset', + clearFilter: 'All', + sumText: 'Sum' + }, + tree: { + emptyText: 'No Data' + }, + transfer: { + noMatch: 'No matching data', + noData: 'No data', + titles: ['List 1', 'List 2'], // to be translated + filterPlaceholder: 'Enter keyword', // to be translated + noCheckedFormat: '{total} items', // to be translated + hasCheckedFormat: '{checked}/{total} checked' // to be translated + }, + image: { + error: 'FAILED' + }, + pageHeader: { + title: 'Back' // to be translated + }, + popconfirm: { + confirmButtonText: 'Yes', + cancelButtonText: 'No' + } + } + }) "), tags$div( id="app",