123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <div class="corpus_seekpage">
- <Header :projectShow="true" :seekOptions="false" :seekOption="true" />
- <div class="title">
- <p>语料库词典</p>
- <p>Corpus Dictionary</p>
- </div>
- <div class="seek" @keydown="downSeek">
- <input type="text" v-model="keyword" />
- <button @click="seekEvent">搜索</button>
- </div>
- <div class="txt">共{{ 120 }}本教材,合计{{ 123124 }}词。</div>
- </div>
- </template>
- <script>
- //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》from ‘《组件路径》';
- import Header from "@/components/Header";
- export default {
- name: "corpus_seekpage",
- //import引入的组件需要注入到对象中才能使用
- components: {
- Header,
- },
- props: {},
- data() {
- //这里存放数据
- return {
- keyword: null,
- };
- },
- //计算属性 类似于data概念
- computed: {},
- //监控data中数据变化
- watch: {},
- //方法集合
- methods: {
- downSeek(e) {
- if (e.keyCode == 13) {
- if (!this.keyword) {
- this.$message.warning("请先输入内容");
- return;
- }
- this.seekEvent();
- }
- },
- seekEvent() {
- if (!this.keyword) {
- this.$message.warning("请先输入内容");
- return;
- }
- this.$router.push({
- path: "/corpus/Result",
- query: {
- keyword: this.keyword,
- },
- });
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {},
- //生命周期-创建之前
- beforeCreated() {},
- //生命周期-挂载之前
- beforeMount() {},
- //生命周期-更新之前
- beforUpdate() {},
- //生命周期-更新之后
- updated() {},
- //生命周期-销毁之前
- beforeDestory() {},
- //生命周期-销毁完成
- destoryed() {},
- //如果页面有keep-alive缓存功能,这个函数会触发
- activated() {},
- };
- </script>
- <style lang="scss" scoped>
- /* @import url(); 引入css类 */
- .corpus_seekpage {
- .title {
- margin-top: 200px;
- > :nth-child(1) {
- font-weight: 700;
- font-size: 48px;
- line-height: 56px;
- color: #000000;
- margin-bottom: 12px;
- }
- > :nth-child(2) {
- font-weight: 400;
- font-size: 20px;
- line-height: 23px;
- }
- > p {
- margin: 0;
- text-align: center;
- }
- }
- .seek {
- margin-top: 41px;
- display: flex;
- justify-content: center;
- height: 51px;
- input {
- width: 468px;
- height: 51px;
- border: 1px solid #669aff;
- outline: none;
- box-sizing: border-box;
- padding: 0 10px;
- }
- button {
- width: 96px;
- height: 100%;
- background: #669aff;
- border-width: 1px 1px 1px 0px;
- border-style: solid;
- border-color: #669aff;
- text-align: center;
- font-weight: 400;
- font-size: 16px;
- line-height: 51px;
- color: #ffffff;
- cursor: pointer;
- box-sizing: border-box;
- }
- }
- .txt {
- margin-top: 41px;
- text-align: center;
- font-weight: 400;
- font-size: 16px;
- line-height: 19px;
- color: #000000;
- opacity: 0.65;
- }
- }
- </style>
|