当我在任意点上随机从一个组件移动到另一个组件时,vue 会给出此错误,然后我无法移动另一个组件。
此错误不在任何特定组件上,它可能在任何地方发生。
错误
Uncaught TypeError: Cannot use 'in' operator to search for 'path' in undefined
at Object.resolve (vue-router.esm-bundler.js?6c02:2728)
at matchView (index.esm.js?bec5:446)
at Array.find (<anonymous>)
at findViewItemByPath (index.esm.js?bec5:464)
at Object.findViewItemByRouteInfo (index.esm.js?bec5:424)
at Object.canStart (index.js?8a30:805)
at eval (ion-app_8.entry.js?49af:707)
at canStart (swipe-back-53c5a7dd.js?05d4:8)
at pointerDown (index-f49d994d.js?14e6:251)
Run Code Online (Sandbox Code Playgroud)
这是我的路由器index.js 文件
import { createRouter, createWebHistory } from '@ionic/vue-router';
import Tabs from '../views/Tabs.vue'
import SignIn from "@/views/Signin.vue";
import Signup from "@/views/Signup.vue";
import { TokenService } from "@/services/token.service";
const routes = [
{
path: '/',
redirect: '/tabs/tab1'
}, …Run Code Online (Sandbox Code Playgroud) 我正在尝试获取类输入字段的所有值。但它只返回一个字段值
html代码
<div id="mydiv">
<input class="seconds" type="text" value="40">
<input class="seconds" type="text" value="20">
<span class="countdown"></span>
</div>
Run Code Online (Sandbox Code Playgroud)
Javascript代码
<script src="{{ asset('js/vendor/jquery-3.1.0.min.js') }}"></script>
<script src="{{ asset('js/jquery.missofis-countdown.js') }}"></script>
<script>
var ek=$('.seconds').val();
console.log(ek);
$( '.countdown' ).countdown( {
from: ek, // 3 minutes (3*60)
to: 0, // stop at zero
movingUnit: 1000, // 1000 for 1 second increment/decrements
timerEnd: undefined,
outputPattern: '$day Day $hour : $minute : $second',
autostart: true,
});
</script>
Run Code Online (Sandbox Code Playgroud)
我想获取具有相同类的两个输入字段的值
我遇到的对象问题是,当我将对象分配给数据属性时,它会转换为代理对象。
\n这就是我正在做的事情
\n data() {\n return {\n msg: "",\n notifications: {},\n\n };\n },\n this.notifications = TokenService.getUserInfo().unread_notifications;\nRun Code Online (Sandbox Code Playgroud)\n这就是我接收对象的方式
\nProxy {0: {\xe2\x80\xa6}, 1: {\xe2\x80\xa6}, 2: {\xe2\x80\xa6}, 3: {\xe2\x80\xa6}, 4: {\xe2\x80\xa6}}\n[[Handler]]: Object\n[[Target]]: Array(5)\n[[IsRevoked]]: false\nRun Code Online (Sandbox Code Playgroud)\n是什么原因?
\n我在 Laravel 中使用 Vue。当我在 vue 代码中进行更改时,这些更改在我运行以下命令之前不会出现:
npm run production
Run Code Online (Sandbox Code Playgroud)
我想在没有这个命令的情况下使用 vue 或者至少一次就足够了
我有PurchaseOrderProduct模型从中获取类似的数据
PurchaseOrderProduct::with('products')
->with('warehouse_locations')
->with('productStatuses')
->with('purchase_orders')
->where('product_id', $request->product_id)
->where('free_qty', '>=', 1)
->get();
Run Code Online (Sandbox Code Playgroud)
现在在这个表中,我有一个expiry_date类型的列datei想要获取orderBy expiry_date最接近当前日期的数据。
意味着purchase_order_product到期日期最接近当前日期的应该排在第一位。
我在我的项目中使用条纹支付网关。当用户输入过期的卡号时,我试图显示异常错误。但它没有向我显示异常错误,而是向我显示 laravel 错误。注意:它不适用于任何类型的异常,而不仅仅是过期的卡号。
我正在使用 Stripe 提供的异常。
public function recharge(Request $request)
{
$this->validate($request, [
'amount' => 'required',
]);
$amount = $request->input('amount');
\Stripe\Stripe::setApiKey('key_here');
try {
$token = $_POST['stripeToken'];
$charge = \Stripe\Charge::create([
'amount' => $amount * 100,
'currency' => 'usd',
'description' => 'Example charge',
'source' => $token,
]);
$user = User::find(Auth::user()->id);
$user->deposit($amount);
Session::flash('success', 'Your Wallet is recharged!');
return back();
} catch (\Stripe\Error\Card $e) {
// Since it's a decline, \Stripe\Error\Card will be caught
$body = $e->getJsonBody();
$err = $body['error'];
print('Status is:' . $e->getHttpStatus() …Run Code Online (Sandbox Code Playgroud) laravel ×3
vue.js ×3
javascript ×2
vuejs3 ×2
eloquent ×1
jquery ×1
laravel-5 ×1
laravel-8 ×1
vue-router ×1
vue-router4 ×1