zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    vue render function

    https://vuejs.org/v2/guide/render-function.html

    {
      // Same API as `v-bind:class`, accepting either
      // a string, object, or array of strings and objects.
      class: {
        foo: true,
        bar: false
      },
      // Same API as `v-bind:style`, accepting either
      // a string, object, or array of objects.
      style: {
        color: 'red',
        fontSize: '14px'
      },
      // Normal HTML attributes
      attrs: {
        id: 'foo'
      },
      // Component props
      props: {
        myProp: 'bar'
      },
      // DOM properties
      domProps: {
        innerHTML: 'baz'
      },
      // Event handlers are nested under `on`, though
      // modifiers such as in `v-on:keyup.enter` are not
      // supported. You'll have to manually check the
      // keyCode in the handler instead.
      on: {
        click: this.clickHandler
      },
      // For components only. Allows you to listen to
      // native events, rather than events emitted from
      // the component using `vm.$emit`.
      nativeOn: {
        click: this.nativeClickHandler
      },
      // Custom directives. Note that the `binding`'s
      // `oldValue` cannot be set, as Vue keeps track
      // of it for you.
      directives: [
        {
          name: 'my-custom-directive',
          value: '2',
          expression: '1 + 1',
          arg: 'foo',
          modifiers: {
            bar: true
          }
        }
      ],
      // Scoped slots in the form of
      // { name: props => VNode | Array<VNode> }
      scopedSlots: {
        default: props => createElement('span', props.text)
      },
      // The name of the slot, if this component is the
      // child of another component
      slot: 'name-of-slot',
      // Other special top-level properties
      key: 'myKey',
      ref: 'myRef',
      // If you are applying the same ref name to multiple
      // elements in the render function. This will make `$refs.myRef` become an
      // array
      refInFor: true
    }
    
    

    attrs

    https://css-tricks.com/what-does-the-h-stand-for-in-vues-render-method/

    https://alligator.io/vuejs/introduction-render-functions/

    macOS & bash shell

    bash !== node


    Windows

    
    #!/usr/bin/env node
    
    echo "^-v-^ app is running in development env!" && npm run start
    
    

    MacOS

    
    #!/usr/bin/env bash
    
    echo "^-v-^ app is running in development env!" && npm run start
    
    
    # chmod +x
    
    $ chmod +x ./app.sh & sudo npm link & "app": "app.sh"
    
    # npm link
    $ npm link
    
    
  • 相关阅读:
    Spring读取properties内容
    SpringBoot全局异常处理
    Hibernate入门
    Oracle查询表及注释
    MySQL重复与不重复问题
    IDEA中other settings不见了
    01程序员修炼之道
    团队冲刺(四)
    单词字母查询频率
    学习进度(9)
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/10210341.html
Copyright © 2011-2022 走看看