绝对定位
①import common from "@/utils/common.js"
②import common from "utils/common.js"
<template><view></view>
</template>
<script>import common from "@/utils/common.js"export default {data() {return {}; },methods: {},onLoad() {console.log(common.generateRandomNumber())}};
</script>
<style></style>
<template><view></view>
</template>
<script>import common from "utils/common.js"export default {data() {return {}; },methods: {},onLoad() {console.log(common.generateRandomNumber())}};
</script>
<style></style>
相对定位
import common from "../../utils/common.js"
<template><view></view>
</template>
<script>import common from "../../utils/common.js"export default {data() {return {}; },methods: {},onLoad() {console.log(common.generateRandomNumber())}};
</script>
<style></style>