├── .prettierignore
├── .npmrc
├── src
├── tutorial
│ ├── src
│ │ ├── step-12
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ └── template.html
│ │ │ ├── ChildComp
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── description.md
│ │ ├── step-1
│ │ │ └── App
│ │ │ │ └── template.html
│ │ ├── step-11
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ ├── template.html
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── composition.js
│ │ │ ├── ChildComp
│ │ │ │ └── template.html
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── composition.js
│ │ │ │ └── options.js
│ │ │ └── description.md
│ │ ├── step-2
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── _hint
│ │ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── step-14
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── ChildComp
│ │ │ │ └── template.html
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ └── template.html
│ │ │ └── description.md
│ │ ├── step-13
│ │ │ ├── ChildComp
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ └── template.html
│ │ │ └── description.md
│ │ ├── step-3
│ │ │ ├── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ └── template.html
│ │ │ └── description.md
│ │ ├── step-9
│ │ │ ├── App
│ │ │ │ ├── options.js
│ │ │ │ ├── template.html
│ │ │ │ └── composition.js
│ │ │ └── _hint
│ │ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── step-8
│ │ │ ├── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── _hint
│ │ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── step-15
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── style.css
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── import-map.json
│ │ │ └── description.md
│ │ ├── step-4
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ ├── template.html
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── composition.js
│ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── step-5
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ ├── template.html
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── composition.js
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── description.md
│ │ ├── step-6
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ ├── template.html
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── composition.js
│ │ │ └── description.md
│ │ ├── step-10
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ │ └── App
│ │ │ │ │ ├── options.js
│ │ │ │ │ └── composition.js
│ │ │ └── description.md
│ │ └── step-7
│ │ │ ├── App
│ │ │ ├── template.html
│ │ │ ├── options.js
│ │ │ └── composition.js
│ │ │ ├── _hint
│ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── description.md
│ ├── index.md
│ └── tutorial.data.ts
├── examples
│ ├── src
│ │ ├── hello-world
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── description.txt
│ │ ├── markdown
│ │ │ ├── description.txt
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── style.css
│ │ │ └── import-map.json
│ │ ├── svg
│ │ │ ├── description.txt
│ │ │ ├── AxisLabel
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── PolyGraph
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── util.js
│ │ │ └── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── attribute-bindings
│ │ │ ├── App
│ │ │ │ ├── style.css
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── template.html
│ │ │ └── description.txt
│ │ ├── crud
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── simple-component
│ │ │ ├── TodoItem
│ │ │ │ ├── template.html
│ │ │ │ ├── composition.js
│ │ │ │ └── options.js
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ ├── template.html
│ │ │ │ └── composition.js
│ │ ├── cells
│ │ │ ├── description.txt
│ │ │ ├── Cell
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── App
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ ├── template.html
│ │ │ │ └── style.css
│ │ │ └── store.js
│ │ ├── counter
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── timer
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── circle-drawer
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── flight-booker
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── style.css
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── todomvc
│ │ │ ├── App
│ │ │ │ └── style.css
│ │ │ └── description.txt
│ │ ├── temperature-converter
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── modal
│ │ │ ├── description.txt
│ │ │ ├── Modal
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ ├── template.html
│ │ │ │ └── style.css
│ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── template.html
│ │ ├── handling-input
│ │ │ ├── App
│ │ │ │ ├── style.css
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── template.html
│ │ │ └── description.txt
│ │ ├── tree
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── style.css
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ ├── description.txt
│ │ │ └── TreeItem
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── grid
│ │ │ ├── description.txt
│ │ │ ├── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ │ └── Grid
│ │ │ │ ├── template.html
│ │ │ │ ├── style.css
│ │ │ │ ├── options.js
│ │ │ │ └── composition.js
│ │ ├── form-bindings
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── template.html
│ │ ├── list-transition
│ │ │ ├── import-map.json
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── template.html
│ │ │ │ ├── options.js
│ │ │ │ ├── style.css
│ │ │ │ └── composition.js
│ │ ├── conditionals-and-loops
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ │ ├── options.js
│ │ │ │ ├── composition.js
│ │ │ │ └── template.html
│ │ └── fetching-data
│ │ │ ├── description.txt
│ │ │ └── App
│ │ │ ├── style.css
│ │ │ ├── template.html
│ │ │ ├── options.js
│ │ │ └── composition.js
│ └── index.md
├── public
│ ├── logo-uwu.png
│ ├── images
│ │ ├── logo.png
│ │ ├── paypal.png
│ │ └── partners
│ │ │ ├── curotec.png
│ │ │ ├── epicmax.png
│ │ │ ├── herodevs.png
│ │ │ ├── monterail.png
│ │ │ ├── redberry.png
│ │ │ ├── curotec-hero.jpg
│ │ │ ├── jump24-hero.jpg
│ │ │ ├── tighten-hero.jpg
│ │ │ ├── vehikl-hero.jpg
│ │ │ ├── webreinvent.png
│ │ │ ├── 64robots-hero.jpg
│ │ │ ├── herodevs-dark.png
│ │ │ ├── herodevs-hero.png
│ │ │ ├── monterail-dark.png
│ │ │ ├── monterail-hero.png
│ │ │ ├── redberry-hero.jpg
│ │ │ ├── passionatepeople.png
│ │ │ ├── webreinvent-hero.jpg
│ │ │ ├── passionatepeople-dark.png
│ │ │ ├── passionatepeople-hero.jpg
│ │ │ ├── jump24.svg
│ │ │ └── jump24-dark.svg
│ ├── logo.svg
│ ├── service-worker.js
│ └── _headers
├── about
│ ├── images
│ │ ├── ben-hong.jpeg
│ │ └── evan-you.jpeg
│ ├── team.md
│ └── team
│ │ ├── Member.ts
│ │ └── TeamHero.vue
├── guide
│ ├── components
│ │ └── images
│ │ │ ├── slots.png
│ │ │ ├── named-slots.png
│ │ │ ├── prop-drilling.png
│ │ │ └── provide-inject.png
│ ├── extras
│ │ ├── images
│ │ │ ├── options-api.png
│ │ │ ├── render-pipeline.png
│ │ │ └── composition-api-after.png
│ │ └── demos
│ │ │ ├── Colors.vue
│ │ │ ├── AnimateWatcher.vue
│ │ │ ├── SpreadSheet.vue
│ │ │ ├── spreadSheetStore.js
│ │ │ ├── DisabledButton.vue
│ │ │ └── SpreadSheetCell.vue
│ ├── essentials
│ │ └── images
│ │ │ ├── components.png
│ │ │ ├── directive.png
│ │ │ └── lifecycle.png
│ ├── scaling-up
│ │ └── images
│ │ │ └── state-flow.png
│ ├── typescript
│ │ └── images
│ │ │ └── takeover-mode.png
│ ├── built-ins
│ │ ├── images
│ │ │ └── transition-classes.png
│ │ ├── keep-alive-demos
│ │ │ ├── CompB.vue
│ │ │ ├── CompA.vue
│ │ │ └── SwitchComponent.vue
│ │ └── transition-demos
│ │ │ ├── Basic.vue
│ │ │ ├── BetweenComponents.vue
│ │ │ ├── SlideFade.vue
│ │ │ ├── CssAnimation.vue
│ │ │ ├── ListBasic.vue
│ │ │ ├── JsHooks.vue
│ │ │ ├── ListStagger.vue
│ │ │ ├── BetweenElements.vue
│ │ │ ├── ListMove.vue
│ │ │ └── NestedTransitions.vue
│ ├── best-practices
│ │ └── images
│ │ │ ├── AccessiblePlaceholder.png
│ │ │ ├── AccessibleARIAdescribedby.png
│ │ │ ├── AccessibleARIAlabelDevTools.png
│ │ │ ├── AccessibleLabelChromeDevTools.png
│ │ │ ├── AccessibleARIAlabelledbyDevTools.png
│ │ │ └── AccessibilityChromeDeveloperTools.png
│ └── reusability
│ │ └── mouse.js
├── ecosystem
│ ├── themes.md
│ ├── newsletters.md
│ └── themes
│ │ ├── ThemePage.vue
│ │ ├── ThemeList.vue
│ │ ├── ThemeHero.vue
│ │ ├── ThemeContact.vue
│ │ └── ThemeProduct.vue
├── partners
│ ├── all.md
│ ├── index.md
│ ├── [partnerId].md
│ ├── [partnerId].paths.ts
│ └── components
│ │ ├── type.ts
│ │ ├── utils.ts
│ │ ├── PartnerLocation.vue
│ │ ├── PartnerAll.vue
│ │ ├── PartnerHero.vue
│ │ └── PartnerJoin.vue
├── index.md
├── api
│ └── index.md
└── error-reference
│ ├── errors.data.ts
│ ├── ErrorsTable.vue
│ └── index.md
├── .github
├── FUNDING.yml
├── pull_request_template.md
├── contributing
│ └── oxford-comma.jpg
├── dependabot.yml
├── workflows
│ ├── ryu-cho.yaml
│ └── automerge.yml
└── scripts
│ └── tag-alert-blocks.js
├── .prettierrc
├── .vitepress
├── inlined-scripts
│ ├── uwu.js
│ ├── perfops.js
│ └── restorePreference.js
├── theme
│ ├── styles
│ │ ├── index.css
│ │ ├── utilities.css
│ │ ├── pages.css
│ │ ├── badges.css
│ │ ├── options-boxes.css
│ │ ├── style-guide.css
│ │ ├── vue-mastery.css
│ │ └── inline-demo.css
│ ├── components
│ │ ├── preferences.ts
│ │ ├── sponsors.ts
│ │ ├── TextAd.vue
│ │ ├── ReplLoading.vue
│ │ ├── VueSchoolLink.vue
│ │ ├── SiteMap.vue
│ │ ├── Banner.vue
│ │ └── SecurityUpdateButton.vue
│ └── index.ts
├── textAdMdPlugin.ts
└── headerMdPlugin.ts
├── netlify.toml
├── .editorconfig
├── env.d.ts
├── tsconfig.json
├── vercel.json
├── package.json
├── README.md
└── .gitignore
/.prettierignore:
--------------------------------------------------------------------------------
1 | *.vue
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-manager-strict=false
2 |
--------------------------------------------------------------------------------
/src/tutorial/src/step-12/App/template.html:
--------------------------------------------------------------------------------
1 |
hello
2 | -------------------------------------------------------------------------------- /src/examples/src/attribute-bindings/App/style.css: -------------------------------------------------------------------------------- 1 | .red { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /src/examples/src/crud/description.txt: -------------------------------------------------------------------------------- 1 | https://eugenkiss.github.io/7guis/tasks/#crud -------------------------------------------------------------------------------- /src/examples/src/simple-component/TodoItem/template.html: -------------------------------------------------------------------------------- 1 |{{ childMsg }}
3 | -------------------------------------------------------------------------------- /src/examples/src/circle-drawer/description.txt: -------------------------------------------------------------------------------- 1 | https://eugenkiss.github.io/7guis/tasks/#circle -------------------------------------------------------------------------------- /src/examples/src/flight-booker/description.txt: -------------------------------------------------------------------------------- 1 | https://eugenkiss.github.io/7guis/tasks/#flight -------------------------------------------------------------------------------- /src/tutorial/src/step-3/_hint/App/template.html: -------------------------------------------------------------------------------- 1 |Count is: {{ counter.count }}
3 | -------------------------------------------------------------------------------- /src/about/images/ben-hong.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/src/about/images/ben-hong.jpeg -------------------------------------------------------------------------------- /src/about/images/evan-you.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/src/about/images/evan-you.jpeg -------------------------------------------------------------------------------- /src/tutorial/src/step-12/ChildComp/composition.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | msg: String 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/tutorial/src/step-3/App/template.html: -------------------------------------------------------------------------------- 1 | 2 |{{ text }}
3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 75 6 | } 7 | -------------------------------------------------------------------------------- /src/examples/src/simple-component/TodoItem/composition.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | todo: Object 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/examples/src/simple-component/TodoItem/options.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | todo: Object 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/tutorial/src/step-13/_hint/App/template.html: -------------------------------------------------------------------------------- 1 |{{ childMsg }}
3 | -------------------------------------------------------------------------------- /src/tutorial/src/step-15/App/style.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align: center; 3 | cursor: pointer; 4 | margin-top: 3em; 5 | } 6 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description of Problem 2 | 3 | ## Proposed Solution 4 | 5 | ## Additional Information 6 | 7 | -------------------------------------------------------------------------------- /src/examples/src/counter/App/options.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | count: 0 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/examples/src/grid/description.txt: -------------------------------------------------------------------------------- 1 | Um exemplo de criação de um componente de grade reutilizável e utilizando-o com dado externo. -------------------------------------------------------------------------------- /src/examples/src/handling-input/description.txt: -------------------------------------------------------------------------------- 1 | Este exemplo demonstra a manipulação da entrada do utilizador com a diretiva v-on. -------------------------------------------------------------------------------- /src/tutorial/src/step-5/App/template.html: -------------------------------------------------------------------------------- 1 | 2 |{{ text }}
3 | -------------------------------------------------------------------------------- /.github/contributing/oxford-comma.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/.github/contributing/oxford-comma.jpg -------------------------------------------------------------------------------- /.vitepress/inlined-scripts/uwu.js: -------------------------------------------------------------------------------- 1 | if (location.search.includes('?uwu')) { 2 | document.documentElement.classList.add('uwu') 3 | } 4 | -------------------------------------------------------------------------------- /src/examples/src/tree/App/style.css: -------------------------------------------------------------------------------- 1 | .item { 2 | cursor: pointer; 3 | line-height: 1.5; 4 | } 5 | .bold { 6 | font-weight: bold; 7 | } -------------------------------------------------------------------------------- /src/guide/components/images/slots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/src/guide/components/images/slots.png -------------------------------------------------------------------------------- /src/public/images/partners/curotec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/src/public/images/partners/curotec.png -------------------------------------------------------------------------------- /src/public/images/partners/epicmax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-translations/docs-pt/HEAD/src/public/images/partners/epicmax.png -------------------------------------------------------------------------------- /src/tutorial/src/step-4/App/options.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | count: 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/tutorial/src/step-6/App/template.html: -------------------------------------------------------------------------------- 1 | 2 |Todo id: {{ todoId }}
2 | 3 |Loading...
4 |{{ todoData }}
5 |
--------------------------------------------------------------------------------
/src/tutorial/src/step-6/App/options.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data() {
3 | return {
4 | awesome: true
5 | }
6 | },
7 | methods: {
8 | toggle() {
9 | // ...
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/examples/src/grid/App/template.html:
--------------------------------------------------------------------------------
1 |
4 | Current component: B
9 | Message is: {{ msg }} 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/tutorial/src/step-15/App/options.js: -------------------------------------------------------------------------------- 1 | import JSConfetti from 'js-confetti' 2 | 3 | const confetti = new JSConfetti() 4 | 5 | export default { 6 | mounted() { 7 | this.showConfetti() 8 | }, 9 | methods: { 10 | showConfetti() { 11 | confetti.addConfetti() 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/tutorial/src/step-2/_hint/App/composition.js: -------------------------------------------------------------------------------- 1 | import { reactive, ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const counter = reactive({ count: 0 }) 6 | const message = ref('Hello World!') 7 | 8 | return { 9 | counter, 10 | message 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/tutorial/src/step-14/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | import ChildComp from './ChildComp.vue' 3 | 4 | export default { 5 | components: { 6 | ChildComp 7 | }, 8 | setup() { 9 | const msg = ref('from parent') 10 | 11 | return { 12 | msg 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/tutorial/src/step-4/_hint/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const count = ref(0) 6 | 7 | function increment() { 8 | count.value++ 9 | } 10 | 11 | return { 12 | count, 13 | increment 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/tutorial/src/step-5/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const text = ref('') 6 | 7 | function onInput(e) { 8 | text.value = e.target.value 9 | } 10 | 11 | return { 12 | text, 13 | onInput 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/examples/src/svg/PolyGraph/template.html: -------------------------------------------------------------------------------- 1 |Current component: A
9 | count: {{ count }} 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/partners/[partnerId].paths.ts: -------------------------------------------------------------------------------- 1 | import partners from './partners.json' 2 | import { normalizeName } from './components/utils' 3 | 4 | export default { 5 | paths: partners.map((p) => { 6 | return { 7 | params: { 8 | partnerId: normalizeName(p.name) 9 | } 10 | } 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /src/examples/src/cells/App/options.js: -------------------------------------------------------------------------------- 1 | import Cell from './Cell.vue' 2 | import { cells } from './store.js' 3 | 4 | export default { 5 | components: { 6 | Cell 7 | }, 8 | data() { 9 | return { 10 | cols: cells.map((_, i) => String.fromCharCode(65 + i)), 11 | cells 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/tutorial/src/step-12/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | import ChildComp from './ChildComp.vue' 3 | 4 | export default { 5 | components: { 6 | ChildComp 7 | }, 8 | setup() { 9 | const greeting = ref('Hello from parent') 10 | 11 | return { 12 | greeting 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/tutorial/src/step-13/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | import ChildComp from './ChildComp.vue' 3 | 4 | export default { 5 | components: { 6 | ChildComp 7 | }, 8 | setup() { 9 | const childMsg = ref('No child msg yet') 10 | 11 | return { 12 | childMsg 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/tutorial/src/step-6/_hint/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const awesome = ref(true) 6 | 7 | function toggle() { 8 | awesome.value = !awesome.value 9 | } 10 | 11 | return { 12 | awesome, 13 | toggle 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/tutorial/src/step-9/_hint/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref, onMounted } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const pElementRef = ref(null) 6 | 7 | onMounted(() => { 8 | pElementRef.value.textContent = 'mounted!' 9 | }) 10 | 11 | return { 12 | p 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.vitepress/inlined-scripts/perfops.js: -------------------------------------------------------------------------------- 1 | ;((d) => { 2 | window.rum = { key: 'a9efvfeu' } 3 | var script = d.createElement(script) 4 | script.src = '/rom3.min.js' 5 | script.type = 'text/javascript' 6 | script.defer = true 7 | script.async = true 8 | d.getElementsByTagName('head')[0].appendChild(script) 9 | })(document) 10 | -------------------------------------------------------------------------------- /src/examples/src/cells/Cell/template.html: -------------------------------------------------------------------------------- 1 || 5 | | {{ c }} | 6 |
|---|---|
| {{ i - 1 }} | 11 |
12 | |
14 |
{{ canBook ? '' : 'A data de regresso deve ser depois da data de partida.' }}
12 | -------------------------------------------------------------------------------- /src/examples/src/conditionals-and-loops/App/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |A lista não está vazia, porém escondida.
10 |A lista está vazia.
11 | -------------------------------------------------------------------------------- /src/examples/src/markdown/App/composition.js: -------------------------------------------------------------------------------- 1 | import { marked } from 'marked' 2 | import { debounce } from 'lodash-es' 3 | import { ref, computed } from 'vue' 4 | 5 | export default { 6 | setup() { 7 | const input = ref('# hello') 8 | 9 | const output = computed(() => marked(input.value)) 10 | 11 | const update = debounce((e) => { 12 | input.value = e.target.value 13 | }, 100) 14 | 15 | return { 16 | input, 17 | output, 18 | update 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/examples/src/form-bindings/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const text = ref('Edit me') 6 | const checked = ref(true) 7 | const checkedNames = ref(['Jack']) 8 | const picked = ref('One') 9 | const selected = ref('A') 10 | const multiSelected = ref(['A']) 11 | 12 | return { 13 | text, 14 | checked, 15 | checkedNames, 16 | picked, 17 | selected, 18 | multiSelected 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/examples/src/hello-world/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | // A "ref" é uma fonte de dado reativa que guarda um valor. 6 | // Tecnicamente, não precisamos envolver uma sequência de caracteres 7 | // com ref() para exibe-la, mas veremos no próximo exemplo do porquê 8 | // ser preciso caso alguma vez tencionamos mudar o valor. 9 | const message = ref('Hello World!') 10 | 11 | return { 12 | message 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/examples/src/crud/App/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /src/examples/src/cells/Cell/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | import { cells, evalCell } from './store.js' 3 | 4 | export default { 5 | props: { 6 | c: Number, 7 | r: Number 8 | }, 9 | setup(props) { 10 | const editing = ref(false) 11 | 12 | function update(e) { 13 | editing.value = false 14 | cells[props.c][props.r] = e.target.value.trim() 15 | } 16 | 17 | return { 18 | cells, 19 | editing, 20 | evalCell, 21 | update 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/public/_headers: -------------------------------------------------------------------------------- 1 | /* 2 | X-Frame-Options: ALLOW-FROM https://staging.certification.vuejs.org https://certification.vuejs.org https://certificates.dev https://staging.certificates.dev https://alemira.com https://*.alemira.com 3 | Content-Security-Policy: frame-ancestors https://staging.certification.vuejs.org https://certification.vuejs.org https://certificates.dev https://staging.certificates.dev https://alemira.com https://*.alemira.com 4 | 5 | /assets/* 6 | cache-control: max-age=31536000 7 | cache-control: immutable 8 | -------------------------------------------------------------------------------- /src/tutorial/src/step-7/App/options.js: -------------------------------------------------------------------------------- 1 | // dar um `id` único à cada `todo` 2 | let id = 0 3 | 4 | export default { 5 | data() { 6 | return { 7 | newTodo: '', 8 | todos: [ 9 | { id: id++, text: 'Learn HTML' }, 10 | { id: id++, text: 'Learn JavaScript' }, 11 | { id: id++, text: 'Learn Vue' } 12 | ] 13 | } 14 | }, 15 | methods: { 16 | addTodo() { 17 | // ... 18 | this.newTodo = '' 19 | }, 20 | removeTodo(todo) { 21 | // ... 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/examples/src/temperature-converter/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const c = ref(0) 6 | const f = ref(32) 7 | 8 | function setC(e, v = +e.target.value) { 9 | c.value = v 10 | f.value = v * (9 / 5) + 32 11 | } 12 | 13 | function setF(e, v = +e.target.value) { 14 | f.value = v 15 | c.value = (v - 32) * (5 / 9) 16 | } 17 | 18 | return { 19 | c, 20 | f, 21 | setC, 22 | setF 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/partners/components/utils.ts: -------------------------------------------------------------------------------- 1 | export function track() { 2 | fathom.trackGoal('TTDUIE6G', 0) 3 | } 4 | 5 | export function normalizeName(name: string) { 6 | return name.toLowerCase().replace(/\s+/g, '') 7 | } 8 | 9 | export function getHero(img: string | undefined, name: string) { 10 | return `/images/partners/${img || `${normalizeName(name)}-hero.jpg`}` 11 | } 12 | 13 | export function getLogo(img: string, flip = false) { 14 | if (flip) img = img.replace(/(\.\w+$)/, '-dark$1') 15 | return `/images/partners/${img}` 16 | } 17 | -------------------------------------------------------------------------------- /.vitepress/inlined-scripts/restorePreference.js: -------------------------------------------------------------------------------- 1 | ;(() => { 2 | const restore = (key, cls, def = false) => { 3 | const saved = localStorage.getItem(key) 4 | if (saved ? saved !== 'false' : def) { 5 | document.documentElement.classList.add(cls) 6 | } 7 | } 8 | restore('vue-docs-prefer-composition', 'prefer-composition', true) 9 | restore('vue-docs-prefer-sfc', 'prefer-sfc', true) 10 | 11 | window.__VUE_BANNER_ID__ = 'vueconfus2024' 12 | restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed') 13 | })() 14 | -------------------------------------------------------------------------------- /src/tutorial/src/step-10/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const todoId = ref(1) 6 | const todoData = ref(null) 7 | 8 | async function fetchData() { 9 | todoData.value = null 10 | const res = await fetch( 11 | `https://jsonplaceholder.typicode.com/todos/${todoId.value}` 12 | ) 13 | todoData.value = await res.json() 14 | } 15 | 16 | fetchData() 17 | 18 | return { 19 | todoId, 20 | todoData 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "bundler", 7 | "esModuleInterop": true, 8 | "resolveJsonModule": true, 9 | "allowJs": true, 10 | "strict": true, 11 | "noUnusedLocals": true, 12 | "skipLibCheck": true, 13 | "jsx": "preserve", 14 | "baseUrl": ".", 15 | "paths": { 16 | "@theme/*": [".vitepress/theme/*"] 17 | } 18 | }, 19 | "include": ["env.d.ts", "src/**/*", ".vitepress/**/*"] 20 | } 21 | -------------------------------------------------------------------------------- /src/examples/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | page: true 3 | title: Exemplos 4 | aside: false 5 | footer: false 6 | returnToTop: false 7 | --- 8 | 9 | 22 | 23 |{{ stats }}
19 |
--------------------------------------------------------------------------------
/src/guide/built-ins/transition-demos/Basic.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | hello
12 |Move your mouse across this div...
19 |x: {{ x }}
20 || 5 | {{ capitalize(key) }} 6 | 7 | 8 | | 9 |
|---|
| 14 | {{entry[key]}} 15 | | 16 |
Nenhuma correspondência encontrada.
20 | -------------------------------------------------------------------------------- /src/examples/src/svg/PolyGraph/options.js: -------------------------------------------------------------------------------- 1 | import AxisLabel from './AxisLabel.vue' 2 | import { valueToPoint } from './util.js' 3 | 4 | export default { 5 | components: { 6 | AxisLabel 7 | }, 8 | props: { 9 | stats: Array 10 | }, 11 | computed: { 12 | // uma propriedade computada para os pontos do polígono 13 | points() { 14 | const total = this.stats.length 15 | return this.stats 16 | .map((stat, i) => { 17 | const { x, y } = valueToPoint(stat.value, i, total) 18 | return `${x},${y}` 19 | }) 20 | .join(' ') 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/examples/src/grid/App/composition.js: -------------------------------------------------------------------------------- 1 | import DemoGrid from './Grid.vue' 2 | import { ref } from 'vue' 3 | 4 | export default { 5 | components: { 6 | DemoGrid 7 | }, 8 | setup() { 9 | const searchQuery = ref('') 10 | const gridColumns = ['name', 'power'] 11 | const gridData = [ 12 | { name: 'Chuck Norris', power: Infinity }, 13 | { name: 'Bruce Lee', power: 9000 }, 14 | { name: 'Jackie Chan', power: 7000 }, 15 | { name: 'Jet Li', power: 8000 } 16 | ] 17 | 18 | return { 19 | searchQuery, 20 | gridColumns, 21 | gridData 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/tutorial/src/step-7/_hint/App/options.js: -------------------------------------------------------------------------------- 1 | // dar um `id` único à cada `todo` 2 | let id = 0 3 | 4 | export default { 5 | data() { 6 | return { 7 | newTodo: '', 8 | todos: [ 9 | { id: id++, text: 'Learn HTML' }, 10 | { id: id++, text: 'Learn JavaScript' }, 11 | { id: id++, text: 'Learn Vue' } 12 | ] 13 | } 14 | }, 15 | methods: { 16 | addTodo() { 17 | this.todos.push({ id: id++, text: this.newTodo }) 18 | this.newTodo = '' 19 | }, 20 | removeTodo(todo) { 21 | this.todos = this.todos.filter((t) => t !== todo) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/examples/src/tree/TreeItem/template.html: -------------------------------------------------------------------------------- 1 |{{ tweened.number.toFixed(0) }}
22 |2 | 3 | Paire o ponteiro do rato sobre mim por alguns segundos para ver o título saltar dinamicamente! 4 | 5 |
6 | 7 | 10 |11 | Isto deveria ser vermelho... porém clica-me para alterná-lo. 12 |
13 | 14 | 15 |16 | Isto deve ser verde, e deve alternar entre verde e azul sobre clique. 17 |
18 | -------------------------------------------------------------------------------- /src/examples/src/timer/App/composition.js: -------------------------------------------------------------------------------- 1 | import { ref, onUnmounted } from 'vue' 2 | 3 | export default { 4 | setup() { 5 | const duration = ref(15 * 1000) 6 | const elapsed = ref(0) 7 | 8 | let lastTime = performance.now() 9 | let handle 10 | const update = () => { 11 | const time = performance.now() 12 | elapsed.value += Math.min(time - lastTime, duration.value - elapsed.value) 13 | lastTime = time 14 | handle = requestAnimationFrame(update) 15 | } 16 | 17 | update() 18 | onUnmounted(() => { 19 | cancelAnimationFrame(handle) 20 | }) 21 | 22 | return { 23 | duration, 24 | elapsed 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/tutorial/src/step-8/App/options.js: -------------------------------------------------------------------------------- 1 | let id = 0 2 | 3 | export default { 4 | data() { 5 | return { 6 | newTodo: '', 7 | hideCompleted: false, 8 | todos: [ 9 | { id: id++, text: 'Learn HTML', done: true }, 10 | { id: id++, text: 'Learn JavaScript', done: true }, 11 | { id: id++, text: 'Learn Vue', done: false } 12 | ] 13 | } 14 | }, 15 | computed: { 16 | // ... 17 | }, 18 | methods: { 19 | addTodo() { 20 | this.todos.push({ id: id++, text: this.newTodo, done: false }) 21 | this.newTodo = '' 22 | }, 23 | removeTodo(todo) { 24 | this.todos = this.todos.filter((t) => t !== todo) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/examples/src/modal/Modal/template.html: -------------------------------------------------------------------------------- 1 |hello
12 || Código | 14 |Mensagem | 15 |
|---|---|
| 23 | | 24 | |
12 | Hello here is some bouncy text! 13 |
14 |vuejs/vue@{{ currentBranch }}
7 |
8 |
| 13 | | {{ c }} | 14 |
|---|---|
| {{ i - 1 }} | 19 |
20 | |
22 |
Ajustar o raio do circulo em ({{ selected.cx }}, {{ selected.cy }})
25 | 26 |
8 |
11 |
Nomes verificados: 20 |
{{ checkedNames }}
21 |
22 |
23 | 9 | Os parceiros da Vue são agências endossadas pela equipa da Vue que oferecem consultoria em Vue e serviços de desenvolvimento de primeira classe. Se a tua empresa estiver interessada em ser listada como uma parceira, faça o favor de 10 | registar o teu interesse aqui. 14 |
15 |6 | Gere exemplos para os novos projetos, impulsiona a tua credibilidade para os teus clientes, e apoie a sustentabilidade de longo prazo da Vue.js e do seu ecossistema. 7 |
8 | 12 | Torna-te um parceiro 13 | 14 |` atualizando-se ao digitar. 36 | 37 | Para simplificar os vínculos bidirecionais, a Vue fornece uma diretiva, `v-model`, a qual é essencialmente uma açúcar sintática para o que vimos acima: 38 | 39 | ```vue-html 40 | 41 | ``` 42 | 43 | A `v-model` sincroniza automaticamente o valor do `` com o estado vinculado, assim já não precisamos usar um manipulador de evento para isto. 44 | 45 | A `v-model` não funciona apenas sobre as entradas de texto (``), mas também sobre outros tipos de entrada tais como, caixas de confirmação (``), botões de rádio (``), e listas pendentes de seleção (`