npm运行dev没有错误,但控制台`模板或渲染功能未定义

时间:2017-11-02 03:24:37

标签: webpack vuejs2

昨天我有一个奇怪的vue问题,NPM run dev实现成功,但是控制台提示template or render function not defined.,寻找信息,还没有解决,希望得到帮助 enter image description here

项目地址:https://github.com/shunzizhan/vue/tree/master/demo

1 个答案:

答案 0 :(得分:0)

您同时拥有<div class="panel panel-default"> <div class="panel-heading row"> <div class="col-md-4 col-sm-4 col-xs-4">State</div> <div class="col-md-4 col-sm-4 col-xs-4 ellipsis" id="cstate"><?php if (isset($s_state)) { echo $s_state; } ?> </div> <a data-toggle="collapse" data-parent="#accordion" href="#collapse6"> <div class="profile-edit col-sm-4 col-xs-4 col-md-4 aj-textsix"> <?php if (empty($s_state[0]) || empty($s_state)): ?> Add <?php else: ?> <i class="fa fa-pencil"></i> Edit <?php endif; ?> </div> </a> </div> <div id="collapse6" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-md-7 col-lg-offset-2 text-center"> <label class="col-md-4">State</label> <div class="col-md-8"> <select id="state" name="state" value="<?= (isset($s_state)) ? $s_state : null; ?>"> <option value="data1" selected="selected">Data 1</option> <option value="data2">Data 2</option> </select> <input type="hidden" name="save_state" id="save_state" value="<?= (empty($s_state[0]) || empty($s_state)) ? 'Save' : 'Update'; ?>"> <?php if (empty($s_state[0]) || empty($s_state)): ?> <button type="submit" class="btn btn-success aj-text-btnsix" data-target="#collapse6" data-toggle="collapse">Save</button> <?php else: ?> <button type="submit" class="btn btn-success aj-text-btnsix" data-target="#collapse6" data-toggle="collapse">Update</button> <?php endif; ?> <button type="button" data-target="#collapse6" data-toggle="collapse" class="btn btn-warning cancel-name">Cancel</button> </div> </div> </div> </div> </div> </div> $(".aj-textsix").html(result.replace_textsix); $(".aj-text-btnsix").html(result.btn_textsix); $("#save_state").val(result.save_state); $('#cstate').text($("#state").val()); 。在App.jsApp.vue。我认为它正在导入'App.js main.js App.js`,你应该很好。