随笔分类 - Vue 合集
摘要:1、通过命令行报错的,直接下载压缩包 pnpm dlx nuxi init <project-name> 压缩包地址:https://codeload.github.com/nuxt/starter/tar.gz/refs/heads/v3 2、安装插件 1、安装unocss pnpm instal
阅读全文
摘要:写法一: import type { myOrderItem } from '@/API/pages_mine/myOrder/types'; const props = defineProps({ item: { type: Object as PropType<myOrderItem>, def
阅读全文
摘要:子组件 // 组件名称:discountModel // 格式化数据 const fetchData = async () => { const { code, result } = await remind(); if(code 200) { data.value = result emit('u
阅读全文
摘要:更新方法,onLaunch或者onShow(推荐写在onShow内)调用就可以 const updateManagerFn = () => { const updateManager = uni.getUpdateManager(); updateManager.onCheckForUpdate(f
阅读全文
摘要:自定义样式使用第二种方式 第一种:wx.enableAlertBeforeUnload 在开发者工具中预览效果 微信小程序官网:点我 onShow(() => { wx.enableAlertBeforeUnload({ message: "返回上页时弹出对话框", success: functio
阅读全文
摘要:Vue3 子组件修改父组件传过来的值 // 父组件 <demo v-model:num="num" v-model:arr="arr"></demo> // 子组件 const prop=defineProps({ num: { type: Number, default:0 } }) const
阅读全文
摘要:使用网站 七牛云token生成:点我 七牛云上传接口错误码:点我 七牛云存储区域上传地址:点我 七牛云在线生成token 一般是后端生成,使用接口获取(放在后端比较安全) // 获取七牛云token export async function getQiniuToken() { const url
阅读全文
摘要:vue3 纯SCSS 实现环形进度条 <template> <view class="flex align-center diygw-col-24 justify-center"> <view class="progress-circle" :class="`progress-${innerPerc
阅读全文
摘要:安装pinia pnpm install pinia pnpm install pinia-plugin-persistedstate 使用pinia 根目录下创建store文件夹,新家moudules文件夹和index.ts文件,如图: index.ts 文件 // store/index.ts
阅读全文
摘要:<template> <div class="turntable" v-wechat-title="$route.meta.title"> <!-- 转盘包裹 --> <div class="rotate"> <!-- 转盘图片 --> <image class="dish" src="../../
阅读全文
摘要:<template> <view class="marquee"> <view class="marquee-inner"> <span v-for="(item, index) of textList" :key="index">{{ item.text }}</span> <!-- 复制一份内容
阅读全文
摘要:> 可以使用插件,也可以使用源码 注意*:插件下面的第一个标签必须是 el-table 转载的是别人的文章,看底部,文章传送门,实测好用 ## 源码 ```js ``` ## 使用 ```js virtualList = renderData"> ... import VirtualScroll f
阅读全文
摘要:## template 代码 ```js ``` ## data 下拉数据: ```js batchList: { list: [], total: 0, pageNo: 1, pageSize: 100 }, ``` ## methods 方法: ```js import { uniqBy } f
阅读全文
摘要:## 代码 ```js methods: { // 获取行数 getRow(val) { let row = 0 val.split('\n').forEach(item => { if (item.length 0) { row += 1 //如果一行只有回车符就是行数增加一行 } else {
阅读全文
摘要:效果图 搜索前: 搜索后: 使用 安装插件 pinyin-match: npm install pinyin-match --save 下拉: <el-select v-model="form.robot" placeholder="机器人" @change="robotSearch" filter
阅读全文
摘要:第一种,JS 1、判断dom this.$refs.squareRef.addEventListener('wheel', this.addScrolbarFn, false) addScrolbarFn(event) { event.stopPropagation() const dom = th
阅读全文
摘要:效果 排序三角组件 <template> <div class="order"> <div class="order-text" @click="textBtnFn"> <slot></slot> </div> <div class="order-icon" @click="nabFn"> <div
阅读全文
摘要:传送门:https://blog.csdn.net/weixin_40973138/article/details/106081946 IP地址查看传送门:https://site.ip138.com/raw.githubusercontent.com/
阅读全文

浙公网安备 33010602011771号