| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- /*******************************************************************************
- * Copyright(c) 2022 dongke All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 周兴 2024-3-12 1.00 底部工具栏-保存
- *******************************************************************************/
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- // 按钮
- buttonList: {
- type: Array,
- },
- // 内容
- contentList:{
- type:Array,
- },
- // 按钮自动宽度
- btnAutoWidthFlag:{
- type:Boolean,
- },
- // 按钮是居右
- btnRightFlag:{
- type:Boolean,
- },
- cssType:{ //css 样式
- type:String,
- value:'default'
- },
- // 结果集
- value: {
- type: String,
- observer: function (newVal) {
- if (newVal) {
- this.setData({
- form: JSON.parse(newVal) || {}
- })
- }else{
- this.setData({
- form: {}
- })
- }
- }
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- form:{}
- },
- /**
- * 组件生命周期
- */
- lifetimes: {
- attached: function () {
- },
- detached: function () {
- // 在组件实例被从页面节点树移除时执行
- },
- },
- /**
- * 组件的方法列表
- */
- methods: {
- /**
- * @desc : 修改复选框的值
- * @author : 周兴
- * @date : 2024/2/2 11:46
- */
- change(e) {
- let code = e.currentTarget.dataset.code
- let form = this.data.form
- form[code] = e.detail
- this.setData({
- form: form,
- value:JSON.stringify(form)
- })
- this.triggerEvent("change", { code: code })
- },
- /**
- * @desc : 点击按钮
- * @author : 周兴
- * @date : 2024/2/2 11:46
- */
- submit(e){
- let item = e.currentTarget.dataset.item
- console.log(e)
- this.triggerEvent("open", { name: item.code ,customUrl:item.customUrl})
- },
- }
- })
|