vue
安和桥北AN
努力!奋斗!
展开
-
vue模板组件递归
<template> <div class="ReplyChild"> <div v-for="(item, key) in Data" :key="key"> <ForeignUser :UID="item.CUID"> <teplate slot-scope="s"> //递归出口 <div v-if="item.PCID == Cid" @click="chil原创 2021-12-31 11:23:52 · 659 阅读 · 0 评论 -
vue3 挂载全局组件,函数方式调用
//组件import sign from "./Sign.vue"import { createApp } from 'vue'import vant from "vant"interface Option{ Name?: string; content?: string; Show?:Boolean}function mountContent (option = {} as Option) {//创建div来当做组件容器 let dom = document.createE原创 2021-12-30 11:28:38 · 1992 阅读 · 0 评论 -
docker安装宝塔自动部署vue
1.docker安装centos//开放端口并挂载docker run -i -t -d --name baota01 -p 21:20 -p 81:80 -p 444:443 -p 888:888 -p 7777:8888 --privileged=true -v /var/baota:/www centos2.安装宝塔面板yum install -y wget && wget -O install.sh http://download.bt.cn/install/install原创 2021-11-21 23:35:38 · 413 阅读 · 0 评论 -
vue+ts 混入(mixin)
1.新建文件mixin.tsimport { Component, Vue } from "vue-property-decorator";@Component({ filters: { Test(arg: string) { return arg + " 我来刷点存在感"; } }})export class MyMixin extends Vue { beforeCreate() { console.log("mixins,beforeCrea原创 2021-10-11 16:55:24 · 3076 阅读 · 1 评论 -
vue命名插槽
<Hello> <template slot="name" slot-scope="s"> <slot name="name" v-bind="s"></slot> </template></Hello>//调用<Hello> <template #name slot-scope="s"> 插槽 </template></Hello>原创 2021-09-26 13:44:04 · 576 阅读 · 0 评论 -
vue获取方法默认值
$emit("function",data)getFunctiom(v){ return v}//调用const rs = this.getFunctiom(Event)//rs等于返回值原创 2021-09-13 18:11:00 · 870 阅读 · 0 评论 -
vue跨域
vue.config.jsconst config = {devServer: { proxy: { "/api": { //为用于替换的的标识字符串 target: "https://fxpc.mem.gov.cn", //Axios跨域请求的IP changeOrigin: true, ws: true, pathRewrite: { "^/api"原创 2021-09-02 10:46:03 · 88 阅读 · 0 评论