最近在用vue cli运行iview控件的时候,想跳过cli直接在浏览器运行,发现这段代码没办法运行,请问怎么办?
<template> <Select v-model="model1" style="width:200px"> <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option> </Select> </template> <script> export default { data () { return { cityList: [ { value: 'New York', label: 'New York' }, { value: 'London', label: 'London' }, { value: 'Sydney', label: 'Sydney' }, { value: 'Ottawa', label: 'Ottawa' }, { value: 'Paris', label: 'Paris' }, { value: 'Canberra', label: 'Canberra' } ], model1: '' } } } </script>
网友回复
换成这样就行了
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>BFW NEW PAGE</title> <script id="bfwone" data="dep=vue.2.2.min&err=0" type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/bfwone.js"></script> <script type="text/javascript"> bready(function() { use(["iview.min", "iview"], function() { new Vue({ el: '#app', data: { cityList: [{ value: 'New York', label: 'New York' }, { value: 'London', ...
点击查看剩余70%