Skip to content

update #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Per i traduttori:
La pagina landing/home è qui:

vuejs.org/themes/vue/layout/index.ejs


Pagine con esempi sono qui:

vuejs.org/source/examples/ ...

# vuejs.org

This site is built with [hexo](http://hexo.io/). Site content is written in Markdown format located in `source`. Pull requests welcome!
Expand All @@ -10,4 +20,4 @@ Start a dev server at `localhost:4000`:
$ npm install -g hexo-cli
$ npm install
$ hexo server
```
```
2 changes: 1 addition & 1 deletion source/api/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Vue.component('prop-validation-demo', {
The following component usage will result in two warnings: type mismatch for "size", and missing required prop "name".

``` html
<prop-validation-demoo size="hello">
<prop-validation-demo size="hello">
</prop-validation-demo>
```

Expand Down
2 changes: 1 addition & 1 deletion source/guide/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ As mentioned above, Vue observes data by converting properties with `Object.defi

These methods can be used to add / delete properties from observed objects while triggering the desired DOM updates. The difference between `$add` and `$set` is that `$add` will return early if the key already exists on the object, so just calling `obj.$add(key)` won’t overwrite the existing value with `undefined`.

A related note is that when you change a data-bound Array directly by setting indices (e.g. `arr[1] = value`), Vue will not be able to pick up the change. Again, you can use augmented methods to notify Vue.js about those changes. Observerd Arrays are augmented with two methods:
A related note is that when you change a data-bound Array directly by setting indices (e.g. `arr[1] = value`), Vue will not be able to pick up the change. Again, you can use augmented methods to notify Vue.js about those changes. Observed Arrays are augmented with two methods:

- `arr.$set(index, value)`
- `arr.$remove(index | value)`
Expand Down
2 changes: 1 addition & 1 deletion source/guide/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ var MyComponent = Vue.extend({
partials: {
// ...
},
effects: {
transitions: {
// ...
}
})
Expand Down
22 changes: 10 additions & 12 deletions source/guide/custom-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ Up till now we have used filters to transform values coming from the model and b

``` js
Vue.filter('currencyDisplay', {
currencyDisplay: {
// model -> view
// formats the value when updating the input element.
read: function(val) {
return '$'+val.toFixed(2)
},
// view -> model
// formats the value when updating the data.
write: function(val, oldVal) {
var number = +val.replace(/[^\d.]/g, '')
return isNaN(number) ? 0 : number
}
// model -> view
// formats the value when updating the input element.
read: function(val) {
return '$'+val.toFixed(2)
},
// view -> model
// formats the value when updating the data.
write: function(val, oldVal) {
var number = +val.replace(/[^\d.]/g, '')
return isNaN(number) ? 0 : number
}
})
```
Expand Down
2 changes: 1 addition & 1 deletion source/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ order: 16

2. You cannot define your own getter/setters on data objects. This isn't much of a problem because data objects are expected to be obtained from plain JSON and Vue.js provides computed properties.

3. Vue.js adds a few extra properties/methods to obsesrved objects: `__ob__`, `$add`, `$set` and `$delete`. These properties are inenumberable so they will not show up in `for ... in ...` loops. However if you overwrite them things will likely break.
3. Vue.js adds a few extra properties/methods to observed objects: `__ob__`, `$add`, `$set` and `$delete`. These properties are inenumberable so they will not show up in `for ... in ...` loops. However if you overwrite them things will likely break.

That's pretty much it. Accessing properties on the object is the same as before, `JSON.stringify` and `for ... in ...` loops will work as normal. 99.9% of the time you don't even need to think about it.

Expand Down
45 changes: 24 additions & 21 deletions themes/vue/layout/index.ejs
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<div id="hero">
<div class="inner">
<ul id="nav">
<li><a href="/guide/" class="nav-link">Guide</a></li>
<li><a href="/guide/" class="nav-link">Guida</a></li>
<li><a href="/api/" class="nav-link">API Reference</a></li>
<li><a href="/examples/" class="nav-link">Examples</a></li>
<li><a href="/examples/" class="nav-link">Esempi</a></li>
<li><a href="/blog/" class="nav-link">Blog</a></li>
<li><a href="http://cn.vuejs.org" class="nav-link">中文</a></li>
<li><a href="http://vuejs.org" class="nav-link">English</a></li>
<li><a href="http://jp.vuejs.org" class="nav-link">日本語</a></li>
<li><a href="http://cn.vuejs.org" class="nav-link">中文</a></li>

</ul>
<img id="logo" src="/images/logo.png">
<h1>Vue.js</h1>
<p class="desc">Vue.js is a library for building modern web interfaces. <br>It provides data-reactive components with a simple and flexible API.</p>
<p class="desc">Vue.js è una libreria che permette di creare interfacce web moderne.
<br>Fornisce componenti data-reactive con API semplici e flessibili.</p>
<p class="buttons">
<a href="/guide/installation.html" class="button">Install v<%- theme.vue_version %></a>
<a href="https://github.com/yyx990803/vue" target="_blank" class="button">Source on GitHub</a>
<a href="/guide/installation.html" class="button">Installa v<%- theme.vue_version %></a>
<a href="https://github.com/yyx990803/vue" target="_blank" class="button">Sorgente su GitHub</a>
</p>
<ul id="social">
<li><a href="https://twitter.com/vuejs" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @vuejs</a></li>
<li><a href="https://twitter.com/vuejs" class="twitter-follow-button" data-show-count="false" data-dnt="true">Segui @vuejs</a></li>
<li><iframe src="http://ghbtns.com/github-btn.html?user=yyx990803&repo=vue&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe></li>
<li class="last"><a href="https://gitter.im/yyx990803/vue" target="_blank"><img src="https://badges.gitter.im/Join%20Chat.svg"></a></li>
Expand All @@ -26,7 +29,7 @@
</div>

<div id="example">
<h2>10 Second Example</h2>
<h2>Esempio al volo</h2>
<div class="block">
<figure class="highlight lang-html"><table><tbody><tr><td class="gutter"><pre>1
2
Expand Down Expand Up @@ -77,33 +80,33 @@
<div id="features">
<div class="feats">
<div class="feat">
<h2><span class="icon simple"></span>Simple</h2>
<p>Write some HTML, grab some JSON, create a Vue instance, that's it.</p>
<h2><span class="icon simple"></span>Semplice</h2>
<p>Scrivi l'HTML, ricevi un JSON e crea un'instanza di Vue. È semplicissimo.</p>
</div>
<div class="feat">
<h2><span class="icon powerful"></span>Reactive</h2>
<h2><span class="icon powerful"></span>Reattivo</h2>
<p>Expressions & computed properties with transparent dependency tracking.</p>
</div>
<div class="feat">
<h2><span class="icon composable"></span>Components</h2>
<p>Compose your application with decoupled, reusable components.</p>
<h2><span class="icon composable"></span>Componenti</h2>
<p>Crea la tua applicazione utilizzando i componenti come meglio credi</p>
</div>
<div class="feat">
<h2><span class="icon compact"></span>Compact</h2>
<p>~22kb min+gzip, no dependency.</p>
<h2><span class="icon compact"></span>Leggero</h2>
<p>Vue pesa circa 22kb min+gzip e non dovrai installare nessuna dipendenza.</p>
</div>
<div class="feat">
<h2><span class="icon fast"></span>Fast</h2>
<h2><span class="icon fast"></span>Veloce</h2>
<p>Precise and efficient async batch DOM updates.</p>
</div>
<div class="feat">
<h2><span class="icon module"></span>Package Ready</h2>
<p>Install via NPM, Bower or Duo - leverage your favorite eco system!</p>
<h2><span class="icon module"></span>Pacchetti</h2>
<p>Installabile via NPM, Bower e Duo</p>
</div>
</div>
</div>
<div id="why">
<h2>You should try it out if you like:</h2>
<h2>Perchè dovrei provarlo?</h2>
<ul>
<li>Extendable Data bindings</li>
<li>Plain JS object models</li>
Expand All @@ -113,8 +116,8 @@
</ul>
</div>
<div id="footer">
<a class="start" href="/guide/index.html">Get Started</a>
<p>Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT License</a></p>
<a class="start" href="/guide/index.html">Inizia subito</a>
<p>Rilasciato sotto la <a href="http://opensource.org/licenses/MIT" target="_blank">licenza MIT</a></p>
<p>Copyright (c) <%- date(Date.now(), 'YYYY') %> <a href="http://evanyou.me" target="_blank">Evan You</a></p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions themes/vue/layout/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=vuejs" id="_carbonads_js"></script>
</div>
<%- page.content %>
<div class="footer">Caught a mistake or want to contribute to the documentation? <a href="https://github.com/vuejs/vuejs.org" target="_blank">Fork this site on Github</a>!</div>
</div>
<div class="footer">Hai scovato un errore o vuoi semplicemente contribuire alla documentazione? <a href="https://github.com/vuejs/vuejs.org" target="_blank">Forkalo su Github</a>!</div>
</div>
4 changes: 2 additions & 2 deletions themes/vue/layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%- partial('partials/main_menu') %>
</ul>
<div class="list">
<h2>Recent Posts</h2>
<h2>Post recenti</h2>
<ul>
<% site.posts.sort('date', -1).limit(10).each(function (post) { %>
<li>
Expand All @@ -25,4 +25,4 @@
</div>
<h4><%- page.date.format('MMM D[,] YYYY') %></h4>
<%- page.content %>
</div>
</div>