jquery.model.list-api

本文详细介绍了 jQuery Model.List 插件的功能和使用方法,包括如何创建模型列表类、实现辅助函数、发送 AJAX 请求、监听事件等核心特性。同时展示了如何通过插件管理模型实例集合,快速插入 HTML,以及如何利用 Cookie 和本地存储来持久化模型列表。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jQuery.Model.List  class    

plugin: jquery/model/list

download: jQuery.Model.List

test: qunit.html

Source

Model.Lists manage a lists (or arrays) of model instances.Similar to $.Model,they are used to:

  • create events when a list changes
  • make Ajax requests on multiple instances
  • add helper function for multiple instances (ACLs)

The todoapp demonstrates using a $.Controller to implement an interface for a$.Model.List.

Creating A List Class

Create a `$.Model.List class for a$.Model like:

$.Model('Todo')
$.Model.List('Todo.List',{
  // static properties
},{
  // prototype properties
})

This creates a Todo.List class for the Todoclass. This creates some nifty magic that we will see soon.

static properties aretypically used to describe how a list makes requests. prototypeproperties are helper functions that operate on an instance of a list.

Make a Helper Function

Often, a user wants to select multiple items on a page andperform some action on them (for example, deleting them). The app needs toindicate if this is possible (for example, by enabling a "DELETE"button).

If we get todo data back like:

// GET /todos.json ->
[{
  "id" : 1,
  "name" : "dishes",
  "acl" : "rwd"
},{
  "id" : 2,
  "name" : "laundry",
  "acl" : "r"
}, ... ]

We can add a helper function to let us know if we candelete all the instances:

$.Model.List('Todo.List',{
 
},{
   canDelete : function(){
     return this.grep(function(todo){
       return todo.acl.indexOf("d") != 0
     }).length == this.length
   }
})

canDelete gets a listof all todos that have d in their acl. If all todos have d, then canDeletereturns true.

Get a List Instance

You can create a model list instance by using newTodo.List( instances ) like:

var todos = new Todo.List([
  new Todo({id: 1, name: ...}),
  new Todo({id: 2, name: ...}),
]);

And call canDelete on it like:

todos.canDelete() //-> boolean

BUT! $.Model, $.fn.models,and $.Model.List are designed to work with each other.

When you use Todo.findAll, it will callbackwith an instance of Todo.List:

Todo.findAll({}, function(todos){
   todos.canDelete() //-> boolean
})

If you are adding the model instance to elements andretrieving them back with $().models(), it will return a instanceof Todo.List. The following returns if the checked .todoelements are deletable:

// get the checked inputs
$('.todo input:checked')
   // get the todo elements
   .closest('.todo')
   // get the model list
   .models()
   // check canDelete
   .canDelete()

Make Ajax Requests with Lists

After checking if we can delete the todos, we should deletethem from the server. Like $.Model, we can add a static destroyurl:

$.Model.List('Todo.List',{
   destroy : 'POST /todos/delete'
},{
   canDelete : function(){
     return this.grep(function(todo){
       return todo.acl.indexOf("d") != 0
     }).length == this.length
   }
})

and call destroyon our list.

// get the checked inputs
var todos = $('.todo input:checked')
   // get the todo elements
   .closest('.todo')
   // get the model list
   .models()
 
if( todos.canDelete() ) {
   todos.destroy()
}

By default, destroy will create an AJAX request to deletethese instances on the server, when the AJAX request is successful, theinstances are removed from the list and events are dispatched.

Listening to events on Lists

Use bind(eventName,handler(event, data)) to listen to add, remove, and updated eventson a list.

When a model instance is destroyed, it is removed from alllists. In the todo example, we can bind to remove to know when a todo has beendestroyed. The following removes all the todo elements from the page when theyare removed from the list:

todos.bind('remove', function(ev, removedTodos){
  removedTodos.elements().remove();
})

Demo

The following demo illustrates the previous features with acontacts list. Check multiple Contacts and click "DESTROY ALL"

Demo

HTML

Source

Other List Features

  • Store and retrieve multiple instances
  • Fast HTML inserts

Store and retrieve multiple instances

Once you have a collection of models, you often want toretrieve and update that list with new instances. Storing and retrieving is apowerful feature you can leverage to manage and maintain a list of models.

To store a new model instance in a list...

listInstance.push(new Animal({ type: dog, id: 123 }))

To later retrieve that instance in your list...

var animal = listInstance.get(123);

Faster Inserts

The 'easy' way to add a model to an element is simplyinserting the model into the view like:

<div <%= task %>> A task </div>

And then you can use $('.task').models().

This pattern is fast enough for 90% of all widgets. But itdoes require an extra query. Lists help you avoid this.

The getmethod takes elements and uses their className to return matched instances inthe list.

To use get, your elements need to have the instance'sidentity in their className. So to setup a div to reprsent a task, you wouldhave the following in a view:

<div class='task <%= task.identity() %>'> A task </div>

Then, with your model list, you could use get to get a listof tasks:

taskList.get($('.task'))

The following demonstrates how to use this technique:

Demo

HTML

<div id="contacts"></div>
<div id="update"></div>

Source

steal('jquery/model',
      'jquery/dom/fixture',
      'jquery/model/list',
          function(){
 
// =============== SETUP FIXTURES =============== 
 
$.fixture("GET /recipes.json", function(){
        return [[{'id': 1,'name' : 'Justin Meyer','birthday': '1982-10-20'},
               {'id': 2,'name' : 'Brian Moschel','birthday': '1983-11-10'},
               {'id': 3,'name' : 'Alex Gomes','birthday': '1980-2-10'}]];
});
$.fixture("PUT /recipes/{id}.json", function(){
        return {};
})
 
// =============== Contact Model =============== 
 
$.Model("Contact",{
        attributes : { 
               birthday : 'date'
        },
        convert : {
               // a converter to handle dates like 12-12-2012
               date : function(raw){
                       if(typeof raw == 'string'){
                               var matches = raw.match(/(\d+)-(\d+)-(\d+)/)
                               return new Date( +matches[1], 
                                                (+matches[2])-1, 
                                                +matches[3] )
                       }else if(raw instanceof Date){
                               return raw;
                       }
               }
        },
        findAll : "/recipes.json",
        update : "/recipes/{id}.json"
},{
        ageThisYear : function(){
               return new Date().getFullYear() - 
                     this.birthday.getFullYear()
        },
        getBirthday : function(){
               return ""+this.birthday.getFullYear()+
                       "-"+(this.birthday.getMonth()+1)+
                       "-"+this.birthday.getDate();
        }
 
});
 
// =============== updaterWidget =============== 
 
makeAgeUpdater = function(contact){
        var updater = $("#update")
        
        // clear the old update content and add the contact's bday
        updater.html("")
               .append(contact.name+"'s birthday");
        
        // create an input element
        $('<input/>')
               // set the contacts birthday as val
               .val(contact.attr("birthday"))
               // when the input changes, update the contact with the value
               .change(function(){
                       contact.update({
                               'birthday': this.value
                       })
               })
               // add the input to the updater
               .appendTo(updater)
};
 
// =============== Listen for updates =============== 
 
Contact.bind("updated", function(ev, contact){
        
        // use the list to get the instance from the element
    contact.elements($('#contacts'))
      .html(contact.name+" "+contact.ageThisYear()+
          " <a>Show</a>");
});
 
// =============== Draw out Contacts =============== 
 
Contact.findAll({},function(contacts){
        var contactsEl = $('#contacts'),
               html = [], 
               contact;
        
        // collect contact html
        for(var i =0; i < contacts.length;i++){
               contact = contacts[i]
        html.push("<li class='contact ",
               contact.identity(), //add the identity to the className manually
               "'>",
               contact.name+" "+contact.ageThisYear()+
                        " <a>Show</a>",
               "</li>")
        }
        // insert contacts html
        contactsEl.html(html.join(""))
        
        contactsEl.delegate("li","click", function(){
         // use the contacts list to get the
         // contact from the clicked element
         var contact = contacts.get(this)[0]
         makeAgeUpdater( contact );
        });
 
});
 
})

 

jQuery.Model.List.Cookie  class    

plugin: jquery/model/list/cookie

download: jQuery.Model.List.Cookie

test: qunit.html

Source

Provides a store-able list of model instances. Thefollowing retrieves and saves a list of contacts:

var contacts = new Contact.List([]).retrieve("contacts");
 
// add each contact to the page
contacts.each(function(){
addContact(this);
});
 
// when a new cookie is crated
$("#contact").submit(function(ev){
    ev.preventDefault();
    var data = $(this).formParams();
 
    // gives it a random id
    data.id = +new Date();
    var contact = new Contact(data);
 
    //add it to the list of contacts 
    contacts.push(contact);
 
    //store the current list
    contacts.store("contacts");
 
    //show the contact
    addContact(contact);
})

You can see this in action in the following demo. Create acontact, then refresh the page.

Demo

HTML

<h2>Create A Contact</h2>
<form action="" id="contact">
        <label>Name</label> 
        <input name="name" type="text"> <br>
        <label>Birthday</label> 
        <input name="birthday" value="1982-10-20" type="text"> 
        (must be like 1982-10-20)<br>
        <input value="Create" type="submit">
</form>
<h2>List of Contacts</h2>
<div id="contacts"></div>

Source

steal('jquery/model',
               'jquery/model/list/cookie',
               'jquery/dom/form_params').then(function(){
                       
$.Model("Contact",{
        attributes : { 
               birthday : 'date'
        },
        convert : {
               date : function(raw){
                       if(typeof raw == 'string'){
                               var matches = raw.match(/(\d+)-(\d+)-(\d+)/)
                               return new Date( +matches[1], 
                                                (+matches[2])-1, 
                                                +matches[3] )
                       }else if(raw instanceof Date){
                               return raw;
                       }
               }
        }
},{
        ageThisYear : function(){
               return new Date().getFullYear() - 
                     this.birthday.getFullYear()
        },
        getBirthday : function(){
               return ""+this.birthday.getFullYear()+
                       "-"+(this.birthday.getMonth()+1)+
                       "-"+this.birthday.getDate();
        }
 
});
 
// Create a contact list
$.Model.List.Cookie("Contact.List");
 
// A helper function for adding a contact to the page
var addContact = function(contact){
         var li = $('<li>')
              .model(contact)
              .html(contact.name+" "+contact.ageThisYear())
              .appendTo($("#contacts"));
}
$(function(){
        // pull saved contacts into this list
        var contacts = new Contact.List([]).retrieve("contacts");
        
        // add each contact to the page
        contacts.each(function(){
               addContact(this);
        });
        
        // when a new cookie is crated
        $("#contact").submit(function(ev){
               ev.preventDefault();
               var data = $(this).formParams();
               
               // gives it a random id
               data.id = +new Date();
               var contact = new Contact(data);
               
               //add it to the list of contacts 
               contacts.push(contact);
               
               //store the current list
               contacts.store("contacts");
               
               //show the contact
               addContact(contact);
        })
})
})

jQuery.Model.List.Cookie.prototype.retrieve  function     

Source

Deserializes a list of instances in the cookie with theprovided name

API

model.list.cookie.retrieve(name) -> jQuery.Model

name {String}

the name of the cookie to use.

returns {jQuery.Model}

returns this model instance.

jQuery.Model.List.Cookie.prototype.store  function     

Source

Serializes and saves this list of model instances to thecookie in name.

API

model.list.cookie.store(name) -> jQuery.Model

name {String}

the name of the cookie

returns {jQuery.Model}

returns this model instance.

jQuery.Model.List.Local  class    

plugin: jquery/model/list/local

download: jQuery.Model.List.Local

Source

Works exactly the same as jQuery.Model.List.Cookieexcept uses a local store instead of cookies.

jQuery.Model.List.prototype.bind  function     

Source

Listens for an events on this list. The only useful eventsare:

. add - when new items are added . update - when an item isupdated . remove - when items are removed from the list (typically because theyare destroyed).

Listen for items being added

list.bind('add', function(ev, newItems){
 
})

Listen for items being removed

list.bind('remove',function(ev, removedItems){
 
})

Listen for an item being updated

list.bind('update',function(ev, updatedItem){
 
})

API

model.list.bind() -> undefined

returns {undefined}

 

jQuery.Model.List.prototype.destroy  function     

Source

Destroys all items in this list. This will use the List's staticdestroy method.

list.destroy(function(destroyedItems){
    //success
}, function(){
    //error
});

API

model.list.destroy(success, error) -> undefined

success {Function}

a handler called back with the destroyed items. Theoriginal list will be emptied.

error {Function}

a handler called back when the destroy was unsuccessful.

returns {undefined}

 

jQuery.Model.List.prototype.each  function     

Source

Iterates through the list of model instances, calling thecallback function on each iteration.

list.each(function(indexInList, modelOfList){
    ...
});

API

model.list.each(callback)

callback {Function}

The function that will be executed on every object.

jQuery.Model.List.prototype.elements  function     

Source

Returns elements that represent this list. For this towork, your element's should us the identityfunction in their class name. Example:

<div class='todo <%= todo.identity() %>'> ... </div>

This also works if you hooked up the model:

<div <%= todo %>> ... </div>

Typically, you'll use this as a response to a Model Event:

"{Todo} destroyed": function(Todo, event, todo){
  todo.elements(this.element).remove();
}

API

model.list.elements(context) -> jQuery

context {String|jQuery|element}

If provided, only elements inside this element thatrepresent this model will be returned.

returns {jQuery}

Returns a jQuery wrapped nodelist of elements that havethese model instances identities in their class names.

jQuery.Model.List.prototype.findAll  function     

Source

Finds items and adds them to this list. This uses jQuery.Model.static.findAllto find items with the params passed.

API

model.list.findAll(params, success, error) -> undefined

params {Object}

options to refind the returned items

success {Function}

called with the list

error {Object}

returns {undefined}

jQuery.Model.List.prototype.get  function    

Source

Gets a list of elements by ID or element.

To fetch by id:

var match = list.get(23);

or to fetch by element:

var match = list.get($('#content')[0])

API

model.list.get(args) -> undefined

args {Object}

elements or ids to retrieve.

jQuery.Model.List.prototype.grep  function     

Source

Finds the instances of the list which satisfy a callbackfilter function. The original array is not affected.

var matchedList = list.grep(function(instanceInList, indexInArray){
   return instanceInList.date < new Date();
});

API

model.list.grep(callback, args) -> undefined

callback {Function}

the function to call back. This function has the same callpattern as what jQuery.grep provides.

args {Object}

returns {undefined}

jQuery.Model.List.prototype.indexOf  function     

Source

Finds the index of the item in the list. Returns -1 if notfound.

list.indexOf(item)

API

model.list.indexOf()

jQuery.Model.List.prototype.map  function    

Source

Iterates through the list of model instances, calling thecallback function on each iteration.

list.map(function(modelOfList, indexInList){
    ...
});

API

model.list.map(callback)

callback {Function}

The function to process each item against.

jQuery.Model.List.prototype.match  function     

Source

Returns a list of all instances who's property matches thegiven value.

list.match('candy', 'snickers')

API

model.list.match(property, value) -> undefined

property {String}

the property to match

value {Object}

the value the property must equal

returns {undefined}

 

jQuery.Model.List.prototype.push  function     

Source

Adds an instance or instances to the list

list.push(new Recipe({id: 5, name: "Water"}))

API

model.list.push(The) -> Number

The {args {Object}

instance(s) to push onto the list.

returns {Number}

The number of elements in the list after the new elementwas pushed in.

jQuery.Model.List.prototype.remove  function     

Source

Removes instances from this list by id or by an element.

To remove by id:

var match = list.remove(23);

or to remove by element:

var match = list.remove($('#content')[0])

API

model.list.remove(args) -> undefined

args {Object}

elements or ids to remove.

jQuery.Model.List.prototype.reverse  function     

Source

Reverse the list in place

list.reverse()

API

model.list.reverse()

jQuery.Model.List.prototype.shift  function     

Source

Removes the first instance of the list, and returns thatinstance.

list.shift()

API

model.list.shift()

jQuery.Model.List.prototype.slice  function     

Source

The slice method selects a part of an array, and returnsanother instance of this model list's class.

list.slice(start, end)

API

model.list.slice(start, end) -> undefined

start {Number}

the start index to select

end {Number}

the last index to select

returns {undefined}

jQuery.Model.List.prototype.sort  function     

Source

Sorts the instances in the list.

list.sort(sortfunc)

API

model.list.sort()

jQuery.Model.List.prototype.splice  function     

Source

The splice method adds and/or removes instances to/from thelist, and returns the removed instance(s).

list.splice(index,howmany)

API

model.list.splice()

jQuery.Model.List.prototype.unbind  function     

Source

Unbinds an event on this list. Once all events are unbound,unbind stops listening to all elements in the collection.

list.unbind("update") //unbinds all update events

API

model.list.unbind() -> undefined

returns {undefined}

jQuery.Model.List.prototype.unshift  function     

Source

Adds a new instance to the beginning of an array, andreturns the new length.

list.unshift(element1,element2,...) 

API

model.list.unshift()

jQuery.Model.List.prototype.update  function     

Source

Updates items in the list with attributes. This makes arequest using the list class's staticupdate.

list.update(function(updatedItems){
    //success
}, function(){
    //error
});

API

model.list.update(attrs, success, error) -> undefined

attrs {Object}

attributes to update the list with.

success {Function}

a handler called back with the updated items.

error {Function}

a handler called back when the update was unsuccessful.

returns {undefined}

jQuery.Model.List.static.destroy  function     

Source

Destroy is used to remove a set of model instances from theserver. By implementing destroy along with the rest of the[jquery.model.services service api], your models provide an abstract serviceAPI.

You can implement destroy with a string like:

$.Model.List("Thing",{
  destroy : "POST /thing/destroy/"
})

Or you can implement destroy manually like:

$.Model.List("Thing",{
  destroy : function(ids, success, error){
       return $.ajax({
          url: "/thing/destroy/",
          data: ids,
          success: success,
          error: error,
          type: "POST"
       });
  }
})

Then you delete models by calling the prototypedelete method.

listInstance.destroy();

By default, the request will POST an array of ids to bedeleted in the body of the Ajax request.

{ 
    ids: [5,10,20]
}

API

$.Model.List.destroy(ids, success, error)

ids {Array}

the ids of the instances you want destroyed

success {Function}

the callback function

error {Function}

a function to callback if something goes wrong.

jQuery.Model.List.static.update  function    

Source

Update is used to update a set of model instances on theserver. By implementing update along with the rest of the[jquery.model.services service api], your models provide an abstract API forservices.

The easist way to implement update is to just give it theurl to put data to:

$.Model.List("Recipe",{
  update: "PUT /thing/update/"
},{})

Or you can implement update manually like:

$.Model.List("Thing",{
  update : function(ids, attrs, success, error){
       return $.ajax({
          url: "/thing/update/",
          success: success,
          type: "PUT",
          data: { ids: ids, attrs : attrs }
          error: error
       });
  }
})

Then you update models by calling the prototypeupdate method.

listInstance.update({ name: "Food" })

By default, the request will PUT an array of ids to beupdated and the changed attributes of the model instances in the body of theAjax request.

{ 
    ids: [5,10,20],
    attrs: { 
        name: "Food" 
    } 
}

Your server should send back an object with any newattributes the model should have. For example if your server udpates the"updatedAt" property, it should send back something like:

// PUT /recipes/4,25,20 { name: "Food" } ->
{
  updatedAt : "10-20-2011"
}

API

$.Model.List.update(ids, attrs, success, error)

ids {Array}

the ids of the model instance

attrs {Object}

Attributes on the model instance

success {Function}

the callback function. It optionally accepts an object ofattribute / value pairs of property changes the client doesn't already knowabout. For example, when you update a name property, the server might updateother properties as well (such as updatedAt). The server should send theseproperties as the response to updates. Passing them to success will update themodel instances with these properties.

error {Function}

a function to callback if something goes wrong.

 

我vue项目启动的时候报如下错误如何解决: ERROR Failed to compile with 394 errors 14:21:17 These dependencies were not found: * core-js/modules/es6.array.fill in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.array.find in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/components/InputTable/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/index/RightComponents/Calculate.vue?vue&type=script&lang=js& and 4 others * core-js/modules/es6.array.find-index in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Ge nerator/components/InputTable/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/index/Home.vue?vue&type=script&lang=js& and 7 others * core-js/modules/es6.array.from in ./src/utils/index.js * core-js/modules/es6.array.sort in ./src/components/bus-extents/map/geotool.js, ./src/mixins/generator/index.js and 8 others * core-js/modules/es6.function.name in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Gener ator/components/Upload/UploadImg.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/index/DraggableItem.vue?vue&type=script&lang=js& and 43 others * core-js/modules/es6.map in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/basic/dynamicModel/list/detail/index.vue?vue&type=script&lang=js&, ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.math.sign in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.math.trunc in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.number.constructor in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ Generator/components/Calculate/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/components/InputTable/index.vue?vue&type=script&lang=js& and 26 others * core-js/modules/es6.number.is-finite in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.number.is-integer in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.number.is-nan in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/components/InputTable/index.vue?vue&type=script&lang=js&, ./src/components/Generator/utils/index.js and 1 other * core-js/modules/es6.number.parse-float in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.object.freeze in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.object.keys in ./src/main.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/index/Home.vue?vue&type=script&lang=js& and 8 others * core-js/modules/es6.regexp.constructor in ./src/components/Generator/render/render.js, ./src/components/Generator/utils/index.js and 3 others * core-js/modules/es6.regexp.flags in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.regexp.match in ./src/utils/index.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/bus/app/appDown.vue?vue&type=script&lang=js& and 1 other * core-js/modules/es6.regexp.replace in ./src/api/workFlow/workFlowForm.js, ./src/components/Generator/render/render.js and 34 others * core-js/modules/es6.regexp.search in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Heade rSearch/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/JNPF-iconBox/index.vue?vue&type=script&lang=js& and 36 others * core-js/modules/es6.regexp.split in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Genera tor/components/Calculate/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/index/RightPanel.vue?vue&type=script&lang=js& and 38 others * core-js/modules/es6.regexp.to-string in ./src/components/Generator/utils/index.js, ./src/filters/index.js and 16 others * core-js/modules/es6.set in ./src/utils/index.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/permission/authorize/index.vue?vue&type=script&lang=js& * core-js/modules/es6.string.includes in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Col umnDesign/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/components/InputTable/index.vue?vue&type=script&lang=js& and 14 others * core-js/modules/es6.string.iterator in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/bus-extents/print/PrintView.vue?vue&type=script&lang=js&, ./src/utils/index.js and 5 others * core-js/modules/es6.symbol in ./src/views/bus/track/js/jquery-3.3.1.min.js * core-js/modules/es6.typed.float64-array in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.typed.int32-array in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.typed.int8-array in ./src/views/bus/track/js/turf.min.js * core-js/modules/es6.typed.uint32-array in ./src/views/bus/track/js/turf.min.js * core-js/modules/es7.array.includes in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Colu mnDesign/index.vue?vue&type=script&lang=js&, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Generator/components/InputTable/index.vue?vue&type=script&lang=js& and 17 others * core-js/modules/es7.string.pad-start in ./src/utils/index.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/bus/askLeave/Detail.vue?vue&type=script&lang=js& and 6 others * core-js/modules/es7.symbol.async-iterator in ./src/views/bus/track/js/jquery-3.3.1.min.js * core-js/modules/web.dom.iterable in ./src/main.js, ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ColumnDesign/index.vue?vue&type=script&lang=js& and 71 others To install them, you can run: npm install --save core-js/modules/es6.array.fill core-js/modules/es6.array.find core-js/modules/es6.array.find-index core-js/modules/es6.array.from core-js/modules/es6.array.sort core-js/modules/es6.function.name core-js/modules/es6.map core-js/modules/es6.math.sign core-js/modules/es6.math.trunc core-js/modules/es6.number.constructor core-js/modules/es6.number.is-finite core-js/modules/es6.number.is-integer core-js/modules/es6.number.is-nan core-js/mod ules/es6.number.parse-float core-js/modules/es6.object.freeze core-js/modules/es6.object.keys core-js/modules/es6.regexp.constructor core-js/modules/es6.regexp.flags core-js/modules/es6.regexp.match core-js/modules/es6.regexp.replace core-js/mo dules/es6.regexp.search core-js/modules/es6.regexp.split core-js/modules/es6.regexp.to-string core-js/modules/es6.set core-js/modules/es6.string.includes core-js/modules/es6.string.iterator core-js/modules/es6.symbol core-js/modules/es6.typed.f loat64-array core-js/modules/es6.typed.int32-array core-js/modules/es6.typed.int8-array core-js/modules/es6.typed.uint32-array core-js/modules/es7.array.includes core-js/modules/es7.string.pad-start core-js/modules/es7.symbol.async-iterator core-js/modules/web.dom.iterable Failed to resolve loader: core-js/modules/es6.function.name' in 'D:\Development\project\lh\linhai-boot-web\src\components\SimpleUploader You may need to install it.
最新发布
05-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值