// components/jianli/jianli.js import { imgServerUrl } from '../../config/config.js' Component({ /** * 组件的属性列表 */ properties: { userResume: { // 简历 type: Object, value: {}, observer() { // 当简历有值传进来时 获取container元素高度 为水印提供总高度值 setTimeout(() => { this.createSelectorQuery().select('.container').fields({ dataset: true, size: true, scrollOffset: true, properties: ['scrollX', 'scrollY'], computedStyle: ['margin', 'backgroundColor'], context: true, }, (res) => { if (res) { this.setData({ height: res.height }) } }).exec() }, 200); } }, expList: { // 经验列表 type: Array, value: [] }, edit: { // 是否可以编辑 type: Boolean, value: false } }, /** * 组件的初始数据 */ data: { // oss路径 imgServerUrl, // 水印总高度 height: 0, // 学历列表 eduList: ["请选择", "小学", "中学", "高中", "大专", "本科", "研究生", "博士", "博士后"], // 工种列表 expectationPosition: ["普工", "客服", "销售", "服务员", "物流仓储", "司机", "才艺技能", "文员助理", "快递配送", "促销导购", "展会演出", "家教培训", "模特", "贸易采购", "厨师", "编辑", "线上推广", "设计", "技工", "保洁", "其它"], }, /** * 组件的方法列表 */ methods: { // 编辑个人信息 user() { this.triggerEvent('user') }, // 编辑求职意向 job() { this.triggerEvent('job') }, // 编辑工作经历 edit(e) { const { index } = e.detail; this.triggerEvent('edit', { type: 'edit', index }) }, // 添加工作经历 addNew() { this.triggerEvent('creat', { type: 'new' }) } } })