git clone [email protected]:vuejs-br/br.vuejs.org.git
cd into/cloned/br.vuejs.org
git remote add upstream git://github.com/vuejs/vuejs.org.git
git fetch upstream
| /* | |
| * CSS Only Checkbox | |
| */ | |
| div { | |
| color: #333; | |
| margin-bottom: 1em; | |
| } | |
| div.large { |
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Meu primeiro aplicativo Vue</title> | |
| <script src="https://unpkg.com/vue"></script> | |
| </head> | |
| <body> | |
| <div id="app"> | |
| {{ message }} |
| var currencyValidator = { | |
| format: function (number) { | |
| return (Math.trunc(number * 1000000000000) / 1000000000000).toFixed(2) | |
| }, | |
| parse: function (newString, oldNumber) { | |
| var CleanParse = function (value) { | |
| return { value: value } | |
| } | |
| var CurrencyWarning = function (warning, value) { | |
| return { |
git clone [email protected]:vuejs-br/br.vuejs.org.git
cd into/cloned/br.vuejs.org
git remote add upstream git://github.com/vuejs/vuejs.org.git
git fetch upstream
| 1 | |
| 00:00:00,000 --> 00:00:02,418 | |
| - Nos últimos 10 anos | |
| as páginas Web se tornaram | |
| 2 | |
| 00:00:02,418 --> 00:00:05,600 | |
| mais dinâmicas e poderosas | |
| graças ao JavaScript. |
| /* Easy-To-Use Bookmarklet to Toogle CSS Layout Hints On/Off | |
| * Thanks to: https://dev.to/gajus/my-favorite-css-hack-32g3 and https://gist.github.com/vcastroi | |
| * Usage: create a new bookmarklet (inside your browser Bookmark Manager) and use the folowing code as the bookmark URL: | |
| */ | |
| javascript: (function () { | |
| const DEPTH = 10, els = document.body.getElementsByTagName('*'), items = []; | |
| let selector = '', style = '*{color:#000!important;outline:1px solid #f00!important;outline-offset:-2px;background-color:#fff!important;}\n'; | |
| for (let el of els) el.innerHTML.indexOf(style) !== -1 && items.push(el); | |
| if (items.length > 0) items.forEach(item => item.innerHTML = ''); | |
| else { |
| name: Inspirado no Exemplo 03 | |
| description: >- | |
| Calcula o valor com desconto a partir do preço e do percentual de desconto, | |
| lidos das células A1 e B1, com o resultado sendo exibido em C1. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: "const form = document.getElementById(\"form\") as HTMLFormElement;\r\nconst result = document.getElementById(\"result\") as HTMLDivElement;\r\n\r\nform.addEventListener(\"submit\", (event) => {\r\n event.preventDefault();\r\n\r\n Excel.run(async (context) => {\r\n const sheet = context.workbook.worksheets.getActiveWorksheet();\r\n const range = sheet.getRange(\"A1:C1\");\r\n range.load(\"values\");\r\n await context.sync();\r\n\r\n const price = parseFloat(range.values[0][0]);\r\n const discount = parseFloat(range.values[0][1]);\r\n\r\n const amountDiscounted = (price * discount) / 100;\r\n const finalPrice = price - amountDiscounted;\r\n\r\n result.innerHTML = `\r\n <ul>\r\n <li>Preço base: <b>${price}</b>.</li>\r\n <li>Valor |
| name: Exemplo Básico | |
| description: >- | |
| Faz chamadas básicas à API Excel para mudar a cor de fundo de células | |
| selecionadas ou limpar a formatação. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| const run = document.getElementById("run"); | |
| run.addEventListener("click", () => { |
| name: Aritmética Básica | |
| description: >- | |
| Calcula operações aritméticas básicas a partir dos dados extraídos da planilha | |
| aberta. | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| const calc = document.getElementById("calc"); | |
| calc.addEventListener("click", async () => { |