| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <div class="signup" v-if="configInfor && isData">
- <LoginNav2 :configInfor="configInfor" />
- <Registration />
- </div>
- </template>
- <script>
- //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》from ‘《组件路径》';
- import Registration from "@/components/login/registration";
- import LoginNav2 from "@/components/login/LoginNav2";
- import { getConfig } from "@/utils/auth";
- import { getConfigInfor } from "@/utils/index";
- import { updateWordPack } from "@/utils/i18n";
- export default {
- //import引入的组件需要注入到对象中才能使用
- components: {
- Registration,
- LoginNav2,
- },
- props: {},
- data() {
- //这里存放数据
- return {
- configInfor: null,
- isData: false,
- };
- },
- //计算属性 类似于data概念
- computed: {},
- //监控data中数据变化
- watch: {},
- //方法集合
- methods: {},
- //生命周期 - 创建完成(可以访问当前this实例)
- async created() {
- await updateWordPack({
- word_key_list: [
- "Key9",
- "Key10",
- "Key14",
- "Key15",
- "Key16",
- "Key17",
- "Key18",
- "Key21",
- "Key22",
- "Key23",
- "Key24",
- "Key25",
- "Key26",
- "Key27",
- "Key28",
- "Key29",
- "Key30",
- "Key31",
- "Key32",
- "Key33",
- "Key34",
- "Key35",
- "Key36",
- "Key37",
- "Key84",
- "Key121",
- "Key542",
- "Key540",
- "Key541",
- "Key542",
- "Key543",
- "Key544",
- "Key545",
- "Key546",
- ],
- });
- this.isData = true;
- },
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- if (getConfig()) {
- this.configInfor = JSON.parse(getConfig());
- } else {
- this.configInfor = getConfigInfor();
- }
- },
- //生命周期-创建之前
- beforeCreated() {},
- //生命周期-挂载之前
- beforeMount() {},
- //生命周期-更新之前
- beforUpdate() {},
- //生命周期-更新之后
- updated() {},
- //生命周期-销毁之前
- beforeDestory() {},
- //生命周期-销毁完成
- destoryed() {},
- //如果页面有keep-alive缓存功能,这个函数会触发
- activated() {},
- };
- </script>
- <style scoped>
- .signup {
- background: #e5e5e5;
- padding-bottom: 30px;
- }
- /* @import url(); 引入css类 */
- </style>
|