随笔分类 -  Vue

摘要:代码块存档 //扫描框 <view class="scanCodeBox"> <input class="inputContent" type="number" @blur="loseFocus" :disabled="false" :value="textValue" placeholder="请 阅读全文
posted @ 2025-03-26 10:08 格林格林 阅读(84) 评论(0) 推荐(0)
摘要:父组件 uni.$on('update', function (data) { console.log('监听到事件来自 update ,携带参数 msg 为:' + data.msg); getListdata(resData.value); }) 子组件 function click(){ un 阅读全文
posted @ 2025-03-12 09:30 格林格林 阅读(72) 评论(0) 推荐(0)
摘要:import { useStore } from 'vuex'; let store = useStore(); const item = computed(() => { return { name: store.state.printerName, deviceId: store.state.d 阅读全文
posted @ 2025-03-06 15:35 格林格林 阅读(23) 评论(0) 推荐(0)
摘要:需求:按PDA的扫码键,把扫码内容填入input中 scanner.js 扫描工具类 let main; let filter; let receiver; let tag = false; /** * 开始广播监听扫码 */ const start = () => { /* #ifdef APP- 阅读全文
posted @ 2025-02-14 15:39 格林格林 阅读(397) 评论(0) 推荐(0)
摘要:A页面跳转B页面 A页面 function toDetail(value) { console.log('click'); let chuansVal = encodeURIComponent(JSON.stringify(value)); console.log(chuansVal); uni.n 阅读全文
posted @ 2025-02-06 16:25 格林格林 阅读(471) 评论(0) 推荐(0)
摘要:存档备用 orderList:{ return(){ this.orderList.filter((item)=> item.state '2'); } } 阅读全文
posted @ 2021-11-08 16:49 格林格林 阅读(27) 评论(0) 推荐(0)
摘要:组件之间的关系 1. 父子关系 1.1 父传子——使用自定义属性 props里的值都不建议去修改 //父组件 <son :msg="message" :user="userinfo"></son> data(){ return{ message:'hello', userinfo:{ name:'张 阅读全文
posted @ 2021-09-23 01:07 格林格林 阅读(151) 评论(0) 推荐(0)
摘要:1. 什么是前端路由 Hash地址(锚链接#)与组件之间的对应关系 <a href="#a"></a> <div id="a"></div> Hash地址中#往后的部分就是hash地址 http://localhost:8080/#/Home Hash地址中/往后的参数项,叫做路径参数 http:/ 阅读全文
posted @ 2021-09-23 01:04 格林格林 阅读(72) 评论(0) 推荐(0)
摘要:babel.config.js module.exports = { presets: [ '@vue/cli-plugin-babel/preset', ["@babel/preset-env", { "modules": false }] ], "plugins": [ [ "component 阅读全文
posted @ 2021-09-18 22:28 格林格林 阅读(103) 评论(0) 推荐(0)