<template>
  <el-form label-width="160px" style="margin-top:180px;">
      <el-form-item label="分页条类型：" >
        <el-radio-group v-model="type">
          <el-radio :label="'list'">列表页分页</el-radio>
          <el-radio :label="'detail'">详细页分页</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
</template>
<script>
/* eslint-disable no-template-curly-in-string */
export default {
  data() {
    return {
      type: 'list'
    }
  },
  methods: {
    getCode() {
      if (this.type === 'list') {
        return '<cms:pagebar></cms:pagebar>'
      } else {
        let str = '<cms:articlenavbar>\n'
        str += '  <z:list>\n'
        str += "    <z:if condition='${ContentPageIndex==ArticleNavBar.Index}'>\n"
        str += "      <span class='current'><z:eval expression='${ArticleNavBar.Index+1}'/></span>\n"
        str += '    </z:if>\n'
        str += '    <z:else>\n'
        str += "      <a href='${ArticleNavBar.Link}'><z:eval expression='${ArticleNavBar.Index+1}'/></a>\n"
        str += '    </z:else>\n'
        str += '  </z:list>\n'
        str += '</cms:articlenavbar>'
        return str
      }
    },
    init() {

    }
  }
}
</script>
