Skip to content
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

Vue.js 1.0 (Fix #235) #237

Merged
merged 38 commits into from
Nov 12, 2015
Merged

Vue.js 1.0 (Fix #235) #237

merged 38 commits into from
Nov 12, 2015

Conversation

noirbizarre
Copy link
Contributor

This pull-request migrate from vue.js 0.12 to vue.js 1.0.

To migrate to 1.0.0:

  • Update dependencies for migration (vue.js 1.0.0-migrate)
  • Directive Arguments: <div v-on="click: doThis"> to <div @click="doThis">
    • v-on: <div v-on="click: doThis"> to <div @click="doThis">
    • v-attr: <div v-attr="name: value"> to <div :name="value">
    • v-class: <div v-class="myClass: true"> to <div :class="{myClass: true}">
    • v-repeat changes to v-for. Iterating without alias is deprecated
    • v-el="name" becomes v-el:name and vm.$$ becomes vm.$els
    • v-ref="name" becomes v-ref:name and vm.$ becomes vm.$refs
  • Literal Directives: <div v-dirname="abc"> to <div v-dirname.literal="abc">
  • Attribute Bindings: <component is="{{view}}"></component> to <component v-bind:is="view"></component>
  • Props: prop="{{expression to :prop="expression
  • Shorthands: v-bind => : and v-on => @
  • Component API Changes: <content> to <slot>, etc
  • Filter Changes (orderBy not in use)
  • General API Changes: prefix deprecated, etc:
    • Remove inherit: true
    • Remove Vue.options.replace = false;
  • Move to vue-router
  • Need refactoring:
    • Community resource modal and routing
    • Disussions and Issues modals (and routing)
    • Membership widget (dynamic v-el on response textarea)
  • Use latest dependencies instead of temporary "migrate" ones.
  • Fix wizards components strict scoping
  • Fix List/PageList sort bindings

Quick reference for syntax binding

davidbgk added a commit that referenced this pull request Oct 29, 2015
@davidbgk
Copy link
Member

v-attr="data-content within horizontal and vertical fields to discuss given that:

Props with the data- prefix are now longer supported.

@@ -35,11 +35,13 @@
<content-header meta="{{meta}}"></content-header>
<!-- Notifications -->
<div v-if="notifications.length > 0" class="notification-zone">
<alert-box v-repeat="notifications"></alert-box>
<alert-box v-for="n in notifications"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid single letter vars.

- Use proper binding syntax when needed
- Deduplicate data and props
- Fix some slots
- added some missing slots
- process router parameters
- deduplicate data and props
- use proper binding syntax
- fix array on empty models from schema
@noirbizarre
Copy link
Contributor Author

Now, I know what it means. Before you could write this to set properties:

<my-component data-prop="value" />

It's not possible anymore.

In our case, we simply make a binding on data-content, so we just write:

<div :data-content="content"></div>

@davidbgk
Copy link
Member

davidbgk commented Nov 2, 2015

Thanks, good to know :)

@davidbgk
Copy link
Member

r+, LGTM!

noirbizarre added a commit that referenced this pull request Nov 12, 2015
@noirbizarre noirbizarre merged commit 50e6eb5 into dev Nov 12, 2015
@davidbgk davidbgk deleted the vuejs-1.0 branch May 12, 2016 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants