render-options.uvue 683 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1
<script lang="uts">
DCloud-WZF's avatar
DCloud-WZF 已提交
2
import CompForHFunction from '@/components/CompForHFunction.uvue'
DCloud-WZF's avatar
DCloud-WZF 已提交
3
export default {
D
DCloud_LXH 已提交
4
  data() {
DCloud-WZF's avatar
DCloud-WZF 已提交
5 6 7 8 9
    return {
      msg: 'default msg'
    }
  },
  render(): VNode {
D
DCloud_LXH 已提交
10
    return h('view', { class: 'page' }, [
DCloud-WZF's avatar
DCloud-WZF 已提交
11
      h(CompForHFunction, {}, (): VNode[] => [h('text', { class: 'comp-slot' }, 'component slot')]),
DCloud-WZF's avatar
DCloud-WZF 已提交
12
      h('text', { class: 'uni-common-mt msg', style: { color: 'blue' } }, this.msg),
D
DCloud_LXH 已提交
13 14 15 16 17 18 19 20 21 22 23
      h(
        'button',
        {
          class: 'uni-common-mt btn',
          type: 'primary',
          onClick: () => {
            this.msg = 'new msg'
          }
        },
        'click'
      )
DCloud-WZF's avatar
DCloud-WZF 已提交
24 25 26 27 28
    ])
  }
}
</script>

DCloud-WZF's avatar
DCloud-WZF 已提交
29
<style>
DCloud-WZF's avatar
DCloud-WZF 已提交
30 31 32
.btn {
  color: red;
}
D
DCloud_LXH 已提交
33
</style>