"use strict"; Component({ properties: { list: { type: Array, value: [ { name: "", value: "", }, ], }, selected: { type: String, value: "", }, fm: { type: String, value: "fmData", }, name: { type: String, value: "", }, }, data: {}, lifetimes: { ready: function () { this.init(); }, }, methods: { init: function () { console.log("单选框组件初始化完成"); }, select: function (e) { var value = e.currentTarget.dataset.value; var _a = this.data, fm = _a.fm, name = _a.name; this.setData({ selected: value }); this.triggerEvent("select", { fm: fm, name: name, value: value }); }, }, });