我有一个带有下一个代码的刀片文件
<div id="appCropper">
<cropper-admin></cropper-admin>
</div>
和js文件
let Child = {
template: '<div>test</div>'
};
new Vue({
el: '#appCropper',
components: {
'cropper-admin' : Child
}
});
当我尝试在控制台中使用“require(js / component.vue”)时,我会看到
未捕获的ReferenceError:未定义require
答案 0 :(得分:0)
参考文献:
在app.js(条目文件)中:
全球注册:
<template>
<div>{{ text }}</div>
</template>
<script>
export default {
data() {
return { text: 'test }
}
}
</script>
本地注册:
string MyPath = @"D:/Documents/Reonance Tunneling";
component.vue:
private void BntDeleteFolder_Click(object sender, EventArgs e)
{
TreeNode newSelected = TreeView1.SelectedNode;
string DirectoryName = newSelected.Text;
DirectoryInfo nodeDirInfo = (DirectoryInfo)newSelected.Tag;
try
{
if (MessageBox.Show("Are you sure you want to delete Folder " + "'" + DirectoryName + "'" + " ?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
foreach (FileInfo file in nodeDirInfo.GetFiles())
{
File.Delete(MyPath + "//" + DirectoryName + "//" + item.Text);
}
Directory.Delete(MyPath + "//" + DirectoryName + "//");
newSelected.Remove();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
希望这有助于您入门