随笔分类 - vue.js
摘要:1.项目结构 2.根据后端api编写 super_cmdb/api/api.js import axios from 'axios' var boamp_api_address = 'http://127.0.0.1:8001'; export function getVersionList() {
阅读全文
摘要:vim demon03.vue <template> <div class="home"> </div> </template> <script> import axios from 'axios' export default { name: 'demon03', components: {},
阅读全文
摘要:vim demon02.vue <template> <div class="home"> </div> </template> <script> import axios from 'axios' export default { name: 'demon02', components: {},
阅读全文
摘要:vim demon01.vue <template> <div class="demon01"> </div> </template> <script> /* axios请求方法:get,post,put,patch,delete get: 获取数据 post: 提交数据(表单提交,文件上传) pu
阅读全文
摘要:1.安装node 下载地址:http://nodejs.cn/download/,一般选择LTS版本【LTS是长期支持(Long Term Support)的缩写】 安装方法: windos:直接执行 .msi 安装包 linux:tar xf node-v14.12.0-linux-x64.tar
阅读全文
摘要:使用 mounted:function () {} 访问页面时自动触发函数内容 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Index</title> <script src="static/js/vue
阅读全文
摘要:1.后端python django代码: import json from django.shortcuts import HttpResponse from django.http import JsonResponse from databases_models import models fr
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>vue</title> <script src="vue.js"></script> </head> <!-- 1.绑定事件函数: v-on:click="ha
阅读全文