uni-app 的基础格式

uni-app 的基础格式,方便复制粘贴

<template>
    <view></view>
</template>

<script>
// 引入公共部分
import { graceRichText } from '@/static/js/rechText.js';
import toubu from '../../components/toubu/toubu.vue';
export default {
    components: {
        toubu
    },
    data() {
        return {
            list: ''
        };
    },
    created() {},
    onShow() {},
    onLoad(options) {},
    methods: {}
};
</script>
<!-- scoped (防止本页的css污染全局)  lang="less" (使用less)-->
<style scoped lang="less">
@import url('../../static/css/public.less');
</style>

 

基础知识(一)

    <!-- 公共的css,可在 App.vue 中,全局引入 -->
    @import url('./static/css/public.css');

    <!-- 也可以在某个页面单独引入 -->
    @import url('../../static/css/public.css');

    <!-- 类名相同,全局引入的样式,会被当前页面 style 中的样式覆盖 -->

  

posted @ 2020-09-10 11:33  野鹤亦闲云  阅读(547)  评论(0编辑  收藏  举报