  Linear codes with a few weights are an important class of codes in coding
theory and have attracted a lot of attention. In this paper, we present several
constructions of $q$-ary linear codes with two or three weights from vectorial
dual-bent functions, where $q$ is a power of an odd prime $p$. The weight
distributions of the constructed $q$-ary linear codes are completely
determined. We illustrate that some known constructions in the literature can
be obtained by our constructions. In some special cases, our constructed linear
codes can meet the Griesmer bound. Furthermore, based on the constructed
$q$-ary linear codes, we obtain secret sharing schemes with interesting access
structures.
