摘要:app. config . globalProperties . $request = request ; 组件中: const { ctx } = getCurrentInstance() ; ctx . $request. get("/api/users/list",params );
阅读全文
摘要:首先 import XLSX from "xlsx"; 然后 const btnTo = () => { const a = tableData.value?.map((item) => { return [item.name, item.name2, item.name3; }); const f
阅读全文
摘要:<a-select v-model:value="formState.deptId" :getPopupContainer="triggerNode => {return triggerNode.parentNode || document.body}" > <a-select-option v-f
阅读全文
摘要:const data1 = function1({ id: "" }); const data2 = function2({ deptId: ""}); Promise.all([data1, data2]).then((res) => { console.log(res); };
阅读全文
摘要:<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol"> </a-form> label-col是label 标签布局 不做响应式布局 :label-col="{ style: { width: `${'9
阅读全文
摘要:不要通过为value值赋空字符串来实现清空效果,要赋值undefined的来实现清空。
阅读全文
摘要:::v-deep(.类名称){ padding: 20px 24px 0px 24px; } 写多个类名时,中间不可以有空格。
阅读全文
摘要:在父组件中const handleFunction= (e) => { 相关代码};provide("handleFunction",handleFunction); const fn = inject('handleFunction',Function,true); 然后调用方法fn fn(参数)
阅读全文
摘要:可以使用v-model来实现,当然也可以不适用v-model。v-model其实是一种简写形式。 <Component v-model="faData" /> 与下面一样 <Component :modelValue="faData" @update:modelValue="faData = $ev
阅读全文
摘要:https://animate.style/动画库的官方网址。在首页可以看到各种动画的名称,点击一下可以预览动画的效果。 安装 有三种方式:npm $ npm install animate.css --save yarn: $ yarn add animate.css CDN 直接添加到网页: <
阅读全文
摘要:当接口返回的数据有很多条数据需要使用到插槽进行相似的处理时,可以使用v-for对插槽进行循环。 <template v-for="name in ['a','b','c','d','e','f',]" #[name]="{record}" :key="name" > {{record.dataLis
阅读全文