昨天我有一个奇怪的vue问题,NPM run dev
实现成功,但是控制台提示template or render function not defined.
,寻找信息,还没有解决,希望得到帮助
enter image description here
答案 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.js
内App.vue
。我认为它正在导入'App.js main.js
App.js`,你应该很好。