index.vue 842 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <script>
  2. import Prompt from '!!raw-loader!./prompt.md'
  3. import Vue from 'vue'
  4. import {
  5. getStaticPageList,
  6. getStaticPageDetail,
  7. getMenuInfo
  8. } from '@/api/static_page'
  9. export default Vue.extend({
  10. name: 'StaticPagePlugin',
  11. data() {
  12. return {
  13. type: 'tool',
  14. // tool:methods内所有方法将作为AI能力加载
  15. // page:template将被注册为页面,与Vue页面无异
  16. // plugin:template将被加载至AI助手的小工具中
  17. prompt: Prompt
  18. }
  19. },
  20. methods: {
  21. getPageList(data) {
  22. return getStaticPageList(data)
  23. },
  24. getPageData(data) {
  25. return getStaticPageDetail(data)
  26. },
  27. getPageMenuInfo(data) {
  28. return getMenuInfo({
  29. data,
  30. route_path: 'layout_menu.index'
  31. })
  32. }
  33. }
  34. })
  35. </script>
  36. <template />
  37. <style scoped lang="scss">
  38. </style>